@live-change/user-frontend 0.9.60 → 0.9.62

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.
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="w-full lg:w-6/12 md:w-9/12">
3
3
 
4
- <div class="bg-surface-0 dark:bg-surface-900 rounded-border shadow p-6">
4
+ <div class="bg-surface-0 dark:bg-surface-900 rounded-border shadow p-6" v-if="localeSettings">
5
5
  <div class="text-surface-900 dark:text-surface-0 font-medium mb-4 text-xl">Locale settings</div>
6
6
 
7
7
  <command-form service="localeSettings" action="setOrUpdateMyLocaleSettings"
@@ -54,7 +54,7 @@
54
54
  const toast = useToast()
55
55
 
56
56
  import { useI18n } from 'vue-i18n'
57
- const { t, availableLocales, locale, getLocaleMessage } = useI18n()
57
+ const { t, availableLocales, getLocaleMessage } = useI18n()
58
58
 
59
59
  function languageLabel(option) {
60
60
  console.log("LANGUAGE LABEL", option)
@@ -4,8 +4,8 @@
4
4
  <div>
5
5
  <h1>Notifications settings</h1>
6
6
  </div>
7
- <pre>{{ settings }}</pre>
8
- <pre>{{ clientConfig }}</pre>
7
+ <!-- <pre>{{ settings }}</pre>
8
+ <pre>{{ clientConfig }}</pre> -->
9
9
  <div v-for="notificationType in settings">
10
10
  <div>
11
11
  <h2>{{ t(`notifications.types.${notificationType.type}.name`) }}</h2>
@@ -8,15 +8,18 @@
8
8
 
9
9
  <SettingsMenuItem name="user:identification" icon="id-card" label="Identification" class="hidden md:block" />
10
10
 
11
- <SettingsMenuItem v-if="client.user" name="user:settings" icon="cog" label="General Settings" class="hidden md:block" />
11
+ <SettingsMenuItem v-if="client.user"
12
+ name="user:settings" icon="cog" label="General Settings" class="hidden md:block" />
12
13
 
13
- <SettingsMenuItem name="user:locale" icon="language" label="Language and Locale" class="hidden md:block" />
14
+ <SettingsMenuItem v-if="(availableLocales?.length ?? 0) > 1"
15
+ name="user:locale" icon="language" label="Language and Locale" class="hidden md:block" />
14
16
 
15
- <SettingsMenuItem name="user:notificationsSettings" icon="exclamation-circle" label="Notifications" />
17
+ <SettingsMenuItem v-if="clientConfig.notifications?.length"
18
+ name="user:notificationsSettings" icon="exclamation-circle" label="Notifications" />
16
19
 
17
20
  </ul>
18
21
 
19
- <ul v-if="client.user" class="list-none p-2 m-0 border-t border-surface">
22
+ <ul v-if="client.user" class="list-none p-2 m-0 border-t border-surface">
20
23
  <li>
21
24
  <div class="p-4 text-surface-500 dark:text-surface-300 font-medium">AUTHORIZATION</div>
22
25
  </li>
@@ -34,39 +37,6 @@
34
37
  </ul>
35
38
  </div>
36
39
 
37
- <!-- <div class="p-2 mt-auto border-t border-surface">
38
- <ul class="list-none p-2 m-0 hidden origin-bottom animate-duration-150">
39
- <li>
40
- <a v-ripple class="flex align-items-center cursor-pointer p-3 text-700 hover:surface-100
41
- border-round transition-colors transition-duration-150 p-ripple">
42
- <i class="pi pi-user mr-2"></i>
43
- <span class="font-medium">Profile</span>
44
- </a>
45
- </li>
46
- <li>
47
- <a v-ripple class="flex align-items-center cursor-pointer p-3 text-700 hover:surface-100
48
- border-round transition-colors transition-duration-150 p-ripple">
49
- <i class="pi pi-cog mr-2"></i>
50
- <span class="font-medium">Settings</span>
51
- </a>
52
- </li>
53
- <li>
54
- <a v-ripple class="flex align-items-center cursor-pointer p-3 text-700 hover:surface-100
55
- border-round transition-colors transition-duration-150 p-ripple">
56
- <i class="pi pi-sign-out mr-2"></i>
57
- <span class="font-medium">Sign Out</span>
58
- </a>
59
- </li>
60
- </ul>
61
- <a v-ripple class="p-3 flex align-items-center cursor-pointer text-700 hover:surface-100
62
- border-round transition-colors transition-duration-150 p-ripple"
63
- v-styleclass="{ selector: '@prev', enterFromClass: 'hidden', enterActiveClass: 'animate-scalein',
64
- leaveToClass: 'hidden', leaveActiveClass: 'animate-fadeout' }">
65
- <img src="/images/empty-user-photo.svg" class="mr-2 rounded-full" style="width: 28px; height: 28px"/>
66
- <span class="font-medium">Amy Elsner</span>
67
- <i class="pi pi-chevron-up ml-auto"></i>
68
- </a>
69
- </div>-->
70
40
  </div>
