@live-change/user-frontend 0.8.5 → 0.8.7

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.
@@ -6,7 +6,7 @@
6
6
  <div class="text-900 text-3xl font-medium mb-3">Delete account</div>
7
7
  </div>
8
8
 
9
- <div>
9
+ <div v-if="client.user">
10
10
  <p>
11
11
  Account deletion is irreversible, check the box below only if you are
12
12
  100% sure that you want to delete your account.
@@ -19,6 +19,9 @@
19
19
  <Button id="delete" label="Delete account" icon="pi pi-user-minus" class="p-button-lg"
20
20
  :disabled="!wantDelete" @click="deleteUser" />
21
21
  </div>
22
+ <div v-else>
23
+ Account already deleted.
24
+ </div>
22
25
  </div>
23
26
  </div>
24
27
  </template>
@@ -31,6 +34,8 @@
31
34
  import { inject, ref } from 'vue'
32
35
  import { useRouter } from 'vue-router'
33
36
  const router = useRouter()
37
+ import { useClient } from '@live-change/vue3-ssr'
38
+ const client = useClient()
34
39
 
35
40
  const workingZone = inject('workingZone')
36
41
 
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <a v-ripple
3
- @click="showUserMenu"
4
- class="static w-auto w-full surface-overlay left-0 top-100 z-1 shadow-none p-ripple">
3
+ v-styleclass="{ selector: '@next', enterClass: 'hidden', leaveToClass: 'hidden', hideOnOutsideClick: true }"
4
+ class="relative w-auto left-0 top-100 z-1 shadow-none p-ripple border-circle">
5
5
  <ul class="list-none p-0 m-0 flex align-items-center select-none flex-row border-top-none">
6
6
  <li class="border-top-none">
7
- <span class="flex p-0 px-3 align-items-center hover:surface-100 font-medium border-round
7
+ <span class="flex p-0 align-items-center hover:surface-100 font-medium border-round
8
8
  cursor-pointer transition-colors transition-duration-150 p-ripple">
9
9
  <Image v-if="myIdentification?.image" :image="myIdentification.image"
10
10
  class="mr-0 border-circle border-1 surface-border" style="width: 38px; height: 38px" />
@@ -16,7 +16,9 @@
16
16
  </li>
17
17
  </ul>
18
18
  </a>
19
- <OverlayPanel v-if="isMounted" ref="overlayPanel" class="notifications-panel">
19
+ <div class="align-items-center flex-grow-1 justify-content-between hidden absolute w-full md:w-auto surface-overlay
20
+ right-0 top-100 z-1 shadow-2">
21
+ <!-- <OverlayPanel v-if="isMounted" ref="overlayPanel" class="notifications-panel">-->
20
22
  <loading-zone suspense>
21
23
  <template v-slot:loading>
22
24
  <div class="flex align-items-center justify-content-center top-0 left-0 notifications-loading">
@@ -38,17 +40,16 @@
38
40
  </working-zone>
39
41
  </template>
40
42
  </loading-zone>
41
- </OverlayPanel>
43
+ <!-- </OverlayPanel>-->
44
+ </div>
42
45
  </template>
43
46
 
44
47
  <script setup>
45
48
  import { Image } from "@live-change/image-frontend"
46
- import OverlayPanel from 'primevue/overlaypanel'
47
49
  import ProgressSpinner from "primevue/progressspinner"
48
50
  import UserMenu from "./UserMenu.vue"
49
51
 
50
52
  import { ref, computed, onMounted } from 'vue'
51
- const overlayPanel = ref()
52
53
 
53
54
  const isMounted = ref(false)
54
55
  onMounted(() => isMounted.value = true)
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <ul class="list-none p-0 m-0 flex lg:align-items-center select-none flex-column flex-row">
2
+ <ul class="list-none p-0 m-0 flex select-none flex-column flex-row">
3
3
  <li>
4
4
  <router-link :to="{ name: 'user:identification' }"
5
5
  v-ripple
6
- class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center text-600 hover:text-900 hover:surface-100
6
+ class="flex px-6 py-2 align-items-center text-600 hover:text-900 hover:surface-100
7
7
  font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple no-underline"
8
8
  >
