@frockbot/plugin-settings 0.3.10 → 0.3.11
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/package.json +10 -10
- package/src/client/BotSettingsSurface.vue +30 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/plugin-settings",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"typecheck": "vue-tsc --noEmit -p tsconfig.json"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@frockbot/catalog-core": "0.3.
|
|
25
|
-
"@frockbot/client-core": "0.3.
|
|
26
|
-
"@frockbot/client-ui": "0.3.
|
|
27
|
-
"@frockbot/configuration-core": "0.3.
|
|
28
|
-
"@frockbot/connection-core": "0.3.
|
|
29
|
-
"@frockbot/kernel-composition": "0.3.
|
|
30
|
-
"@frockbot/kernel-contracts": "0.3.
|
|
31
|
-
"@frockbot/plugin-auth": "0.3.
|
|
32
|
-
"@frockbot/plugin-shell": "0.3.
|
|
24
|
+
"@frockbot/catalog-core": "0.3.11",
|
|
25
|
+
"@frockbot/client-core": "0.3.11",
|
|
26
|
+
"@frockbot/client-ui": "0.3.11",
|
|
27
|
+
"@frockbot/configuration-core": "0.3.11",
|
|
28
|
+
"@frockbot/connection-core": "0.3.11",
|
|
29
|
+
"@frockbot/kernel-composition": "0.3.11",
|
|
30
|
+
"@frockbot/kernel-contracts": "0.3.11",
|
|
31
|
+
"@frockbot/plugin-auth": "0.3.11",
|
|
32
|
+
"@frockbot/plugin-shell": "0.3.11",
|
|
33
33
|
"cordis": "4.0.0-rc.8",
|
|
34
34
|
"vue": "3.5.41"
|
|
35
35
|
},
|
|
@@ -59,6 +59,13 @@ const label = ref("");
|
|
|
59
59
|
const description = ref("");
|
|
60
60
|
const title = ref("");
|
|
61
61
|
const hiddenFromSidebar = ref(false);
|
|
62
|
+
/*
|
|
63
|
+
* Pinning is durable as the instant it happened, so the sidebar can order
|
|
64
|
+
* pinned Bots by pin time. The panel edits the intent; the original instant is
|
|
65
|
+
* kept across an unrelated save so re-saving never reshuffles the tiles.
|
|
66
|
+
*/
|
|
67
|
+
const pinned = ref(false);
|
|
68
|
+
const pinnedAt = ref("");
|
|
62
69
|
const notifications = ref(false);
|
|
63
70
|
const pendingApprovals = computed(() =>
|
|
64
71
|
web.value.approvals.filter((approval) => approval.decision === "pending"),
|
|
@@ -98,6 +105,8 @@ watch(
|
|
|
98
105
|
description.value = settings.profile.description ?? "";
|
|
99
106
|
title.value = settings.profile.title ?? "";
|
|
100
107
|
hiddenFromSidebar.value = settings.profile.hiddenFromSidebar === true;
|
|
108
|
+
pinnedAt.value = settings.profile.pinnedAt ?? "";
|
|
109
|
+
pinned.value = pinnedAt.value !== "";
|
|
101
110
|
notifications.value = settings.notifications.enabled;
|
|
102
111
|
},
|
|
103
112
|
{ immediate: true },
|
|
@@ -116,6 +125,10 @@ async function save(): Promise<void> {
|
|
|
116
125
|
description: description.value,
|
|
117
126
|
title: title.value,
|
|
118
127
|
hiddenFromSidebar: hiddenFromSidebar.value,
|
|
128
|
+
pinnedAt: pinned.value
|
|
129
|
+
? pinnedAt.value || new Date().toISOString()
|
|
130
|
+
: // The empty string unpins, the same way it clears an optional text field.
|
|
131
|
+
"",
|
|
119
132
|
});
|
|
120
133
|
await web.value.saveBotNotifications({ enabled: notifications.value });
|
|
121
134
|
surfaces.close();
|
|
@@ -162,6 +175,23 @@ async function save(): Promise<void> {
|
|
|
162
175
|
/>
|
|
163
176
|
</UiField>
|
|
164
177
|
</UiAnchor>
|
|
178
|
+
<UiAnchor
|
|
179
|
+
anchor="bot-pinned"
|
|
180
|
+
label="Pinned"
|
|
181
|
+
:href="link('bot-pinned')"
|
|
182
|
+
class="settings-row"
|
|
183
|
+
>
|
|
184
|
+
<label class="notification-setting">
|
|
185
|
+
<span>
|
|
186
|
+
<strong>Pinned</strong>
|
|
187
|
+
<small>
|
|
188
|
+
Pin this Bot to the top of the sidebar. Unpin it to put it back in
|
|
189
|
+
the list.
|
|
190
|
+
</small>
|
|
191
|
+
</span>
|
|
192
|
+
<input v-model="pinned" type="checkbox" />
|
|
193
|
+
</label>
|
|
194
|
+
</UiAnchor>
|
|
165
195
|
<UiAnchor
|
|
166
196
|
anchor="bot-description"
|
|
167
197
|
label="Description"
|