@frigear-nu/account 0.3.0 → 0.4.0

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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@frigear-nu/account",
3
3
  "configKey": "account",
4
- "version": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "unknown"
@@ -17,7 +17,7 @@ const sessions = computed(() => data.value ?? []);
17
17
  async function signOut(session) {
18
18
  const confirmed = await confirm({
19
19
  title: t("signOutConfirm.title", "Sign out of {name}?", { name: session.application.name }),
20
- description: t("signOutConfirm.description", "The application has to ask you to sign in again. Your account and its data are not affected."),
20
+ description: t("signOutConfirm.description", "{name} is signed out on every device and has to ask you to sign in again. Your account and its data are not affected.", { name: session.application.name }),
21
21
  confirmText: t("signOut", "Sign out of app"),
22
22
  destructive: true
23
23
  });
@@ -46,6 +46,10 @@ async function signOutAll() {
46
46
  showError(e, t("signOutAllError", "Could not sign out of the applications."));
47
47
  }
48
48
  }
49
+ function activity(session) {
50
+ const params = { signedIn: format.date(session.signedInAt), lastActive: format.dateTime(session.lastActiveAt), count: session.sessions };
51
+ return session.sessions > 1 ? t("activityMany", "Signed in {signedIn} \xB7 last active {lastActive} \xB7 {count} active sign-ins", params) : t("activity", "Signed in {signedIn} \xB7 last active {lastActive}", params);
52
+ }
49
53
  const menu = (session) => [[
50
54
  { label: t("signOut", "Sign out of app"), icon: "i-lucide-log-out", color: "error", onSelect: () => signOut(session) }
51
55
  ]];
