Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KolloquiumVRWebsite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nick Anton Christoph Kleine-Tebbe
KolloquiumVRWebsite
Commits
c7b7fb5d
Commit
c7b7fb5d
authored
Jan 24, 2022
by
Nick Anton Christoph Kleine-Tebbe
Browse files
Options
Downloads
Patches
Plain Diff
finished editable list
parent
5353584c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
components/AbgabeItem.vue
+1
-1
1 addition, 1 deletion
components/AbgabeItem.vue
components/KolloquiumItem.vue
+13
-3
13 additions, 3 deletions
components/KolloquiumItem.vue
pages/index.vue
+13
-4
13 additions, 4 deletions
pages/index.vue
with
27 additions
and
8 deletions
components/AbgabeItem.vue
+
1
−
1
View file @
c7b7fb5d
...
...
@@ -3,7 +3,7 @@
:selected=
"selected"
>
<div
class=
"flex flex-row w-full"
>
<div
v-if=
"!inEdit"
class=
"w-full select-none text-left mr-1"
>
<div
class=
"w-full select-none text-left mr-1"
>
{{
title
}}
</div>
<button
...
...
This diff is collapsed.
Click to expand it.
components/KolloquiumItem.vue
+
13
−
3
View file @
c7b7fb5d
...
...
@@ -12,13 +12,16 @@
class=
"text-center text-white rounded-md select-none w-9 h-8 ml-1 bg-blue-500 hover:bg-blue-700 active:bg-blue-900 pb-1"
>
✉
</button>
<button
v-if=
"inEdit"
@
click
.native
=
"save()"
@
click=
"save()"
class=
"text-center text-white rounded-md select-none w-9 h-8 ml-1 bg-green-500 hover:bg-green-700 active:bg-green-900"
>
✓
</button>
<button
v-if=
"!inEdit"
@
click=
"edit()"
class=
"text-center text-white rounded-md select-none w-9 h-8 ml-1 bg-yellow-500 hover:bg-yellow-700 active:bg-yellow-900"
>
✎
</button>
<button
class=
"text-center text-white rounded-md select-none w-9 h-8 ml-1 bg-red-500 hover:bg-red-700 active:bg-red-900"
>
╳
</button>
class=
"text-center text-white rounded-md select-none w-9 h-8 ml-1 bg-red-500 hover:bg-red-700 active:bg-red-900"
@
click=
"deleteMe()"
>
╳
</button>
</div>
</ListItem>
</
template
>
...
...
@@ -48,7 +51,14 @@ export default {
},
methods
:
{
save
()
{
console
.
log
(
"
save me!
"
)
this
.
$emit
(
"
update:inEdit
"
,
false
);
this
.
$emit
(
"
update:title
"
,
this
.
title
);
},
edit
()
{
this
.
$emit
(
"
update:inEdit
"
,
true
);
},
deleteMe
()
{
this
.
$emit
(
"
deleteKolloquium
"
)
}
}
}
...
...
This diff is collapsed.
Click to expand it.
pages/index.vue
+
13
−
4
View file @
c7b7fb5d
<
template
>
<div
class=
"relative flex flex-col items-center justify-top min-h-screen bg-gray-100 sm:items-top sm:pt-0"
>
<div
class=
"relative flex flex-col items-center justify-top min-h-screen bg-gray-100 sm:items-top sm:pt-0"
>
<box>
<template
slot=
"title"
>
KolloquiumVR Control Panel
...
...
@@ -21,7 +19,10 @@
@
click.native=
"selectKolloquium(kolloquium)"
:selected=
"selectedKolloquium===kolloquium.title"
:title=
"kolloquium.title"
@
update:title=
"kolloquium.title=$event"
:inEdit=
"kolloquium.inEdit"
@
update:inEdit=
"toggleEdit(kolloquium, $event)"
@
deleteKolloquium=
"deleteKolloquium(kolloquium)"
/>
<ListItem
@
click.native=
"createNewKolloquium()"
...
...
@@ -45,7 +46,6 @@
<button
class=
"border rounded mt-4 p-2 font-semibold text-white bg-green-500 hover:bg-green-600 focus:bg-green-700"
>
Aktivieren
</button>
</
template
>
</box>
{{ kolloquiums }}
</div>
</template>
...
...
@@ -105,6 +105,15 @@ export default {
this
.
kolloquiums
=
this
.
kolloquiums
.
filter
(
kolloquium
=>
kolloquium
.
title
.
length
>
0
);
this
.
kolloquiums
=
[...
this
.
kolloquiums
,
{
title
:
''
,
inEdit
:
true
}];
},
toggleEdit
(
kolloquium
,
status
)
{
this
.
kolloquiums
.
forEach
(
kolloquium
=>
{
kolloquium
.
inEdit
=
false
;
});
kolloquium
.
inEdit
=
status
;
},
deleteKolloquium
(
kolloquiumToDelete
)
{
this
.
kolloquiums
=
this
.
kolloquiums
.
filter
(
kolloquium
=>
kolloquium
.
title
!=
kolloquiumToDelete
.
title
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment