Folder access only in the Files tab; refresh screenshots
The Live tab keeps the restricted/open line but no longer edits the folder's access list. Screenshots show the Files access editor and ComfyUI's Graph and App icons.
This commit is contained in:
+3
-18
@@ -249,7 +249,6 @@ export class RigSharePanel {
|
||||
: h("span", { class: "rs-live rs-muted" }, h("i", { class: "pi pi-spin pi-spinner" }), "Joining…"),
|
||||
h("span", { class: "rs-avatars" }, ...here.map((u) => this.viewAvatar(u)))));
|
||||
body.push(this.accessLine());
|
||||
if (this.accessOpen && s.room?.manage && s.room.folder) body.push(this.accessEditor(s.room.folder));
|
||||
if (!s.canEdit) body.push(h("p", { class: "rs-note" }, h("i", { class: "pi pi-lock" }), c.perms.edit ? "View only in this workflow." : "View only — ask an admin for edit access."));
|
||||
if (s.canEdit) {
|
||||
row.append(h("button", {
|
||||
@@ -278,7 +277,7 @@ export class RigSharePanel {
|
||||
await this.run(() => this.sync.movePath(wf.path, dest ? `workflows/${dest}/${base}` : `workflows/${base}`), "Moved: it is live now");
|
||||
}
|
||||
|
||||
/** Who can open the workflow on screen: that is decided by its folder. */
|
||||
/** Who can open the workflow on screen: decided by its folder, managed in the Files tab. */
|
||||
accessLine() {
|
||||
const info = this.sync.room;
|
||||
if (!info) return null;
|
||||
@@ -286,24 +285,10 @@ export class RigSharePanel {
|
||||
return h("div", { class: "rs-access" },
|
||||
h("i", { class: `pi ${info.restricted ? "pi-lock" : "pi-globe"}` }),
|
||||
h("span", { class: "rs-grow" }, info.restricted ? `Only people with access to "${folder}"` : "Everyone can open it",
|
||||
folder && !info.restricted ? h("span", { class: "rs-muted" }, ` · in "${folder}"`) : null),
|
||||
info.manage ? h("button", {
|
||||
class: `rs-btn rs-btn-sm ${this.accessOpen ? "active" : ""}`, title: `Who can open the folder "${folder}"`,
|
||||
onclick: () => { this.accessOpen = !this.accessOpen; this.accessDraft = null; this.renderBody(); },
|
||||
}, "Folder access") : null);
|
||||
folder && !info.restricted ? h("span", { class: "rs-muted" }, ` · in "${folder}"`) : null));
|
||||
}
|
||||
|
||||
accessEditor(folder) {
|
||||
return this.accessEditorFor({
|
||||
load: () => this.client.request("GET", `/rigshare/api/workspace/folder?path=${encodeURIComponent(folder)}`),
|
||||
save: (restricted, members) => this.client.request("PATCH", "/rigshare/api/workspace/folders", { path: folder, restricted, members }),
|
||||
everyoneHint: "Anyone with an account can open its workflows, with their usual permissions",
|
||||
close: () => { this.accessOpen = false; this.accessDraft = null; this.renderBody(); },
|
||||
draftKey: "accessDraft",
|
||||
});
|
||||
}
|
||||
|
||||
/** Access editor for a shared folder (Files tab and the live workflow's folder). */
|
||||
/** Access editor for a shared folder (used by the Files tab). */
|
||||
accessEditorFor({ load, save, everyoneHint, close, draftKey }) {
|
||||
const box = h("div", { class: "rs-access-editor" }, h("p", { class: "rs-muted" }, "Loading…"));
|
||||
Promise.all([this.run(load), this.run(() => this.client.request("GET", "/rigshare/api/people"))]).then(([acl, people]) => {
|
||||
|
||||
Reference in New Issue
Block a user