71
41
  </template>
72
42
 
@@ -76,10 +46,16 @@
76
46
  import { useRoute } from 'vue-router'
77
47
  const route = useRoute()
78
48
 
79
- import { client as useClient } from '@live-change/vue3-ssr'
49
+ import { useApi, useClient } from '@live-change/vue3-ssr'
80
50
 
51
+ const api = useApi()
81
52
  const client = useClient()
82
53
 
54
+ const clientConfig = api.getServiceDefinition('notification')?.clientConfig
55
+
56
+ import { useI18n } from 'vue-i18n'
57
+ const { t, availableLocales } = useI18n()
58
+
83
59
  </script>
84
60
 
85
61
  <style scoped>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-frontend",
3
- "version": "0.9.60",
3
+ "version": "0.9.62",
4
4
  "scripts": {
5
5
  "memDev": "node --inspect --expose-gc server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "rm tmp.db; node server/start.js localDev --enableSessions --initScript ./init.js",
@@ -22,29 +22,29 @@
22
22
  },
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@live-change/cli": "^0.9.60",
26
- "@live-change/dao": "^0.9.60",
27
- "@live-change/dao-vue3": "^0.9.60",
28
- "@live-change/dao-websocket": "^0.9.60",
29
- "@live-change/email-service": "^0.9.60",
30
- "@live-change/framework": "^0.9.60",
31
- "@live-change/identicon-service": "^0.9.60",
32
- "@live-change/image-frontend": "^0.9.60",
33
- "@live-change/message-authentication-service": "^0.9.60",
34
- "@live-change/notification-service": "^0.9.60",
35
- "@live-change/password-authentication-service": "^0.9.60",
36
- "@live-change/pattern": "^0.9.60",
37
- "@live-change/secret-code-service": "^0.9.60",
38
- "@live-change/secret-link-service": "^0.9.60",
39
- "@live-change/security-frontend": "^0.9.60",
40
- "@live-change/security-service": "^0.9.60",
41
- "@live-change/session-service": "^0.9.60",
42
- "@live-change/timer-service": "^0.9.60",
43
- "@live-change/upload-service": "^0.9.60",
44
- "@live-change/user-identification-service": "^0.9.60",
45
- "@live-change/user-service": "^0.9.60",
46
- "@live-change/vue3-components": "^0.9.60",
47
- "@live-change/vue3-ssr": "^0.9.60",
25
+ "@live-change/cli": "^0.9.62",
26
+ "@live-change/dao": "^0.9.62",
27
+ "@live-change/dao-vue3": "^0.9.62",
28
+ "@live-change/dao-websocket": "^0.9.62",
29
+ "@live-change/email-service": "^0.9.62",
30
+ "@live-change/framework": "^0.9.62",
31
+ "@live-change/identicon-service": "^0.9.62",
32
+ "@live-change/image-frontend": "^0.9.62",
33
+ "@live-change/message-authentication-service": "^0.9.62",
34
+ "@live-change/notification-service": "^0.9.62",
35
+ "@live-change/password-authentication-service": "^0.9.62",
36
+ "@live-change/pattern": "^0.9.62",
37
+ "@live-change/secret-code-service": "^0.9.62",
38
+ "@live-change/secret-link-service": "^0.9.62",
39
+ "@live-change/security-frontend": "^0.9.62",
40
+ "@live-change/security-service": "^0.9.62",
41
+ "@live-change/session-service": "^0.9.62",
42
+ "@live-change/timer-service": "^0.9.62",
43
+ "@live-change/upload-service": "^0.9.62",
44
+ "@live-change/user-identification-service": "^0.9.62",
45
+ "@live-change/user-service": "^0.9.62",
46
+ "@live-change/vue3-components": "^0.9.62",
47
+ "@live-change/vue3-ssr": "^0.9.62",
48
48
  "@vueuse/core": "^12.3.0",
49
49
  "codeceptjs-assert": "^0.0.5",
50
50
  "codeceptjs-video-helper": "0.1.3",
@@ -65,7 +65,7 @@
65
65
  "wtfnode": "^0.9.1"
66
66
  },
67
67
  "devDependencies": {
68
- "@live-change/codeceptjs-helper": "^0.9.60",
68
+ "@live-change/codeceptjs-helper": "^0.9.62",
69
69
  "codeceptjs": "^3.6.10",
70
70
  "generate-password": "1.7.1",
71
71
  "playwright": "1.49.1",
@@ -76,5 +76,5 @@
76
76
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
77
77
  "license": "BSD-3-Clause",
78
78
  "description": "",
79
- "gitHead": "8420ad3852216027b648c31f3c908a7b5e6f4292"
79
+ "gitHead": "b1b605b7f1fa4fc3de4720afbb401e2cfff080cf"
80
80
  }