9
9
  <i class="pi pi-user mr-2"></i>
@@ -13,7 +13,7 @@
13
13
  <li v-if="!client.user">
14
14
  <router-link :to="{ name: 'user:signUp' }"
15
15
  v-ripple
16
- class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center text-600 hover:text-900 hover:surface-100
16
+ class="flex px-6 py-2 align-items-center text-600 hover:text-900 hover:surface-100
17
17
  font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple no-underline"
18
18
  >
19
19
  <i class="pi pi-user-plus mr-2"></i>
@@ -23,7 +23,7 @@
23
23
  <li v-if="!client.user">
24
24
  <router-link :to="{ name: 'user:signIn' }"
25
25
  v-ripple
26
- class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center text-600 hover:text-900 hover:surface-100
26
+ class="flex px-6 py-2 align-items-center text-600 hover:text-900 hover:surface-100
27
27
  font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple no-underline"
28
28
  >
29
29
  <i class="pi pi-key mr-2"></i>
@@ -33,7 +33,7 @@
33
33
  <li v-if="client.user">
34
34
  <router-link :to="{ name: 'user:settings' }"
35
35
  v-ripple
36
- class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center text-600 hover:text-900 hover:surface-100
36
+ class="flex px-6 py-2 align-items-center text-600 hover:text-900 hover:surface-100
37
37
  font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple no-underline"
38
38
  >
39
39
  <i class="pi pi-cog mr-2"></i>
@@ -43,7 +43,7 @@
43
43
  <li v-if="client.user">
44
44
  <router-link :to="{ name: 'user:signOut' }"
45
45
  v-ripple
46
- class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center text-600 hover:text-900 hover:surface-100
46
+ class="flex px-6 py-2 align-items-center text-600 hover:text-900 hover:surface-100
47
47
  font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple no-underline"
48
48
  >
49
49
  <i class="pi pi-power-off mr-2"></i>
@@ -11,7 +11,6 @@
11
11
 
12
12
  <script setup>
13
13
  import Button from "primevue/button"
14
- import Menu from "primevue/menu"
15
14
 
16
15
  import { useToast } from 'primevue/usetoast'
17
16
  import { useConfirm } from 'primevue/useconfirm'
@@ -20,6 +19,8 @@
20
19
 
21
20
  import { actions } from "@live-change/vue3-ssr"
22
21
 
22
+ import { inject, defineProps, defineExpose } from "vue"
23
+
23
24
  const { notification } = defineProps({
24
25
  notification: {
25
26
  type: Object,
@@ -27,8 +28,6 @@
27
28
  }
28
29
  })
29
30
 
30
- import { inject } from "vue"
31
-
32
31
  const workingZone = inject('workingZone')
33
32
 
34
33
  const notificationApi = actions().notification
@@ -63,6 +62,10 @@
63
62
  })())
64
63
  }
65
64
 
65
+ defineExpose({
66
+ markRead, markUnread, deleteNotification
67
+ })
68
+
66
69
  </script>
67
70
 
68
71
  <style scoped>
@@ -1,14 +1,15 @@
1
1
  <template>
2
2
  <a v-if="unreadNotificationsCount"
3
3
  v-ripple
4
- @click="showNotifications"
5
- class="flex mx-2 px-3 p-3 py-3 align-items-center text-600 hover:text-900 hover:surface-100
4
+ v-styleclass="{ selector: '@next', enterClass: 'hidden', leaveToClass: 'hidden', hideOnOutsideClick: true }"
5
+ class="flex mx-0 px-3 p-3 py-3 align-items-center text-600 hover:text-900 hover:surface-100 overflow-visible
6
6
  font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple">
7
7
  <i class="pi pi-bell text-base text-2xl p-overlay-badge">
8
8
  <Badge v-if="unreadNotificationsCount?.count" :value="unreadNotificationsCount?.count ?? 0"></Badge>
9
9
  </i>
10
10
  </a>
11
- <OverlayPanel v-if="isMounted" ref="overlayPanel" class="notifications-panel">
11
+ <div class="align-items-center flex-grow-1 justify-content-between hidden absolute w-full md:w-auto surface-overlay
12
+ right-0 top-100 z-1 shadow-2 overflow-x-hidden overflow-y-auto" style="max-height: calc(100vh - 8rem)">
12
13
  <loading-zone suspense>
