@jskit-ai/workspaces-web 0.2.16 → 0.2.18
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/CHANGELOG.md +5 -0
- package/fixtures/role-labels/main.js +3 -2
- package/fixtures/workspaces-components/main.js +3 -2
- package/fixtures/workspaces-landing/main.js +3 -2
- package/package.json +12 -10
- package/patterns/workspace-surfaces/example/packages/main/src/client/components/AccountPendingInvitesCue.vue +1 -2
- package/patterns/workspace-surfaces/example/src/components/WorkspaceNotFoundCard.vue +5 -6
- package/patterns/workspace-surfaces/example/src/pages/admin/workspace/settings/index.vue +5 -12
- package/patterns/workspace-surfaces/example/src/pages/admin/workspace/settings.vue +24 -72
- package/patterns/workspace-surfaces/example/src/surfaces/admin/index.vue +3 -4
- package/patterns/workspace-surfaces/example/src/surfaces/app/index.vue +3 -3
- package/src/client/components/AccountSettingsInvitesSection.vue +6 -17
- package/src/client/components/MembersAdminClientElement.vue +13 -14
- package/src/client/components/WorkspaceInviteLanding.vue +12 -17
- package/src/client/components/WorkspaceMembersClientElement.vue +1 -7
- package/src/client/components/WorkspaceMembersMenuItem.vue +1 -2
- package/src/client/components/WorkspaceSelector.vue +2 -9
- package/src/client/components/WorkspaceSettingsMenuItem.vue +1 -2
- package/src/client/components/WorkspacesClientElement.vue +14 -31
- package/src/client/lib/profileSurfaceMenuLinks.js +4 -10
- package/test/profileSurfaceMenuLinks.test.js +1 -2
- package/test/roleLabels.browser.test.js +2 -1
- package/test/workspaceSelectorContract.test.js +5 -2
- package/test/workspacesComponents.browser.test.js +10 -2
- package/test/workspacesLanding.browser.test.js +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
- The workspaces and invitations screens and the workspace-surfaces pattern's panels sit directly on the page, without bordered sheets; the invite landing and the members screen use elevated Material 3 cards; titles use Material 3 type classes instead of hand-sized ones. Buttons are Material 3's 40dp buttons inside material-web's 48dp touch target, no longer stretched to 48px; the workspace list's and invitations' buttons are default size instead of small.
|
|
6
|
+
- Icons are Material Symbols `$aliases` (from `@jskit-ai/material-web`) instead of `@mdi/js` paths, and text uses Vuetify 4's Material 3 type classes (`text-body-large`, `text-title-medium`, ...) instead of Material 2 ones, which Vuetify 4 no longer styles. Upgrading: see the guide's [Move an app to the Material 3 defaults](https://mobily-enterprises.github.io/jskit-ai/guide/app-setup/material-3-migration).
|
|
7
|
+
|
|
3
8
|
## 0.2.0 - 2026-10-29
|
|
4
9
|
|
|
5
10
|
- Translation ready: every user-visible text is a message key with its English in `locales/en.json`, so an app translates it by supplying translation files only. With no translations, texts and behaviour are unchanged. See the guide "Translating a JSKIT app".
|
|
@@ -2,10 +2,11 @@ import { createApp, h } from "vue";
|
|
|
2
2
|
import { createRouter, createWebHistory, RouterView } from "vue-router";
|
|
3
3
|
import { QueryClient, VueQueryPlugin } from "@tanstack/vue-query";
|
|
4
4
|
import "vuetify/styles";
|
|
5
|
+
import "@jskit-ai/material-web/client/material.css";
|
|
6
|
+
import { createMaterialVuetifyOptions } from "@jskit-ai/material-web/client";
|
|
5
7
|
import { createVuetify } from "vuetify";
|
|
6
8
|
import * as components from "vuetify/components";
|
|
7
9
|
import * as directives from "vuetify/directives";
|
|
8
|
-
import { aliases, mdi } from "vuetify/iconsets/mdi-svg";
|
|
9
10
|
import WorkspaceMembersClientElement from "../../src/client/components/WorkspaceMembersClientElement.vue";
|
|
10
11
|
|
|
11
12
|
const context = {
|
|
@@ -32,6 +33,6 @@ app.provide("jskit.shell-web.runtime.web-placement.client", {
|
|
|
32
33
|
});
|
|
33
34
|
app.use(router);
|
|
34
35
|
app.use(VueQueryPlugin, { queryClient: new QueryClient({ defaultOptions: { queries: { retry: false } } }) });
|
|
35
|
-
app.use(createVuetify({ components, directives,
|
|
36
|
+
app.use(createVuetify({ components, directives, ...createMaterialVuetifyOptions() }));
|
|
36
37
|
await router.isReady();
|
|
37
38
|
app.mount("#app");
|
|
@@ -2,10 +2,11 @@ import { createApp, h, reactive } from "vue";
|
|
|
2
2
|
import { createRouter, createWebHistory, RouterView, useRoute } from "vue-router";
|
|
3
3
|
import { QueryClient, VueQueryPlugin } from "@tanstack/vue-query";
|
|
4
4
|
import "vuetify/styles";
|
|
5
|
+
import "@jskit-ai/material-web/client/material.css";
|
|
6
|
+
import { createMaterialVuetifyOptions } from "@jskit-ai/material-web/client";
|
|
5
7
|
import { createVuetify } from "vuetify";
|
|
6
8
|
import * as components from "vuetify/components";
|
|
7
9
|
import * as directives from "vuetify/directives";
|
|
8
|
-
import { aliases, mdi } from "vuetify/iconsets/mdi-svg";
|
|
9
10
|
import AccountSettingsInvitesSection from "../../src/client/components/AccountSettingsInvitesSection.vue";
|
|
10
11
|
import WorkspaceSelector from "../../src/client/components/WorkspaceSelector.vue";
|
|
11
12
|
|
|
@@ -85,6 +86,6 @@ app.provide("jskit.shell-web.runtime.web-placement.client", {
|
|
|
85
86
|
app.provide("jskit.shell-web.runtime.web-error.client", errorRuntime);
|
|
86
87
|
app.use(router);
|
|
87
88
|
app.use(VueQueryPlugin, { queryClient: new QueryClient({ defaultOptions: { queries: { retry: false } } }) });
|
|
88
|
-
app.use(createVuetify({ components, directives,
|
|
89
|
+
app.use(createVuetify({ components, directives, ...createMaterialVuetifyOptions() }));
|
|
89
90
|
await router.isReady();
|
|
90
91
|
app.mount("#app");
|
|
@@ -2,10 +2,11 @@ import { createApp, h } from "vue";
|
|
|
2
2
|
import { createRouter, createWebHistory, RouterView, useRoute } from "vue-router";
|
|
3
3
|
import { QueryClient, VueQueryPlugin } from "@tanstack/vue-query";
|
|
4
4
|
import "vuetify/styles";
|
|
5
|
+
import "@jskit-ai/material-web/client/material.css";
|
|
6
|
+
import { createMaterialVuetifyOptions } from "@jskit-ai/material-web/client";
|
|
5
7
|
import { createVuetify } from "vuetify";
|
|
6
8
|
import * as components from "vuetify/components";
|
|
7
9
|
import * as directives from "vuetify/directives";
|
|
8
|
-
import { aliases, mdi } from "vuetify/iconsets/mdi-svg";
|
|
9
10
|
import WorkspacesClientElement from "../../src/client/components/WorkspacesClientElement.vue";
|
|
10
11
|
|
|
11
12
|
const context = {
|
|
@@ -41,6 +42,6 @@ app.provide("jskit.shell-web.runtime.web-placement.client", {
|
|
|
41
42
|
});
|
|
42
43
|
app.use(router);
|
|
43
44
|
app.use(VueQueryPlugin, { queryClient: new QueryClient({ defaultOptions: { queries: { retry: false } } }) });
|
|
44
|
-
app.use(createVuetify({ components, directives,
|
|
45
|
+
app.use(createVuetify({ components, directives, ...createMaterialVuetifyOptions() }));
|
|
45
46
|
await router.isReady();
|
|
46
47
|
app.mount("#app");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/workspaces-web",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test --test-concurrency=1"
|
|
@@ -16,20 +16,19 @@
|
|
|
16
16
|
"./locales/en.json": "./locales/en.json"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@jskit-ai/users-core": "0.2.
|
|
20
|
-
"@jskit-ai/workspaces-core": "0.2.
|
|
21
|
-
"@mdi/js": "^7.4.47"
|
|
19
|
+
"@jskit-ai/users-core": "0.2.12",
|
|
20
|
+
"@jskit-ai/workspaces-core": "0.2.12"
|
|
22
21
|
},
|
|
23
22
|
"peerDependencies": {
|
|
24
|
-
"@jskit-ai/auth-web": "0.2.
|
|
25
|
-
"@jskit-ai/http-web": "0.2.
|
|
26
|
-
"@jskit-ai/kernel": "0.2.
|
|
27
|
-
"@jskit-ai/shell-web": "0.2.
|
|
28
|
-
"@jskit-ai/users-web": "0.2.
|
|
23
|
+
"@jskit-ai/auth-web": "0.2.13",
|
|
24
|
+
"@jskit-ai/http-web": "0.2.16",
|
|
25
|
+
"@jskit-ai/kernel": "0.2.10",
|
|
26
|
+
"@jskit-ai/shell-web": "0.2.11",
|
|
27
|
+
"@jskit-ai/users-web": "0.2.18",
|
|
29
28
|
"@tanstack/vue-query": "^5.90.5",
|
|
30
29
|
"vue": "^3.5.13",
|
|
31
30
|
"vue-router": "^5.0.4",
|
|
32
|
-
"vuetify": "^4.
|
|
31
|
+
"vuetify": "^4.3.0"
|
|
33
32
|
},
|
|
34
33
|
"description": "Workspace web module: workspace selector, tools widget, workspace surfaces, members UI, and settings hosts.",
|
|
35
34
|
"jskit": {
|
|
@@ -275,5 +274,8 @@
|
|
|
275
274
|
"singleton": true
|
|
276
275
|
}
|
|
277
276
|
}
|
|
277
|
+
},
|
|
278
|
+
"devDependencies": {
|
|
279
|
+
"@jskit-ai/material-web": "0.1.0"
|
|
278
280
|
}
|
|
279
281
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { useRoute } from "vue-router";
|
|
4
|
-
import { mdiEmailAlertOutline } from "@mdi/js";
|
|
5
4
|
import { appendQueryString } from "@jskit-ai/kernel/shared/support";
|
|
6
5
|
import {
|
|
7
6
|
useWebPlacementContext,
|
|
@@ -96,7 +95,7 @@ const resolvedNavigationTarget = computed(() =>
|
|
|
96
95
|
:href="resolvedNavigationTarget.sameOrigin ? undefined : resolvedNavigationTarget.href"
|
|
97
96
|
variant="tonal"
|
|
98
97
|
color="warning"
|
|
99
|
-
|
|
98
|
+
prepend-icon="$markEmailUnread"
|
|
100
99
|
size="small"
|
|
101
100
|
class="text-none"
|
|
102
101
|
>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { mdiAlertCircleOutline } from "@mdi/js";
|
|
3
2
|
import { computed } from "vue";
|
|
4
3
|
|
|
5
4
|
const props = defineProps({
|
|
@@ -18,13 +17,13 @@ const normalizedMessage = computed(() => String(props.message || "").trim() || "
|
|
|
18
17
|
</script>
|
|
19
18
|
|
|
20
19
|
<template>
|
|
21
|
-
<
|
|
20
|
+
<div class="workspace-unavailable-panel">
|
|
22
21
|
<div class="workspace-unavailable-panel__status">
|
|
23
|
-
<v-icon
|
|
24
|
-
<p class="text-body-
|
|
22
|
+
<v-icon icon="$error" color="error" />
|
|
23
|
+
<p class="text-body-medium on-surface-variant mb-0">{{ normalizedSurfaceLabel }} surface unavailable.</p>
|
|
25
24
|
</div>
|
|
26
|
-
<p class="text-body-
|
|
27
|
-
</
|
|
25
|
+
<p class="text-body-medium on-surface-variant mb-0">{{ normalizedMessage }}</p>
|
|
26
|
+
</div>
|
|
28
27
|
</template>
|
|
29
28
|
|
|
30
29
|
<style scoped>
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section class="
|
|
3
|
-
<v-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
</v-sheet>
|
|
2
|
+
<section class="on-surface-variant text-center py-12">
|
|
3
|
+
<v-icon icon="$settings" size="48" />
|
|
4
|
+
<p class="text-body-large mt-4 mb-0">
|
|
5
|
+
This app has no workspace-level settings configured.
|
|
6
|
+
</p>
|
|
8
7
|
</section>
|
|
9
8
|
</template>
|
|
10
|
-
|
|
11
|
-
<style scoped>
|
|
12
|
-
.workspace-settings-landing__panel {
|
|
13
|
-
padding: 1rem;
|
|
14
|
-
}
|
|
15
|
-
</style>
|
|
@@ -1,81 +1,33 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { RouterView, useRoute } from "vue-router";
|
|
4
|
+
import ShellListDetail from "@jskit-ai/shell-web/client/components/ShellListDetail";
|
|
2
5
|
import ShellOutlet from "@jskit-ai/shell-web/client/components/ShellOutlet";
|
|
3
|
-
|
|
6
|
+
|
|
7
|
+
definePage({
|
|
8
|
+
meta: {
|
|
9
|
+
jskit: {
|
|
10
|
+
title: "Workspace settings"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const route = useRoute();
|
|
16
|
+
// The section list shows beside the open section on wide windows, and on its own at the settings landing.
|
|
17
|
+
const detailOpen = computed(() => !/\/settings\/?$/u.test(route.path));
|
|
4
18
|
</script>
|
|
5
19
|
|
|
6
20
|
<template>
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
<nav
|
|
10
|
-
<v-list nav
|
|
21
|
+
<ShellListDetail :detail-open="detailOpen">
|
|
22
|
+
<template #list>
|
|
23
|
+
<nav aria-label="Workspace settings sections">
|
|
24
|
+
<v-list nav>
|
|
11
25
|
<ShellOutlet target="admin-settings:primary-menu" />
|
|
12
26
|
</v-list>
|
|
13
27
|
</nav>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</
|
|
18
|
-
</
|
|
28
|
+
</template>
|
|
29
|
+
<template #detail>
|
|
30
|
+
<RouterView />
|
|
31
|
+
</template>
|
|
32
|
+
</ShellListDetail>
|
|
19
33
|
</template>
|
|
20
|
-
|
|
21
|
-
<style scoped>
|
|
22
|
-
.settings-shell__panel {
|
|
23
|
-
display: grid;
|
|
24
|
-
gap: 1rem;
|
|
25
|
-
grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
|
|
26
|
-
padding: 1rem;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.settings-shell__nav-list {
|
|
30
|
-
padding: 0.35rem;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.settings-shell__nav-list :deep(.v-list-item) {
|
|
34
|
-
min-height: 48px;
|
|
35
|
-
padding-inline: 0.6rem 0.7rem;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.settings-shell__nav-list :deep(.v-list-item__prepend) {
|
|
39
|
-
margin-inline-end: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.settings-shell__nav-list :deep(.v-list-item__spacer) {
|
|
43
|
-
min-width: 0.5rem;
|
|
44
|
-
width: 0.5rem;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.settings-shell__nav-list :deep(.v-list-item-title) {
|
|
48
|
-
line-height: 1.2;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.settings-shell__content {
|
|
52
|
-
border-left: 1px solid rgba(var(--v-theme-on-surface), 0.18);
|
|
53
|
-
min-width: 0;
|
|
54
|
-
padding-left: 1rem;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@media (max-width: 960px) {
|
|
58
|
-
.settings-shell__panel {
|
|
59
|
-
grid-template-columns: 1fr;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.settings-shell__nav {
|
|
63
|
-
overflow-x: auto;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.settings-shell__nav-list {
|
|
67
|
-
display: flex;
|
|
68
|
-
gap: 0.25rem;
|
|
69
|
-
min-width: max-content;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.settings-shell__nav-list :deep(.v-list-item) {
|
|
73
|
-
min-height: 48px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.settings-shell__content {
|
|
77
|
-
border-left: 0;
|
|
78
|
-
padding-left: 0;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
</style>
|
|
@@ -25,11 +25,11 @@ function adminChildPath(suffix = "") {
|
|
|
25
25
|
<v-btn color="primary" variant="tonal" :to="adminChildPath('workspace/settings')">Settings</v-btn>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
-
<
|
|
29
|
-
<p class="text-body-
|
|
28
|
+
<div class="workspace-admin-screen__panel">
|
|
29
|
+
<p class="text-body-medium on-surface-variant mb-0">
|
|
30
30
|
Review workspace access, members, and operational settings from this surface.
|
|
31
31
|
</p>
|
|
32
|
-
</
|
|
32
|
+
</div>
|
|
33
33
|
</section>
|
|
34
34
|
</template>
|
|
35
35
|
|
|
@@ -51,7 +51,6 @@ function adminChildPath(suffix = "") {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.workspace-admin-screen__actions :deep(.v-btn) {
|
|
54
|
-
min-height: 48px;
|
|
55
54
|
flex: 1 1 10rem;
|
|
56
55
|
}
|
|
57
56
|
}
|
|
@@ -12,11 +12,11 @@ const { workspaceUnavailable, workspaceUnavailableMessage } = useWorkspaceNotFou
|
|
|
12
12
|
surface-label="App"
|
|
13
13
|
/>
|
|
14
14
|
<section v-else class="workspace-home-screen d-flex flex-column ga-4">
|
|
15
|
-
<
|
|
16
|
-
<p class="text-body-
|
|
15
|
+
<div class="workspace-home-screen__panel">
|
|
16
|
+
<p class="text-body-medium on-surface-variant mb-0">
|
|
17
17
|
Activity from workspace workflows will appear here.
|
|
18
18
|
</p>
|
|
19
|
-
</
|
|
19
|
+
</div>
|
|
20
20
|
</section>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
@@ -8,10 +8,10 @@ const invites = useAccountSettingsInvitesSectionRuntime();
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
|
-
<
|
|
11
|
+
<div class="account-invites-section">
|
|
12
12
|
<header class="account-invites-section__header">
|
|
13
|
-
<h2 class="account-invites-section__title">{{ t("jskit.workspaces.common.invitations") }}</h2>
|
|
14
|
-
<p class="text-body-
|
|
13
|
+
<h2 class="account-invites-section__title text-title-medium">{{ t("jskit.workspaces.common.invitations") }}</h2>
|
|
14
|
+
<p class="text-body-medium on-surface-variant mb-0">{{ t("jskit.workspaces.accountInvites.subtitle") }}</p>
|
|
15
15
|
</header>
|
|
16
16
|
|
|
17
17
|
<div class="account-invites-section__body">
|
|
@@ -21,7 +21,7 @@ const invites = useAccountSettingsInvitesSectionRuntime();
|
|
|
21
21
|
|
|
22
22
|
<template v-else-if="invites.items.value.length < 1">
|
|
23
23
|
<v-progress-linear v-if="invites.isRefetching.value" indeterminate class="mb-4" />
|
|
24
|
-
<p class="text-body-
|
|
24
|
+
<p class="text-body-medium on-surface-variant mb-0">{{ t("jskit.workspaces.common.noPendingInvitations") }}</p>
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<template v-else>
|
|
@@ -36,13 +36,12 @@ const invites = useAccountSettingsInvitesSectionRuntime();
|
|
|
36
36
|
>
|
|
37
37
|
<template #prepend>
|
|
38
38
|
<v-avatar color="warning" size="28">
|
|
39
|
-
<span class="text-
|
|
39
|
+
<span class="text-body-small font-weight-bold">{{ t("jskit.workspaces.common.pendingInviteMark") }}</span>
|
|
40
40
|
</v-avatar>
|
|
41
41
|
</template>
|
|
42
42
|
<template #append>
|
|
43
43
|
<div class="d-flex ga-2">
|
|
44
44
|
<v-btn
|
|
45
|
-
size="small"
|
|
46
45
|
variant="text"
|
|
47
46
|
color="error"
|
|
48
47
|
:loading="invites.action.value.token === invite.token && invites.action.value.decision === 'refuse'"
|
|
@@ -54,7 +53,6 @@ const invites = useAccountSettingsInvitesSectionRuntime();
|
|
|
54
53
|
{{ t("jskit.workspaces.common.refuse") }}
|
|
55
54
|
</v-btn>
|
|
56
55
|
<v-btn
|
|
57
|
-
size="small"
|
|
58
56
|
variant="tonal"
|
|
59
57
|
color="primary"
|
|
60
58
|
:loading="invites.action.value.token === invite.token && invites.action.value.decision === 'accept'"
|
|
@@ -71,7 +69,7 @@ const invites = useAccountSettingsInvitesSectionRuntime();
|
|
|
71
69
|
</v-list>
|
|
72
70
|
</template>
|
|
73
71
|
</div>
|
|
74
|
-
</
|
|
72
|
+
</div>
|
|
75
73
|
</template>
|
|
76
74
|
|
|
77
75
|
<style scoped>
|
|
@@ -84,19 +82,10 @@ const invites = useAccountSettingsInvitesSectionRuntime();
|
|
|
84
82
|
}
|
|
85
83
|
|
|
86
84
|
.account-invites-section__title {
|
|
87
|
-
font-size: 1rem;
|
|
88
|
-
font-weight: 650;
|
|
89
|
-
line-height: 1.2;
|
|
90
85
|
margin: 0 0 0.25rem;
|
|
91
86
|
}
|
|
92
87
|
|
|
93
88
|
.account-invites-section__body {
|
|
94
89
|
padding: 1rem;
|
|
95
90
|
}
|
|
96
|
-
|
|
97
|
-
@media (max-width: 640px) {
|
|
98
|
-
.account-invites-section__body :deep(.v-btn) {
|
|
99
|
-
min-height: 48px;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
91
|
</style>
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<section class="members-admin-client-element">
|
|
3
3
|
<v-row>
|
|
4
4
|
<v-col cols="12" lg="5">
|
|
5
|
-
<v-card
|
|
5
|
+
<v-card data-testid="members-admin-invite-card">
|
|
6
6
|
<v-card-item>
|
|
7
|
-
<v-card-title class="text-
|
|
7
|
+
<v-card-title class="text-title-medium">{{ t("jskit.workspaces.membersAdmin.inviteTitle") }}</v-card-title>
|
|
8
8
|
<v-card-subtitle>{{ t("jskit.workspaces.membersAdmin.inviteSubtitle") }}</v-card-subtitle>
|
|
9
9
|
</v-card-item>
|
|
10
10
|
<v-divider />
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
<v-progress-linear v-if="showWorkspaceInviteRefreshingIndicator" indeterminate class="mb-3" />
|
|
17
17
|
<p
|
|
18
18
|
v-if="workspaceInvitePolicyLoaded && !workspaceInvitesAvailable"
|
|
19
|
-
class="text-body-
|
|
19
|
+
class="text-body-medium on-surface-variant mb-3"
|
|
20
20
|
>
|
|
21
21
|
{{ t("jskit.workspaces.membersAdmin.invitesUnavailable") }}
|
|
22
22
|
</p>
|
|
23
23
|
<p
|
|
24
24
|
v-else-if="workspaceInvitePolicyLoaded && !workspaceInvitesEnabled"
|
|
25
|
-
class="text-body-
|
|
25
|
+
class="text-body-medium on-surface-variant mb-3"
|
|
26
26
|
>
|
|
27
27
|
{{ t("jskit.workspaces.membersAdmin.invitesOff") }}
|
|
28
28
|
</p>
|
|
29
29
|
|
|
30
|
-
<p v-if="!canInviteMembers" class="text-body-
|
|
30
|
+
<p v-if="!canInviteMembers" class="text-body-medium on-surface-variant mb-3">
|
|
31
31
|
{{ t("jskit.workspaces.membersAdmin.noInvitePermission") }}
|
|
32
32
|
</p>
|
|
33
33
|
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
|
|
67
67
|
<div v-if="hasCreatedInviteUrl" class="invite-link-panel mt-4">
|
|
68
68
|
<v-divider class="mb-4" />
|
|
69
|
-
<p class="text-
|
|
69
|
+
<p class="text-body-small on-surface-variant mb-2">{{ inviteLinkStatusText }}</p>
|
|
70
70
|
<div class="invite-link-row">
|
|
71
71
|
<v-text-field
|
|
72
72
|
:model-value="createdInviteUrl"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
<v-btn
|
|
81
81
|
color="primary"
|
|
82
82
|
variant="tonal"
|
|
83
|
-
|
|
83
|
+
prepend-icon="$contentCopy"
|
|
84
84
|
:loading="isCopyingInviteLink"
|
|
85
85
|
@click="onCopyInviteLink"
|
|
86
86
|
>
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
</v-col>
|
|
96
96
|
|
|
97
97
|
<v-col cols="12" lg="7">
|
|
98
|
-
<v-card
|
|
98
|
+
<v-card data-testid="members-admin-members-card">
|
|
99
99
|
<v-card-item>
|
|
100
|
-
<v-card-title class="text-
|
|
100
|
+
<v-card-title class="text-title-medium">{{ t("jskit.workspaces.membersAdmin.teamTitle") }}</v-card-title>
|
|
101
101
|
<v-card-subtitle>{{ t("jskit.workspaces.membersAdmin.teamSubtitle") }}</v-card-subtitle>
|
|
102
102
|
</v-card-item>
|
|
103
103
|
<v-divider />
|
|
@@ -109,12 +109,12 @@
|
|
|
109
109
|
</template>
|
|
110
110
|
<template v-else>
|
|
111
111
|
<v-progress-linear v-if="showMembersRefreshingIndicator" indeterminate class="mb-3" />
|
|
112
|
-
<p v-if="!canViewMembers" class="text-body-
|
|
112
|
+
<p v-if="!canViewMembers" class="text-body-medium on-surface-variant mb-0">
|
|
113
113
|
{{ t("jskit.workspaces.membersAdmin.noViewPermission") }}
|
|
114
114
|
</p>
|
|
115
115
|
|
|
116
116
|
<template v-else>
|
|
117
|
-
<div class="text-
|
|
117
|
+
<div class="text-body-small on-surface-variant mb-2">{{ t("jskit.workspaces.membersAdmin.members") }}</div>
|
|
118
118
|
<v-list density="comfortable" class="pa-0 mb-3">
|
|
119
119
|
<v-list-item v-for="member in memberRows" :key="member.userId" class="px-0">
|
|
120
120
|
<template #title>
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
|
|
160
160
|
<v-divider class="mb-3" />
|
|
161
161
|
|
|
162
|
-
<div class="text-
|
|
162
|
+
<div class="text-body-small on-surface-variant mb-2">{{ t("jskit.workspaces.membersAdmin.pendingInvites") }}</div>
|
|
163
163
|
<v-list density="comfortable" class="pa-0">
|
|
164
164
|
<v-list-item v-for="invite in inviteRows" :key="invite.id" class="px-0">
|
|
165
165
|
<template #title>
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
</v-btn>
|
|
182
182
|
</template>
|
|
183
183
|
</v-list-item>
|
|
184
|
-
<p v-if="inviteRows.length < 1" class="text-body-
|
|
184
|
+
<p v-if="inviteRows.length < 1" class="text-body-medium on-surface-variant mb-0">{{ t("jskit.workspaces.membersAdmin.noPendingInvites") }}</p>
|
|
185
185
|
</v-list>
|
|
186
186
|
</template>
|
|
187
187
|
</template>
|
|
@@ -194,7 +194,6 @@
|
|
|
194
194
|
|
|
195
195
|
<script setup>
|
|
196
196
|
import { computed, toRefs } from "vue";
|
|
197
|
-
import { mdiContentCopy } from "@mdi/js";
|
|
198
197
|
import { normalizeRecordId } from "@jskit-ai/kernel/shared/support/normalize";
|
|
199
198
|
import { useJskitText } from "../i18n.js";
|
|
200
199
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<main class="workspace-invite-landing">
|
|
3
3
|
<v-container class="workspace-invite-landing__container">
|
|
4
|
-
<v-
|
|
4
|
+
<v-card class="workspace-invite-landing__panel">
|
|
5
5
|
<div v-if="isLoading" class="workspace-invite-landing__state">
|
|
6
6
|
<v-progress-circular color="primary" indeterminate />
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
<div v-else-if="loadError" class="workspace-invite-landing__state">
|
|
10
|
-
<h1 class="workspace-invite-landing__title">{{ t("jskit.workspaces.inviteLanding.unavailableTitle") }}</h1>
|
|
11
|
-
<p class="text-body-
|
|
10
|
+
<h1 class="workspace-invite-landing__title text-headline-small">{{ t("jskit.workspaces.inviteLanding.unavailableTitle") }}</h1>
|
|
11
|
+
<p class="text-body-medium on-surface-variant mb-5">{{ loadError }}</p>
|
|
12
12
|
<v-btn color="primary" variant="tonal" :loading="isRefreshing" @click="refreshInvite">{{ t("jskit.workspaces.common.retry") }}</v-btn>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
<div v-else-if="isTerminal" class="workspace-invite-landing__state">
|
|
16
|
-
<h1 class="workspace-invite-landing__title">{{ terminalTitle }}</h1>
|
|
17
|
-
<p class="text-body-
|
|
16
|
+
<h1 class="workspace-invite-landing__title text-headline-small">{{ terminalTitle }}</h1>
|
|
17
|
+
<p class="text-body-medium on-surface-variant mb-0">{{ terminalMessage }}</p>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
<div v-else class="workspace-invite-landing__content">
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
{{ workspaceInitial }}
|
|
25
25
|
</v-avatar>
|
|
26
26
|
<div>
|
|
27
|
-
<h1 class="workspace-invite-landing__title">{{ workspaceName }}</h1>
|
|
28
|
-
<p class="text-body-
|
|
27
|
+
<h1 class="workspace-invite-landing__title text-headline-small">{{ workspaceName }}</h1>
|
|
28
|
+
<p class="text-body-medium on-surface-variant mb-0">
|
|
29
29
|
{{ t("jskit.workspaces.inviteLanding.invitationFor", { email: inviteEmailLabel }) }}
|
|
30
30
|
</p>
|
|
31
31
|
</div>
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
</v-btn>
|
|
52
52
|
</div>
|
|
53
53
|
|
|
54
|
-
<p v-if="redeemError" class="text-body-
|
|
54
|
+
<p v-if="redeemError" class="text-body-medium text-error mb-0">{{ redeemError }}</p>
|
|
55
55
|
</div>
|
|
56
|
-
</v-
|
|
56
|
+
</v-card>
|
|
57
57
|
</v-container>
|
|
58
58
|
</main>
|
|
59
59
|
</template>
|
|
@@ -201,8 +201,7 @@ onMounted(() => {
|
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
.workspace-invite-landing__panel {
|
|
204
|
-
padding:
|
|
205
|
-
border-radius: 8px;
|
|
204
|
+
padding: 24px;
|
|
206
205
|
}
|
|
207
206
|
|
|
208
207
|
.workspace-invite-landing__state {
|
|
@@ -225,9 +224,6 @@ onMounted(() => {
|
|
|
225
224
|
}
|
|
226
225
|
|
|
227
226
|
.workspace-invite-landing__title {
|
|
228
|
-
font-size: 1.35rem;
|
|
229
|
-
line-height: 1.25;
|
|
230
|
-
font-weight: 650;
|
|
231
227
|
margin: 0 0 4px;
|
|
232
228
|
}
|
|
233
229
|
|
|
@@ -247,10 +243,9 @@ onMounted(() => {
|
|
|
247
243
|
}
|
|
248
244
|
|
|
249
245
|
.workspace-invite-landing__panel {
|
|
250
|
-
min-height: 100vh;
|
|
251
246
|
border-radius: 0;
|
|
252
|
-
|
|
253
|
-
|
|
247
|
+
box-shadow: none;
|
|
248
|
+
min-height: 100vh;
|
|
254
249
|
}
|
|
255
250
|
|
|
256
251
|
.workspace-invite-landing__actions > * {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="workspace-members-page">
|
|
3
3
|
<div v-if="loadError" class="workspace-members-page__state">
|
|
4
|
-
<p class="text-body-
|
|
4
|
+
<p class="text-body-medium on-surface-variant mb-4">{{ loadError }}</p>
|
|
5
5
|
<v-btn
|
|
6
6
|
v-if="canRetryLoad"
|
|
7
7
|
color="primary"
|
|
@@ -57,10 +57,4 @@ const {
|
|
|
57
57
|
padding: 2rem 1rem;
|
|
58
58
|
text-align: center;
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
@media (max-width: 640px) {
|
|
62
|
-
.workspace-members-page__state :deep(.v-btn) {
|
|
63
|
-
min-height: 48px;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
60
|
</style>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { mdiAccountGroupOutline } from "@mdi/js";
|
|
3
2
|
import WorkspacePermissionMenuItem from "./WorkspacePermissionMenuItem.vue";
|
|
4
3
|
import { useJskitText } from "../i18n.js";
|
|
5
4
|
|
|
@@ -14,7 +13,7 @@ const props = defineProps({
|
|
|
14
13
|
},
|
|
15
14
|
icon: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: "$group"
|
|
18
17
|
},
|
|
19
18
|
surface: {
|
|
20
19
|
type: String,
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
resolveSurfaceNavigationTargetFromPlacementContext
|
|
8
8
|
} from "@jskit-ai/shell-web/client/placement";
|
|
9
9
|
import { TENANCY_MODE_NONE } from "@jskit-ai/workspaces-core/shared/tenancyProfile";
|
|
10
|
-
import { mdiBriefcaseOutline } from "@mdi/js";
|
|
11
10
|
import { findWorkspaceBySlug, normalizeWorkspaceEntry, normalizeWorkspaceList } from "../lib/bootstrap.js";
|
|
12
11
|
import { usePaths } from "@jskit-ai/shell-web/client/navigation/usePaths";
|
|
13
12
|
import { resolveSurfaceSwitchTargetsFromPlacementContext, surfaceRequiresWorkspaceFromPlacementContext } from "../lib/workspaceSurfaceContext.js";
|
|
@@ -183,7 +182,7 @@ const activeWorkspaceLabel = computed(() => {
|
|
|
183
182
|
v-bind="activatorProps"
|
|
184
183
|
variant="text"
|
|
185
184
|
class="users-workspace-selector__activator text-none"
|
|
186
|
-
|
|
185
|
+
prepend-icon="$work"
|
|
187
186
|
>
|
|
188
187
|
{{ activeWorkspaceLabel }}
|
|
189
188
|
</v-btn>
|
|
@@ -202,7 +201,7 @@ const activeWorkspaceLabel = computed(() => {
|
|
|
202
201
|
>
|
|
203
202
|
<template #prepend>
|
|
204
203
|
<v-avatar size="24" color="primary" variant="tonal">
|
|
205
|
-
<span class="text-
|
|
204
|
+
<span class="text-body-small">{{ String(workspace.name || "W").slice(0, 1).toUpperCase() }}</span>
|
|
206
205
|
</v-avatar>
|
|
207
206
|
</template>
|
|
208
207
|
<template #append>
|
|
@@ -218,9 +217,3 @@ const activeWorkspaceLabel = computed(() => {
|
|
|
218
217
|
</v-list>
|
|
219
218
|
</v-menu>
|
|
220
219
|
</template>
|
|
221
|
-
|
|
222
|
-
<style scoped>
|
|
223
|
-
.users-workspace-selector__activator {
|
|
224
|
-
min-height: 48px;
|
|
225
|
-
}
|
|
226
|
-
</style>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { mdiCogOutline } from "@mdi/js";
|
|
3
2
|
import WorkspacePermissionMenuItem from "./WorkspacePermissionMenuItem.vue";
|
|
4
3
|
import { useJskitText } from "../i18n.js";
|
|
5
4
|
|
|
@@ -14,7 +13,7 @@ const props = defineProps({
|
|
|
14
13
|
},
|
|
15
14
|
icon: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: "$settings"
|
|
18
17
|
},
|
|
19
18
|
surface: {
|
|
20
19
|
type: String,
|
|
@@ -41,12 +41,12 @@ function isRespondingToInvite(invite, decision) {
|
|
|
41
41
|
</script>
|
|
42
42
|
|
|
43
43
|
<template>
|
|
44
|
-
<section class="workspaces-view py-6">
|
|
44
|
+
<section class="workspaces-view py-3 py-sm-6">
|
|
45
45
|
<v-container class="mx-auto" max-width="860">
|
|
46
|
-
<
|
|
46
|
+
<div class="workspaces-view__panel">
|
|
47
47
|
<header class="workspaces-view__header">
|
|
48
|
-
<h1 class="workspaces-view__title">{{ t("jskit.workspaces.workspacesView.title") }}</h1>
|
|
49
|
-
<p class="text-body-
|
|
48
|
+
<h1 class="workspaces-view__title text-headline-small">{{ t("jskit.workspaces.workspacesView.title") }}</h1>
|
|
49
|
+
<p class="text-body-medium on-surface-variant mb-0">{{ t("jskit.workspaces.workspacesView.subtitle") }}</p>
|
|
50
50
|
</header>
|
|
51
51
|
|
|
52
52
|
<div class="workspaces-view__body">
|
|
@@ -56,8 +56,8 @@ function isRespondingToInvite(invite, decision) {
|
|
|
56
56
|
<v-skeleton-loader type="text, list-item-avatar-two-line@3" />
|
|
57
57
|
</template>
|
|
58
58
|
<div v-else-if="bootstrapLoadError" class="workspaces-view__state">
|
|
59
|
-
<h2 class="text-
|
|
60
|
-
<p class="text-body-
|
|
59
|
+
<h2 class="text-title-large mb-2">{{ t("jskit.workspaces.workspacesView.loadFailedTitle") }}</h2>
|
|
60
|
+
<p class="text-body-medium on-surface-variant mb-4">{{ bootstrapLoadError }}</p>
|
|
61
61
|
<v-btn
|
|
62
62
|
color="primary"
|
|
63
63
|
variant="tonal"
|
|
@@ -68,9 +68,9 @@ function isRespondingToInvite(invite, decision) {
|
|
|
68
68
|
</v-btn>
|
|
69
69
|
</div>
|
|
70
70
|
<template v-else>
|
|
71
|
-
<div class="text-
|
|
71
|
+
<div class="text-title-small mb-2">{{ t("jskit.workspaces.common.workspaces") }}</div>
|
|
72
72
|
<template v-if="workspaceItems.length === 0">
|
|
73
|
-
<p class="text-body-
|
|
73
|
+
<p class="text-body-large mb-2">{{ t("jskit.workspaces.workspacesView.noWorkspace") }}</p>
|
|
74
74
|
<template v-if="canCreateWorkspace">
|
|
75
75
|
<v-text-field
|
|
76
76
|
v-model="createWorkspaceModel.name"
|
|
@@ -97,7 +97,7 @@ function isRespondingToInvite(invite, decision) {
|
|
|
97
97
|
{{ t(isCreatingWorkspace ? "jskit.workspaces.workspacesView.creating" : "jskit.workspaces.workspacesView.create") }}
|
|
98
98
|
</v-btn>
|
|
99
99
|
</template>
|
|
100
|
-
<p v-else class="text-body-
|
|
100
|
+
<p v-else class="text-body-medium on-surface-variant mb-0">
|
|
101
101
|
{{ t("jskit.workspaces.workspacesView.askAdministrator") }}
|
|
102
102
|
</p>
|
|
103
103
|
</template>
|
|
@@ -118,13 +118,12 @@ function isRespondingToInvite(invite, decision) {
|
|
|
118
118
|
<template #prepend>
|
|
119
119
|
<v-avatar color="primary" variant="tonal" size="28">
|
|
120
120
|
<v-img v-if="workspace.avatarUrl" :src="workspace.avatarUrl" cover />
|
|
121
|
-
<span v-else class="text-
|
|
121
|
+
<span v-else class="text-body-small">{{ workspaceInitials(workspace) }}</span>
|
|
122
122
|
</v-avatar>
|
|
123
123
|
</template>
|
|
124
124
|
<template #append>
|
|
125
125
|
<v-btn
|
|
126
126
|
color="primary"
|
|
127
|
-
size="small"
|
|
128
127
|
variant="tonal"
|
|
129
128
|
:disabled="!workspace.isAccessible || selectingWorkspaceSlug === workspace.slug"
|
|
130
129
|
@click="openWorkspace(workspace.slug)"
|
|
@@ -143,9 +142,9 @@ function isRespondingToInvite(invite, decision) {
|
|
|
143
142
|
<v-skeleton-loader type="text, list-item-two-line@3" />
|
|
144
143
|
</template>
|
|
145
144
|
<template v-else>
|
|
146
|
-
<div class="text-
|
|
145
|
+
<div class="text-title-small mb-2">{{ t("jskit.workspaces.common.invitations") }}</div>
|
|
147
146
|
<template v-if="pendingInvites.length === 0">
|
|
148
|
-
<p class="text-body-
|
|
147
|
+
<p class="text-body-medium on-surface-variant mb-0">{{ t("jskit.workspaces.common.noPendingInvitations") }}</p>
|
|
149
148
|
</template>
|
|
150
149
|
|
|
151
150
|
<template v-else>
|
|
@@ -159,13 +158,12 @@ function isRespondingToInvite(invite, decision) {
|
|
|
159
158
|
>
|
|
160
159
|
<template #prepend>
|
|
161
160
|
<v-avatar color="warning" size="28">
|
|
162
|
-
<span class="text-
|
|
161
|
+
<span class="text-body-small font-weight-bold">{{ t("jskit.workspaces.common.pendingInviteMark") }}</span>
|
|
163
162
|
</v-avatar>
|
|
164
163
|
</template>
|
|
165
164
|
<template #append>
|
|
166
165
|
<div class="d-flex ga-2">
|
|
167
166
|
<v-btn
|
|
168
|
-
size="small"
|
|
169
167
|
variant="text"
|
|
170
168
|
color="error"
|
|
171
169
|
:disabled="isRespondingToInvite(invite, 'refuse')"
|
|
@@ -174,7 +172,6 @@ function isRespondingToInvite(invite, decision) {
|
|
|
174
172
|
{{ t(isRespondingToInvite(invite, "refuse") ? "jskit.workspaces.common.refusing" : "jskit.workspaces.common.refuse") }}
|
|
175
173
|
</v-btn>
|
|
176
174
|
<v-btn
|
|
177
|
-
size="small"
|
|
178
175
|
variant="tonal"
|
|
179
176
|
color="primary"
|
|
180
177
|
:disabled="isRespondingToInvite(invite, 'accept')"
|
|
@@ -191,7 +188,7 @@ function isRespondingToInvite(invite, decision) {
|
|
|
191
188
|
</v-col>
|
|
192
189
|
</v-row>
|
|
193
190
|
</div>
|
|
194
|
-
</
|
|
191
|
+
</div>
|
|
195
192
|
</v-container>
|
|
196
193
|
</section>
|
|
197
194
|
</template>
|
|
@@ -206,10 +203,6 @@ function isRespondingToInvite(invite, decision) {
|
|
|
206
203
|
}
|
|
207
204
|
|
|
208
205
|
.workspaces-view__title {
|
|
209
|
-
font-size: clamp(1.35rem, 2vw, 1.85rem);
|
|
210
|
-
font-weight: 650;
|
|
211
|
-
letter-spacing: -0.02em;
|
|
212
|
-
line-height: 1.15;
|
|
213
206
|
margin: 0 0 0.35rem;
|
|
214
207
|
}
|
|
215
208
|
|
|
@@ -223,14 +216,4 @@ function isRespondingToInvite(invite, decision) {
|
|
|
223
216
|
padding: 2rem 1rem;
|
|
224
217
|
text-align: center;
|
|
225
218
|
}
|
|
226
|
-
|
|
227
|
-
.workspaces-view__body :deep(.v-btn) {
|
|
228
|
-
min-height: 48px;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
@media (max-width: 640px) {
|
|
232
|
-
.workspaces-view {
|
|
233
|
-
padding-block: 0.75rem !important;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
219
|
</style>
|
|
@@ -10,17 +10,11 @@ import {
|
|
|
10
10
|
resolveWorkspaceSurfaceIdFromPlacementPathname,
|
|
11
11
|
extractWorkspaceSlugFromSurfacePathname
|
|
12
12
|
} from "./workspaceSurfacePaths.js";
|
|
13
|
-
import {
|
|
14
|
-
mdiArrowRightCircleOutline,
|
|
15
|
-
mdiHomeVariantOutline,
|
|
16
|
-
mdiShieldCrownOutline,
|
|
17
|
-
mdiViewDashboardOutline
|
|
18
|
-
} from "@mdi/js";
|
|
19
13
|
|
|
20
14
|
const SURFACE_SWITCH_ICON_BY_ID = Object.freeze({
|
|
21
|
-
home:
|
|
22
|
-
app:
|
|
23
|
-
admin:
|
|
15
|
+
home: "$home",
|
|
16
|
+
app: "$dashboard",
|
|
17
|
+
admin: "$adminPanelSettings"
|
|
24
18
|
});
|
|
25
19
|
|
|
26
20
|
function resolveSurfaceSwitchIcon(surfaceId = "", explicitIcon = "") {
|
|
@@ -30,7 +24,7 @@ function resolveSurfaceSwitchIcon(surfaceId = "", explicitIcon = "") {
|
|
|
30
24
|
}
|
|
31
25
|
|
|
32
26
|
const normalizedSurfaceId = String(surfaceId || "").trim().toLowerCase();
|
|
33
|
-
return SURFACE_SWITCH_ICON_BY_ID[normalizedSurfaceId] ||
|
|
27
|
+
return SURFACE_SWITCH_ICON_BY_ID[normalizedSurfaceId] || "$arrowCircleRight";
|
|
34
28
|
}
|
|
35
29
|
|
|
36
30
|
function resolveCurrentWorkspaceSlug(contextValue, surfaceId) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
2
|
import test from "node:test";
|
|
3
|
-
import { mdiShieldCrownOutline } from "@mdi/js";
|
|
4
3
|
import {
|
|
5
4
|
hasWorkspaceMembership,
|
|
6
5
|
resolvePrimarySurfaceSwitchLink,
|
|
@@ -139,7 +138,7 @@ test("resolvePrimarySurfaceSwitchLink shows Go to admin only for member workspac
|
|
|
139
138
|
assert.deepEqual(link, {
|
|
140
139
|
id: "surface-switch.admin",
|
|
141
140
|
label: "Go to admin",
|
|
142
|
-
icon:
|
|
141
|
+
icon: "$adminPanelSettings",
|
|
143
142
|
to: "/w/acme/admin"
|
|
144
143
|
});
|
|
145
144
|
});
|
|
@@ -74,7 +74,8 @@ test("Members displays configured labels but sends and reloads role IDs", {
|
|
|
74
74
|
const memberSelect = page.locator(".member-role-select");
|
|
75
75
|
await memberSelect.getByText("Member", { exact: true }).waitFor();
|
|
76
76
|
await expect(memberSelect.last()).toContainText("Workspace owner");
|
|
77
|
-
|
|
77
|
+
// Vuetify 4.3's select also renders a hidden form input; the disabled control is its combobox input.
|
|
78
|
+
await expect(memberSelect.last().locator("input[role='combobox']")).toBeDisabled();
|
|
78
79
|
await page.getByText(/Role: Operator/u).waitFor();
|
|
79
80
|
assert.match(await inviteRole.locator("xpath=ancestor::*[contains(@class, 'v-select')][1]").textContent(), /Member/u);
|
|
80
81
|
for (const [id, label] of [["worker", "Member"], ["safety_manager", "Operator"], ["administrator", "Controller"], ["training_assessor", "Training assessor"]]) {
|
|
@@ -18,9 +18,12 @@ test("WorkspaceSelector passes workspaceSlug through generic page params", async
|
|
|
18
18
|
assert.doesNotMatch(source, /workspaceSlug:\s*normalizedSlug,\s*mode:\s*"workspace"/s);
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
test("WorkspaceSelector activator
|
|
21
|
+
test("WorkspaceSelector activator keeps Material 3's 48dp touch target without a fixed height", async () => {
|
|
22
22
|
const source = await readFile(COMPONENT_PATH, "utf8");
|
|
23
23
|
|
|
24
24
|
assert.match(source, /class="users-workspace-selector__activator text-none"/);
|
|
25
|
-
|
|
25
|
+
// material-web gives every default-size button a 48dp touch target around its 40dp body; a fixed height would
|
|
26
|
+
// make the button itself taller than Material 3 draws it.
|
|
27
|
+
assert.doesNotMatch(source, /min-height/u);
|
|
28
|
+
assert.doesNotMatch(source, /<v-btn[^>]*users-workspace-selector__activator[^>]*\ssize=/u);
|
|
26
29
|
});
|
|
@@ -82,7 +82,12 @@ async function checkWorkspaceSelector(page, viewport) {
|
|
|
82
82
|
await page.goto("/w/acme");
|
|
83
83
|
await page.getByText("Opened acme", { exact: true }).waitFor();
|
|
84
84
|
await expect(selector).toHaveText("Acme");
|
|
85
|
-
|
|
85
|
+
// Material 3 buttons are 40dp tall inside a 48dp touch target (material-web's ::before).
|
|
86
|
+
const selectorTarget = await selector.evaluate((button) => Math.max(
|
|
87
|
+
button.getBoundingClientRect().height,
|
|
88
|
+
Number.parseFloat(getComputedStyle(button, "::before").height) || 0
|
|
89
|
+
));
|
|
90
|
+
assert.ok(selectorTarget >= 48, `${viewport.name}: the selector is a 48px target`);
|
|
86
91
|
await assertNoHorizontalScroll(page, `${viewport.name} selector`);
|
|
87
92
|
|
|
88
93
|
await selector.click();
|
|
@@ -193,7 +198,10 @@ async function checkInvitesSection(page, viewport) {
|
|
|
193
198
|
]);
|
|
194
199
|
await assertNoHorizontalScroll(page, `${viewport.name} invitations`);
|
|
195
200
|
if (viewport.name === "phone") {
|
|
196
|
-
const heights = await section.locator(".v-btn").evaluateAll((buttons) => buttons.map((item) =>
|
|
201
|
+
const heights = await section.locator(".v-btn").evaluateAll((buttons) => buttons.map((item) => Math.max(
|
|
202
|
+
item.getBoundingClientRect().height,
|
|
203
|
+
Number.parseFloat(getComputedStyle(item, "::before").height) || 0
|
|
204
|
+
)));
|
|
197
205
|
assert.ok(heights.length === 4 && heights.every((height) => height >= 48), `${viewport.name}: 48px targets, got ${heights}`);
|
|
198
206
|
}
|
|
199
207
|
|
|
@@ -85,8 +85,12 @@ test("Your workspaces keeps its layout while responding and then opens the last
|
|
|
85
85
|
0,
|
|
86
86
|
`${viewport.name}: no horizontal scroll`
|
|
87
87
|
);
|
|
88
|
+
// Material 3 buttons are 40dp tall inside a 48dp touch target (material-web's ::before).
|
|
88
89
|
const buttonHeights = await page.locator(".workspaces-view__body .v-btn").evaluateAll(
|
|
89
|
-
(buttons) => buttons.map((button) =>
|
|
90
|
+
(buttons) => buttons.map((button) => Math.max(
|
|
91
|
+
button.getBoundingClientRect().height,
|
|
92
|
+
Number.parseFloat(getComputedStyle(button, "::before").height) || 0
|
|
93
|
+
))
|
|
90
94
|
);
|
|
91
95
|
assert.ok(buttonHeights.every((height) => height >= 48), `${viewport.name}: 48px targets, got ${buttonHeights}`);
|
|
92
96
|
const headingBox = await heading.boundingBox();
|