Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boco-frontend
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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
idatt2106_2022_02
boco-frontend
Commits
cec96f8f
Commit
cec96f8f
authored
2 years ago
by
Gilgard
Browse files
Options
Downloads
Patches
Plain Diff
lint
parent
e0a9e06d
No related branches found
No related tags found
1 merge request
!137
Improve image handeling for listings
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/UserAuthComponents/DeleteUserModal.vue
+19
-14
19 additions, 14 deletions
src/components/UserAuthComponents/DeleteUserModal.vue
src/components/UserProfileComponents/UserProfile.vue
+11
-7
11 additions, 7 deletions
src/components/UserProfileComponents/UserProfile.vue
with
30 additions
and
21 deletions
src/components/UserAuthComponents/DeleteUserModal.vue
+
19
−
14
View file @
cec96f8f
<
template
>
<!-- Main modal -->
<div
v-if=
"visible"
class=
"fixed grid place-items-center bg-gray-600 bg-opacity-50 top-0 left-0 right-0 z-50 w-full overflow-x-hidden overflow-y-auto inset-0 h-full"
v-if=
"visible"
class=
"fixed grid place-items-center bg-gray-600 bg-opacity-50 top-0 left-0 right-0 z-50 w-full overflow-x-hidden overflow-y-auto inset-0 h-full"
>
<div
class=
"relative w-full h-full max-w-2xl p-4 md:h-auto"
>
<!-- Modal content -->
<div
class=
"relative bg-white rounded-lg shadow dark:bg-gray-700"
>
<!-- Modal header -->
<div
class=
"flex items-start justify-between p-4 border-b rounded-t dark:border-gray-600"
class=
"flex items-start justify-between p-4 border-b rounded-t dark:border-gray-600"
>
<h3
class=
"text-xl font-semibold text-gray-900 dark:text-white"
>
Er du helt sikker?
</h3>
<button
@
click=
"close()"
class=
"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white"
@
click=
"close()"
class=
"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white"
>
<svg
class=
"w-5 h-5"
fill=
"currentColor"
viewBox=
"0 0 20 20"
xmlns=
"http://www.w3.org/2000/svg"
class=
"w-5 h-5"
fill=
"currentColor"
viewBox=
"0 0 20 20"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
d=
"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
clip-rule=
"evenodd"
fill-rule=
"evenodd"
d=
"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
clip-rule=
"evenodd"
></path>
</svg>
</button>
</div>
<!-- Modal body -->
<div
class=
"p-6 space-y-6"
>
<div
@
click=
"deleteUser"
class=
"flex justify-center text-xl text-error-dark cursor-pointer"
>
Slett bruker
</div>
<div
@
click=
"deleteUser"
class=
"flex justify-center text-xl text-error-dark cursor-pointer"
>
Slett bruker
</div>
</div>
</div>
</div>
...
...
@@ -51,7 +56,7 @@ export default {
close
()
{
this
.
$emit
(
"
close
"
);
},
deleteUser
(){
deleteUser
()
{
this
.
$emit
(
"
deleteUser
"
);
},
},
...
...
This diff is collapsed.
Click to expand it.
src/components/UserProfileComponents/UserProfile.vue
+
11
−
7
View file @
cec96f8f
...
...
@@ -2,8 +2,11 @@
<div
class=
"w-full max-w-xl m-auto md:ring-1 ring-gray-300 overflow-hidden rounded-xl p-4"
>
<DeleteUserModal
:visible=
"show"
@
close=
"this.show = false"
@
deleteUser=
"deleteUser"
/>
<DeleteUserModal
:visible=
"show"
@
close=
"this.show = false"
@
deleteUser=
"deleteUser"
/>
<div
v-show=
"isCurrentUser"
class=
"float-right px-4 pt-4"
>
<button
id=
"dropdownDefault"
...
...
@@ -70,9 +73,10 @@
>
</li>
<li>
<div
class=
"block py-2 px-4 text-sm text-error-dark cursor-pointer"
@
click=
"toggleModal"
>
<div
class=
"block py-2 px-4 text-sm text-error-dark cursor-pointer"
@
click=
"toggleModal"
>
Slett bruker
</div>
</li>
...
...
@@ -173,9 +177,9 @@ export default {
toggleModal
()
{
this
.
show
=
!
this
.
show
;
},
async
deleteUser
(){
async
deleteUser
()
{
await
UserService
.
deleteUser
();
this
.
logout
()
this
.
logout
()
;
},
},
beforeMount
()
{
...
...
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