13
14
  <template v-slot:loading>
14
15
  <div class="flex align-items-center justify-content-center top-0 left-0 notifications-loading">
@@ -30,21 +31,18 @@
30
31
  </working-zone>
31
32
  </template>
32
33
  </loading-zone>
33
- </OverlayPanel>
34
+ </div>
34
35
  </template>
35
36
 
36
37
  <script setup>
37
38
 
38
39
  import Badge from "primevue/badge"
39
- import OverlayPanel from 'primevue/overlaypanel'
40
40
  import ProgressSpinner from "primevue/progressspinner"
41
41
 
42
42
  import NotificationsList from "./NotificationsList.vue"
43
43
 
44
44
  import { ref, onMounted } from 'vue'
45
45
 
46
- const overlayPanel = ref()
47
-
48
46
  const isMounted = ref(false)
49
47
  onMounted(() => isMounted.value = true)
50
48
 
@@ -41,7 +41,7 @@
41
41
 
42
42
  const workingZone = inject('workingZone')
43
43
 
44
- import {notificationTypes} from "./notificationTypes.js"
44
+ import { notificationTypes } from "./notificationTypes.js"
45
45
 
46
46
  import NotificationButtons from "./NotificationButtons.vue"
47
47
 
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <li class="px-3 py-2 flex align-items-start
3
- justify-content-between flex-column hover:surface-100">
2
+ <li :class="['px-3 py-2 flex align-items-start justify-content-between flex-column',
3
+ notification.readState === 'new' ? 'surface-0 hover:surface-100' : 'surface-100 hover:surface-200'] ">
4
4
  <slot></slot>
5
5
  <span class="block text-500 font-medium mt-2">
6
6
  {{ DateTime.fromISO(notification.time).toRelative({ base: DateTime.fromMillis(now) }) }}
@@ -8,4 +8,4 @@ export const notificationTypes = {
8
8
  example_TestNotification: {
9
9
  component: TestNotification
10
10
  }
11
- }
11
+ }
@@ -17,7 +17,7 @@
17
17
  <div class="p-field mb-3" v-if="passwordExists">
18
18
  <label for="currentPassword" class="block text-900 font-medium mb-2">Current password</label>
19
19
  <Password id="currentPassword" class="w-full" inputClass="w-full"
20
- v-model:masked="masked"
20
+ toggle-mask v-model:masked="masked"
21
21
  :class="{ 'p-invalid': data.currentPasswordHashError }"
22
22
  v-model="data.currentPasswordHash" />
23
23
  <small id="currentPassword-help" class="p-error">{{ data.currentPasswordHashError }}</small>
@@ -26,7 +26,7 @@
26
26
  <div class="p-field mb-3">
27
27
  <label for="newPassword" class="block text-900 font-medium mb-2">New password</label>
28
28
  <Password id="newPassword" class="w-full" inputClass="w-full"
29
- v-model:masked="masked"
29
+ toggle-mask v-model:masked="masked"
30
30
  :class="{ 'p-invalid': data.passwordHashError }"
31
31
  v-model="data.passwordHash">
32
32
  <template #footer>
@@ -46,7 +46,7 @@
46
46
  <div class="p-field mb-3">
47
47
  <label for="reenterPassword" class="block text-900 font-medium mb-2">Re-enter password</label>
48
48
  <Password id="reenterPassword" class="w-full" inputClass="w-full"
49
- v-model:masked="masked"
49
+ toggle-mask v-model:masked="masked"
50
50
  v-model="secondPassword"
51
51
  :feedback="false" />
52
52
  </div>
@@ -65,12 +65,9 @@
65
65
 
66
66
  <script setup>
67
67
 
68
- import InputText from "primevue/inputtext"
69
- import Checkbox from "primevue/checkbox"
70
68
  import Button from "primevue/button"
71
69
  import Divider from "primevue/divider"
72
- import Password from "primevue/password"
73
- import SettingsTabs from "../SettingsTabs.vue"
70
+ import Password from "./Password.vue"
74
71
 
