itube-specs 0.0.875 → 0.0.876
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,8 +8,41 @@
|
|
|
8
8
|
wide
|
|
9
9
|
size="l"
|
|
10
10
|
theme="warning"
|
|
11
|
-
@click="
|
|
11
|
+
@click="isConfirmOpen = true"
|
|
12
12
|
>{{ t('profile.delete_profile') }}</UiBtn>
|
|
13
|
+
|
|
14
|
+
<transition mode="out-in">
|
|
15
|
+
<UiPopup
|
|
16
|
+
v-if="isConfirmOpen"
|
|
17
|
+
v-model="isConfirmOpen"
|
|
18
|
+
sheet
|
|
19
|
+
>
|
|
20
|
+
<template #title>{{ $t('profile.delete_profile') }}</template>
|
|
21
|
+
|
|
22
|
+
<p class="profile-delete__confirm">{{ $t('confirm_delete_profile') }}</p>
|
|
23
|
+
|
|
24
|
+
<template #footer>
|
|
25
|
+
<div class="profile-delete__buttons">
|
|
26
|
+
<UiBtn
|
|
27
|
+
:disabled="loading"
|
|
28
|
+
wide
|
|
29
|
+
size="l"
|
|
30
|
+
theme="secondary"
|
|
31
|
+
@click="isConfirmOpen = false"
|
|
32
|
+
>{{ $t('cancel') }}
|
|
33
|
+
</UiBtn>
|
|
34
|
+
<UiBtn
|
|
35
|
+
:disabled="loading"
|
|
36
|
+
wide
|
|
37
|
+
size="l"
|
|
38
|
+
theme="warning"
|
|
39
|
+
@click="deleteProfile"
|
|
40
|
+
>{{ $t('yes') }}
|
|
41
|
+
</UiBtn>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
</UiPopup>
|
|
45
|
+
</transition>
|
|
13
46
|
</div>
|
|
14
47
|
</template>
|
|
15
48
|
|
|
@@ -21,12 +54,14 @@ const { signOut } = useUser(AuthorizationApiService);
|
|
|
21
54
|
const { showSuccess } = useSnackbar();
|
|
22
55
|
|
|
23
56
|
const loading = ref(false);
|
|
57
|
+
const isConfirmOpen = ref(false);
|
|
24
58
|
|
|
25
59
|
async function deleteProfile() {
|
|
26
60
|
try {
|
|
27
61
|
loading.value = true;
|
|
28
62
|
await AuthorizationApiService.deleteProfile();
|
|
29
|
-
|
|
63
|
+
isConfirmOpen.value = false;
|
|
64
|
+
showSuccess('profile_deleted');
|
|
30
65
|
signOut();
|
|
31
66
|
} catch (err) {
|
|
32
67
|
console.log(err, 'error delete profile');
|
|
@@ -59,4 +94,20 @@ async function deleteProfile() {
|
|
|
59
94
|
.profile-delete__button {
|
|
60
95
|
height: 50px;
|
|
61
96
|
}
|
|
97
|
+
|
|
98
|
+
.profile-delete__confirm {
|
|
99
|
+
@include font-sm;
|
|
100
|
+
|
|
101
|
+
text-align: center;
|
|
102
|
+
max-width: 400px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.profile-delete__buttons {
|
|
106
|
+
display: grid;
|
|
107
|
+
gap: 8px;
|
|
108
|
+
|
|
109
|
+
@include from-br(sm) {
|
|
110
|
+
grid-template-columns: 1fr 1fr;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
62
113
|
</style>
|
|
@@ -196,7 +196,7 @@ async function deleteAvatar() {
|
|
|
196
196
|
form.value.avatar = '';
|
|
197
197
|
await getProfile(true);
|
|
198
198
|
avatarPreview.value = '';
|
|
199
|
-
showSuccess(
|
|
199
|
+
showSuccess('avatar_deleted');
|
|
200
200
|
} finally {
|
|
201
201
|
deletingAvatar.value = false;
|
|
202
202
|
}
|
package/package.json
CHANGED
package/pages/user/profile.vue
CHANGED
|
@@ -108,16 +108,6 @@ const items = computed<Array<IDataItem>>(() => {
|
|
|
108
108
|
text: data.value.gender?.title ?? '',
|
|
109
109
|
icon: 'double-user'
|
|
110
110
|
},
|
|
111
|
-
{
|
|
112
|
-
title: t('profile.gender'),
|
|
113
|
-
text: data.value.gender?.title ?? '',
|
|
114
|
-
icon: 'double-user'
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
title: t('profile.gender'),
|
|
118
|
-
text: data.value.gender?.title ?? '',
|
|
119
|
-
icon: 'double-user'
|
|
120
|
-
},
|
|
121
111
|
];
|
|
122
112
|
});
|
|
123
113
|
|