@@ -54,7 +58,7 @@ const menu = (session) => [[
54
58
  <template>
55
59
  <SectionCard
56
60
  :title="t('title', 'Signed-in apps')"
57
- :description="t('description', 'Applications that signed in with your account. Changing your password or email signs them all out.')"
61
+ :description="t('description', 'Apps you signed in to with your account. Signing out of an app ends its access on every device. Changing your password or email signs them all out.')"
58
62
  :loading="loading"
59
63
  flush
60
64
  >
@@ -88,7 +92,7 @@ const menu = (session) => [[
88
92
  {{ session.application.name }}
89
93
  </p>
90
94
  <p class="text-sm text-muted">
91
- {{ t("activity", "Signed in {signedIn} \xB7 last active {lastActive}", { signedIn: format.date(session.signedInAt), lastActive: format.dateTime(session.lastActiveAt) }) }}
95
+ {{ activity(session) }}
92
96
  </p>
93
97
  </div>
94
98
  <RowMenu
@@ -1,7 +1,9 @@
1
- declare var __VLS_29: {};
2
- type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_29) => any;
1
+ declare const __VLS_template: () => {
2
+ __VLS_Slots: {
3
+ default?: (props: {}) => any;
4
+ };
4
5
  };
6
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
5
7
  declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
8
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
9
  declare const _default: typeof __VLS_export;
@@ -1,7 +1,9 @@
1
- declare var __VLS_29: {};
2
- type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_29) => any;
1
+ declare const __VLS_template: () => {
2
+ __VLS_Slots: {
3
+ default?: (props: {}) => any;
4
+ };
4
5
  };
6
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
5
7
  declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
8
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
9
  declare const _default: typeof __VLS_export;
@@ -138,12 +138,13 @@
138
138
  },
139
139
  "signedInApps": {
140
140
  "title": "Apps, der er logget ind",
141
- "description": "Applikationer, der er logget ind med din konto. Når du ændrer adgangskode eller e-mail, logges de alle ud.",
141
+ "description": "Apps, du er logget ind i med din konto. Når du logger ud af en app, mister den adgangen på alle enheder. Når du ændrer adgangskode eller e-mail, logges de alle ud.",
142
142
  "activity": "Logget ind {signedIn} · sidst aktiv {lastActive}",
143
+ "activityMany": "Logget ind {signedIn} · sidst aktiv {lastActive} · {count} aktive logins",
143
144
  "signOut": "Log ud af app",
144
145
  "signOutConfirm": {
145
146
  "title": "Log ud af {name}?",
146
- "description": "Applikationen skal bede dig logge ind igen. Din konto og dens data påvirkes ikke."
147
+ "description": "{name} logges ud på alle enheder og skal bede dig logge ind igen. Din konto og dens data påvirkes ikke."
147
148
  },
148
149
  "signedOut": "Logget ud.",
149
150
  "signOutError": "Kunne ikke logge ud af applikationen.",
@@ -138,12 +138,13 @@
138
138
  },
139
139
  "signedInApps": {
140
140
  "title": "Signed-in apps",
141
- "description": "Applications that signed in with your account. Changing your password or email signs them all out.",
141
+ "description": "Apps you signed in to with your account. Signing out of an app ends its access on every device. Changing your password or email signs them all out.",
142
142
  "activity": "Signed in {signedIn} · last active {lastActive}",
143
+ "activityMany": "Signed in {signedIn} · last active {lastActive} · {count} active sign-ins",
143
144
  "signOut": "Sign out of app",
144
145
  "signOutConfirm": {
145
146
  "title": "Sign out of {name}?",
146
- "description": "The application has to ask you to sign in again. Your account and its data are not affected."
147
+ "description": "{name} is signed out on every device and has to ask you to sign in again. Your account and its data are not affected."
147
148
  },
148
149
  "signedOut": "Signed out.",
149
150
  "signOutError": "Could not sign out of the application.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frigear-nu/account",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "A module for managing the account area (profile, email, password, security) in the main frigear app.",
5
5
  "homepage": "https://docs.frigear.dev/modules/identity/account",
6
6
  "repository": {
@@ -24,23 +24,23 @@
24
24
  "playground"
25
25
  ],
26
26
  "dependencies": {
27
+ "@frigear-nu/auth": "^0.4.0",
27
28
  "@frigear-nu/module-kit": "^1.3.4",
28
- "@frigear-nu/auth": "^0.3.4",
29
29
  "@frigear-nu/ui": "^0.2.5",
30
- "@frigear-nu/users": "^1.3.0",
30
+ "@frigear-nu/users": "^2.0.0",
31
31
  "@libsql/client": "^0.18.0",
32
- "@nuxt/kit": "^4.6.1",
32
+ "@nuxt/kit": "^4.6.4",
33
33
  "@vueuse/core": "^15.0.0",
34
34
  "drizzle-kit": "^0.31.11",
35
- "drizzle-orm": "^0.45.3",
36
- "zod": "^4.6.5"
35
+ "drizzle-orm": "^0.45.4",
36
+ "zod": "^4.6.7"
37
37
  },
38
38
  "peerDependencies": {
39
- "@frigear-nu/authorization": "^0.3.2",
39
+ "@frigear-nu/authorization": "^0.4.0",
40
40
  "@frigear-nu/menu": "^0.2.4",
41
41
  "@frigear-nu/widget": "^0.2.4",
42
42
  "@nuxt/ui": "^4.12.0",
43
- "@nuxthub/core": "^0.10.8"
43
+ "@nuxthub/core": "^0.10.12"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "@frigear-nu/authorization": {
@@ -57,23 +57,23 @@
57
57
  }
58
58
  },
59
59
  "devDependencies": {
60
- "@frigear-nu/authorization": "^0.3.2",
60
+ "@frigear-nu/authorization": "^0.4.0",
61
61
  "@frigear-nu/menu": "^0.2.4",
62
62
  "@frigear-nu/widget": "^0.2.4",
63
- "@nuxt/devtools": "^3.4.2",
63
+ "@nuxt/devtools": "^4.1.0",
64
64
  "@nuxt/eslint-config": "^1.17.0",
65
65
  "@nuxt/module-builder": "^1.0.3",
66
- "@nuxt/schema": "^4.6.1",
67
- "@nuxt/test-utils": "^4.3.2",
66
+ "@nuxt/schema": "^4.6.4",
67
+ "@nuxt/test-utils": "^4.3.4",
68
68
  "@nuxt/ui": "^4.12.0",
69
- "@nuxthub/core": "^0.10.8",
70
- "@types/node": "^26.6.5",
69
+ "@nuxthub/core": "^0.10.12",
70
+ "@types/node": "^26.6.6",
71
71
  "changelogen": "^0.6.2",
72
- "eslint": "^10.12.0",
73
- "nuxt": "^4.6.1",
72
+ "eslint": "^10.14.0",
73
+ "nuxt": "^4.6.4",
74
74
  "typescript": "^6.0.3",
75
- "vitest": "^5.0.2",
76
- "vue-tsc": "^3.3.11"
75
+ "vitest": "^5.1.0",
76
+ "vue-tsc": "^3.3.14"
77
77
  },
78
78
  "scripts": {
79
79
  "dev:stub": "nuxt-module-build build --stub && nuxt prepare",