75
72
  import { live, path } from '@live-change/vue3-ssr'
76
73
  import { computed, ref, onMounted } from 'vue'
@@ -26,8 +26,17 @@
26
26
  {{ infoText }}
27
27
  </span>
28
28
  <Portal :appendTo="appendTo">
29
- <transition name="p-connected-overlay" @enter="onOverlayEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave">
30
- <div v-if="overlayVisible" :ref="overlayRef" :id="panelId || panelUniqueId" :class="panelStyleClass" :style="panelStyle" @click="onOverlayClick" v-bind="panelProps">
29
+ <transition name="p-connected-overlay"
30
+ @enter="onOverlayEnter"
31
+ @leave="onOverlayLeave"
32
+ @after-leave="onOverlayAfterLeave">
33
+ <div v-if="overlayVisible"
34
+ :ref="overlayRef"
35
+ :id="panelId || panelUniqueId"
36
+ :class="panelStyleClass"
37
+ :style="panelStyle"
38
+ @click="onOverlayClick"
39
+ v-bind="panelProps">
31
40
  <slot name="header"></slot>
32
41
  <slot name="content">
33
42
  <div class="p-password-meter">
@@ -495,4 +504,11 @@ export default {
495
504
  .p-password-input::-ms-clear {
496
505
  display: none;
497
506
  }
507
+
508
+ .p-password i {
509
+ position: absolute;
510
+ top: 0.69em;
511
+ top: calc(50% - 0.5em);
512
+ right: 1em
513
+ }
498
514
  </style>
@@ -8,7 +8,7 @@
8
8
 
9
9
  <SettingsMenuItem name="user:identification" icon="id-card" label="Identification" class="hidden md:block" />
10
10
 
11
- <SettingsMenuItem name="user:settings" icon="id-card" label="General Settings" class="hidden md:block" />
11
+ <SettingsMenuItem v-if="client.user" name="user:settings" icon="id-card" label="General Settings" class="hidden md:block" />
12
12
 
13
13
  <!-- <SettingsMenuItem name="user:notificationsSettings" icon="exclamation-circle" label="Notifications" />-->
14
14
 
@@ -19,15 +19,15 @@
19
19
  <div class="p-3 text-500 font-medium">AUTHORIZATION</div>
20
20
  </li>
21
21
 
22
- <SettingsMenuItem name="user:connected" icon="users" label="Connected Accounts" />
22
+ <SettingsMenuItem v-if="client.user" name="user:connected" icon="users" label="Connected Accounts" />
23
23
 
24
- <SettingsMenuItem name="user:changePassword" icon="key" label="Change Password" />
24
+ <SettingsMenuItem v-if="client.user" name="user:changePassword" icon="key" label="Change Password" />
25
25
 
26
26
  </ul>
27
27
 
28
28
  <ul class="list-none p-2 m-0 border-top-1 surface-border">
29
29
 
30
- <SettingsMenuItem name="user:delete" icon="trash" label="Delete Account" />
30
+ <SettingsMenuItem v-if="client.user" name="user:delete" icon="trash" label="Delete Account" />
31
31
 
32
32
  </ul>
33
33
  </div>
@@ -74,6 +74,10 @@
74
74
  import { useRoute } from 'vue-router'
75
75
  const route = useRoute()
76
76
 
77
+ import { client as useClient } from '@live-change/vue3-ssr'
78
+
79
+ const client = useClient()
80
+
77
81
  </script>
78
82
 
79
83
  <style scoped>
@@ -61,7 +61,7 @@
61
61
  import Checkbox from "primevue/checkbox"
62
62
  import Button from "primevue/button"
63
63
  import Divider from "primevue/divider"
64
- import Password from "primevue/password"
64
+ import Password from "../password/Password.vue"
65
65
 
66
66
  import { onMounted, ref } from 'vue'
67
67
  const isMounted = ref(false)
@@ -75,12 +75,9 @@
75
75
 
76
76
  <script setup>
77
77
 
78
- import InputText from "primevue/inputtext"
79
- import Checkbox from "primevue/checkbox"
80
78
  import Button from "primevue/button"
81
79
  import Divider from "primevue/divider"
82
80
  import Password from "../password/Password.vue"
83
- import SettingsTabs from "../SettingsTabs.vue"
84
81
 
85
82
  import { live, path } from '@live-change/vue3-ssr'
86
83
  import { computed, ref, onMounted } from 'vue'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-frontend",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
4
4
  "scripts": {
5
5
  "memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
@@ -21,29 +21,29 @@
21
21
  },
22
22
  "type": "module",
23
23
  "dependencies": {
24
- "@live-change/cli": "^0.8.5",
25
- "@live-change/dao": "^0.8.5",
26
- "@live-change/dao-vue3": "0.8.2",
27
- "@live-change/dao-websocket": "0.8.2",
28
- "@live-change/email-service": "0.8.2",
29
- "@live-change/framework": "0.8.2",
30
- "@live-change/identicon-service": "0.8.2",
31
- "@live-change/image-frontend": "^0.8.5",
32
- "@live-change/message-authentication-service": "0.8.2",
33
- "@live-change/notification-service": "0.8.2",
34
- "@live-change/password-authentication-service": "0.8.2",
35
- "@live-change/pattern": "0.8.2",
36
- "@live-change/secret-code-service": "0.8.2",
37
- "@live-change/secret-link-service": "0.8.2",
38
- "@live-change/security-frontend": "^0.8.5",
39
- "@live-change/security-service": "0.8.2",
40
- "@live-change/session-service": "0.8.2",
41
- "@live-change/timer-service": "0.8.2",
42
- "@live-change/upload-service": "0.8.2",
43
- "@live-change/user-identification-service": "0.8.2",
44
- "@live-change/user-service": "0.8.2",
45
- "@live-change/vue3-components": "0.8.2",
46
- "@live-change/vue3-ssr": "0.8.2",
24
+ "@live-change/cli": "^0.8.7",
25
+ "@live-change/dao": "^0.8.7",
26
+ "@live-change/dao-vue3": "^0.8.7",
27
+ "@live-change/dao-websocket": "^0.8.7",
28
+ "@live-change/email-service": "^0.8.7",
29
+ "@live-change/framework": "^0.8.7",
30
+ "@live-change/identicon-service": "^0.8.7",
31
+ "@live-change/image-frontend": "^0.8.7",
32
+ "@live-change/message-authentication-service": "^0.8.7",
33
+ "@live-change/notification-service": "^0.8.7",
34
+ "@live-change/password-authentication-service": "^0.8.7",
35
+ "@live-change/pattern": "^0.8.7",
36
+ "@live-change/secret-code-service": "^0.8.7",
37
+ "@live-change/secret-link-service": "^0.8.7",
38
+ "@live-change/security-frontend": "^0.8.7",
39
+ "@live-change/security-service": "^0.8.7",
40
+ "@live-change/session-service": "^0.8.7",
41
+ "@live-change/timer-service": "^0.8.7",
42
+ "@live-change/upload-service": "^0.8.7",
43
+ "@live-change/user-identification-service": "^0.8.7",
44
+ "@live-change/user-service": "^0.8.7",
45
+ "@live-change/vue3-components": "^0.8.7",
46
+ "@live-change/vue3-ssr": "^0.8.7",
47
47
  "@vueuse/core": "^10.7.2",
48
48
  "codeceptjs-assert": "^0.0.5",
49
49
  "codeceptjs-video-helper": "0.1.3",
@@ -64,7 +64,7 @@
64
64
  "wtfnode": "^0.9.1"
65
65
  },
66
66
  "devDependencies": {
67
- "@live-change/codeceptjs-helper": "0.8.2",
67
+ "@live-change/codeceptjs-helper": "^0.8.7",
68
68
  "codeceptjs": "^3.5.12",
69
69
  "generate-password": "1.7.1",
70
70
  "playwright": "^1.41.2",
@@ -75,5 +75,5 @@
75
75
  "author": "",
76
76
  "license": "BSD-3-Clause",
77
77
  "description": "",
78
- "gitHead": "40f20811c2b0b4f9f99cd079dc570053d94869e3"
78
+ "gitHead": "b00392ddc91b273e8e7b6d2bdf543f8fe0aec0ca"
79
79
  }