clay-server 2.34.0-beta.9 → 2.34.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/lib/project-connection.js +1 -0
- package/lib/project-sessions.js +33 -0
- package/lib/public/css/mobile-nav.css +0 -14
- package/lib/public/css/notifications-center.css +23 -19
- package/lib/public/css/sidebar.css +326 -101
- package/lib/public/index.html +7 -10
- package/lib/public/modules/diff.js +21 -7
- package/lib/public/modules/sidebar-mobile.js +10 -20
- package/lib/public/modules/sidebar-sessions.js +490 -113
- package/lib/public/modules/sidebar.js +8 -6
- package/lib/public/modules/tools.js +37 -10
- package/lib/public/sw.js +1 -1
- package/lib/sessions.js +90 -0
- package/lib/ws-schema.js +2 -0
- package/lib/yoke/adapters/codex.js +31 -4
- package/package.json +1 -1
|
@@ -146,6 +146,7 @@ function attachConnection(ctx) {
|
|
|
146
146
|
ownerId: s.ownerId || null,
|
|
147
147
|
sessionVisibility: s.sessionVisibility || "shared",
|
|
148
148
|
bookmarked: !!s.bookmarked,
|
|
149
|
+
favoriteOrder: typeof s.favoriteOrder === "number" ? s.favoriteOrder : null,
|
|
149
150
|
};
|
|
150
151
|
}),
|
|
151
152
|
});
|
package/lib/project-sessions.js
CHANGED
|
@@ -164,6 +164,39 @@ function attachSessions(ctx) {
|
|
|
164
164
|
return true;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
if (msg.type === "reorder_session_bookmarks") {
|
|
168
|
+
if (typeof msg.sourceId === "number" && typeof msg.targetId === "number" && msg.sourceId !== msg.targetId) {
|
|
169
|
+
var source = sm.sessions.get(msg.sourceId);
|
|
170
|
+
var target = sm.sessions.get(msg.targetId);
|
|
171
|
+
if (!source || !target) return true;
|
|
172
|
+
if (usersModule.isMultiUser() && ws._clayUser) {
|
|
173
|
+
if (!usersModule.canAccessSession(ws._clayUser.id, source, { visibility: "public" })) return true;
|
|
174
|
+
if (!usersModule.canAccessSession(ws._clayUser.id, target, { visibility: "public" })) return true;
|
|
175
|
+
}
|
|
176
|
+
sm.reorderBookmarkedSessions(msg.sourceId, msg.targetId, msg.insertBefore !== false);
|
|
177
|
+
}
|
|
178
|
+
return true;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (msg.type === "bulk_delete_sessions") {
|
|
182
|
+
if (!Array.isArray(msg.sessionIds) || msg.sessionIds.length === 0) return true;
|
|
183
|
+
var deletableIds = [];
|
|
184
|
+
for (var di = 0; di < msg.sessionIds.length; di++) {
|
|
185
|
+
var bulkId = msg.sessionIds[di];
|
|
186
|
+
if (typeof bulkId !== "number") continue;
|
|
187
|
+
var bulkTarget = sm.sessions.get(bulkId);
|
|
188
|
+
if (!bulkTarget) continue;
|
|
189
|
+
if (usersModule.isMultiUser() && ws._clayUser) {
|
|
190
|
+
if (!usersModule.canAccessSession(ws._clayUser.id, bulkTarget, { visibility: "public" })) continue;
|
|
191
|
+
}
|
|
192
|
+
deletableIds.push(bulkId);
|
|
193
|
+
}
|
|
194
|
+
if (deletableIds.length > 0) {
|
|
195
|
+
sm.deleteSessionsBulk(deletableIds, ws);
|
|
196
|
+
}
|
|
197
|
+
return true;
|
|
198
|
+
}
|
|
199
|
+
|
|
167
200
|
if (msg.type === "transfer_project_owner") {
|
|
168
201
|
// Home directory projects: ownership is permanently locked
|
|
169
202
|
if (osUsers && osUsers.length > 0 && /^\/home\/[^/]+\//.test(cwd)) {
|
|
@@ -526,20 +526,6 @@
|
|
|
526
526
|
white-space: nowrap;
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
-
.mobile-session-bookmark {
|
|
530
|
-
display: inline-flex;
|
|
531
|
-
align-items: center;
|
|
532
|
-
color: var(--accent, #ff7b54);
|
|
533
|
-
flex-shrink: 0;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
.mobile-session-bookmark .lucide,
|
|
537
|
-
.mobile-session-bookmark svg {
|
|
538
|
-
width: 13px;
|
|
539
|
-
height: 13px;
|
|
540
|
-
display: block;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
529
|
.mobile-session-processing {
|
|
544
530
|
width: 7px;
|
|
545
531
|
height: 7px;
|
|
@@ -309,45 +309,49 @@
|
|
|
309
309
|
|
|
310
310
|
.light-theme .notif-banner-clear-all {
|
|
311
311
|
background:
|
|
312
|
-
linear-gradient(180deg, rgba(255,255,255,0.
|
|
313
|
-
rgba(
|
|
314
|
-
|
|
312
|
+
linear-gradient(180deg, rgba(255,255,255,0.54), rgba(255,255,255,0.28)),
|
|
313
|
+
rgba(248,250,255,0.22);
|
|
314
|
+
backdrop-filter: blur(10px) saturate(1.08);
|
|
315
|
+
-webkit-backdrop-filter: blur(10px) saturate(1.08);
|
|
316
|
+
border-color: rgba(255,255,255,0.52);
|
|
315
317
|
color: rgba(36, 45, 66, 0.72);
|
|
316
318
|
box-shadow:
|
|
317
|
-
inset 0 1px 0 rgba(255,255,255,0.
|
|
318
|
-
0 8px 22px rgba(31, 41, 55, 0.
|
|
319
|
+
inset 0 1px 0 rgba(255,255,255,0.78),
|
|
320
|
+
0 8px 22px rgba(31, 41, 55, 0.07);
|
|
319
321
|
}
|
|
320
322
|
|
|
321
323
|
.light-theme .notif-banner-clear-all:hover {
|
|
322
324
|
color: rgba(22, 29, 45, 0.92);
|
|
323
325
|
background:
|
|
324
|
-
linear-gradient(180deg, rgba(255,255,255,0.
|
|
325
|
-
rgba(
|
|
326
|
-
border-color: rgba(
|
|
326
|
+
linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.34)),
|
|
327
|
+
rgba(248,250,255,0.26);
|
|
328
|
+
border-color: rgba(255,255,255,0.6);
|
|
327
329
|
}
|
|
328
330
|
|
|
329
331
|
.light-theme .notif-banner {
|
|
330
332
|
background:
|
|
331
|
-
linear-gradient(180deg, rgba(255,255,255,0.
|
|
332
|
-
rgba(
|
|
333
|
-
|
|
333
|
+
linear-gradient(180deg, rgba(255,255,255,0.58), rgba(255,255,255,0.22)),
|
|
334
|
+
rgba(248,250,255,0.2);
|
|
335
|
+
backdrop-filter: blur(12px) saturate(1.05);
|
|
336
|
+
-webkit-backdrop-filter: blur(12px) saturate(1.05);
|
|
337
|
+
border: 1px solid rgba(255,255,255,0.5);
|
|
334
338
|
box-shadow:
|
|
335
|
-
inset 0 1px 0 rgba(255,255,255,0.
|
|
336
|
-
0 10px 30px rgba(31, 41, 55, 0.
|
|
339
|
+
inset 0 1px 0 rgba(255,255,255,0.72),
|
|
340
|
+
0 10px 30px rgba(31, 41, 55, 0.09);
|
|
337
341
|
}
|
|
338
342
|
|
|
339
343
|
.light-theme .notif-banner:hover {
|
|
340
|
-
border-color: rgba(
|
|
344
|
+
border-color: rgba(255,255,255,0.62);
|
|
341
345
|
box-shadow:
|
|
342
|
-
inset 0 1px 0 rgba(255,255,255,0.
|
|
343
|
-
0 12px 34px rgba(31, 41, 55, 0.
|
|
346
|
+
inset 0 1px 0 rgba(255,255,255,0.8),
|
|
347
|
+
0 12px 34px rgba(31, 41, 55, 0.11);
|
|
344
348
|
}
|
|
345
349
|
|
|
346
350
|
.light-theme .notif-banner-icon {
|
|
347
|
-
background: linear-gradient(180deg, rgba(255,255,255,0.
|
|
348
|
-
border-color: rgba(
|
|
351
|
+
background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(246,249,255,0.36));
|
|
352
|
+
border-color: rgba(255,255,255,0.52);
|
|
349
353
|
color: var(--text-secondary);
|
|
350
|
-
box-shadow: inset 0 1px 0 rgba(255,255,255,0.
|
|
354
|
+
box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
|
|
351
355
|
}
|
|
352
356
|
|
|
353
357
|
.light-theme .notif-banner-project {
|