@7365admin1/layer-common 4.2.25 → 4.2.26
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.2.26
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0b370e9: Notification Settings: say which channels are on, and stop drawing a switch that cannot move.
|
|
8
|
+
|
|
9
|
+
Every category read "On everywhere" while the Email row beneath it was disabled with a sentence explaining that nothing emails anyone about it — the screen offered a control it could not honour, then counted the two controls it could as all three. The summary now names the channels that are on ("On: In the app, Phone alerts"), and only the channels a category can actually deliver on are drawn. Both mobile settings screens get the same treatment in their own repositories.
|
|
10
|
+
|
|
3
11
|
## 4.2.25
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -785,11 +793,11 @@
|
|
|
785
793
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
786
794
|
own rule from two endpoints the console already calls, unprojected:
|
|
787
795
|
|
|
788
|
-
|
|
789
|
-
|
|
796
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
797
|
+
GET /api/roles/id/:role that membership's role document
|
|
790
798
|
|
|
791
|
-
|
|
792
|
-
|
|
799
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
800
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
793
801
|
|
|
794
802
|
`role.default` is the marker because it is the only property of a platform
|
|
795
803
|
staff role no API caller can set - `role.controller.ts` validates create and
|
|
@@ -109,28 +109,24 @@
|
|
|
109
109
|
</AppButton>
|
|
110
110
|
|
|
111
111
|
<!-- one channel per row: a switch must never sit beside the
|
|
112
|
-
NEXT channel's label, which is what a three-up grid does
|
|
112
|
+
NEXT channel's label, which is what a three-up grid does.
|
|
113
|
+
Only channels this category can really deliver on are
|
|
114
|
+
drawn — a switch that will not move is not a setting. -->
|
|
113
115
|
<v-row no-gutters>
|
|
114
116
|
<v-col
|
|
115
|
-
v-for="(channel, index) in category
|
|
117
|
+
v-for="(channel, index) in switchableIn(category)"
|
|
116
118
|
:key="channel.key"
|
|
117
119
|
cols="12"
|
|
118
|
-
:class="index < category.
|
|
120
|
+
:class="index < switchableIn(category).length - 1 ? 'border-b-thin' : ''"
|
|
119
121
|
>
|
|
120
|
-
<div
|
|
121
|
-
class="d-flex align-center justify-space-between py-2"
|
|
122
|
-
:class="{ 'channel-unavailable': !channel.supported }"
|
|
123
|
-
>
|
|
122
|
+
<div class="d-flex align-center justify-space-between py-2">
|
|
124
123
|
<div class="pr-4">
|
|
125
124
|
<div class="channel-label">{{ channel.label }}</div>
|
|
126
|
-
<div v-if="!channel.supported" class="channel-note mt-1">
|
|
127
|
-
{{ channel.note }}
|
|
128
|
-
</div>
|
|
129
125
|
</div>
|
|
130
126
|
|
|
131
127
|
<v-switch
|
|
132
128
|
:model-value="channel.enabled"
|
|
133
|
-
:disabled="
|
|
129
|
+
:disabled="saving"
|
|
134
130
|
color="primary"
|
|
135
131
|
hide-details
|
|
136
132
|
density="compact"
|
|
@@ -206,11 +202,17 @@ const allOn = computed(
|
|
|
206
202
|
categories.value.every((category) => categoryAllOn(category)),
|
|
207
203
|
);
|
|
208
204
|
|
|
209
|
-
/**
|
|
205
|
+
/**
|
|
206
|
+
* What is on, in words — so a collapsed panel still says what it is doing.
|
|
207
|
+
*
|
|
208
|
+
* The channels are NAMED rather than summarised as "on everywhere". Not every
|
|
209
|
+
* category can reach a person every way, so "everywhere" was a claim about
|
|
210
|
+
* three channels for a category that only ever had two — the screen said the
|
|
211
|
+
* email nobody sends was on.
|
|
212
|
+
*/
|
|
210
213
|
function summaryFor(category: TNotificationCategorySetting) {
|
|
211
214
|
const on = switchableIn(category).filter((c) => c.enabled);
|
|
212
215
|
if (!on.length) return "Off";
|
|
213
|
-
if (on.length === switchableIn(category).length) return "On everywhere";
|
|
214
216
|
return `On: ${on.map((c) => c.label).join(", ")}`;
|
|
215
217
|
}
|
|
216
218
|
|
|
@@ -357,17 +359,4 @@ onMounted(load);
|
|
|
357
359
|
font-size: var(--fs-breadcrumb);
|
|
358
360
|
color: var(--text2);
|
|
359
361
|
}
|
|
360
|
-
|
|
361
|
-
/* Unavailable channels are shown and explained, never hidden.
|
|
362
|
-
*
|
|
363
|
-
* They are NOT faded. The disabled switch already says the control cannot be
|
|
364
|
-
* moved, and the sentence beside it is the only place a person is told why —
|
|
365
|
-
* dimming that sentence is dimming the explanation. A blanket opacity here
|
|
366
|
-
* measured 2.3:1 against the card, which is unreadable; the row is now marked
|
|
367
|
-
* by a rule down its edge instead, and every word stays at full strength. */
|
|
368
|
-
.channel-unavailable {
|
|
369
|
-
border-left: 2px solid rgb(var(--v-border-color));
|
|
370
|
-
padding-left: 12px;
|
|
371
|
-
opacity: 1;
|
|
372
|
-
}
|
|
373
362
|
</style>
|
|
@@ -14,10 +14,13 @@
|
|
|
14
14
|
export type TNotificationChannelSetting = {
|
|
15
15
|
key: string;
|
|
16
16
|
label: string;
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Whether this category can reach them this way at all. The server now sends
|
|
19
|
+
* only the channels that can, so this is true for everything it sends; the
|
|
20
|
+
* screen still filters on it so an older server, which sent all three and
|
|
21
|
+
* marked the dead one false, draws the same two switches.
|
|
22
|
+
*/
|
|
18
23
|
supported: boolean;
|
|
19
|
-
/** the plain-English reason, present only when unsupported */
|
|
20
|
-
note?: string;
|
|
21
24
|
enabled: boolean;
|
|
22
25
|
};
|
|
23
26
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.2.
|
|
5
|
+
"version": "4.2.26",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|