Add path to bookmarks, add logout button
This commit is contained in:
@@ -55,6 +55,14 @@ export const node_is_shared = (node: FSNode): boolean => {
|
||||
}
|
||||
return false
|
||||
}
|
||||
export const path_is_shared = (path: FSNode[]): boolean => {
|
||||
for (let i = 0; i < path.length; i++) {
|
||||
if (node_is_shared(path[i])) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export type FSNodeProperties = {
|
||||
branding_enabled?: string,
|
||||
@@ -364,7 +372,7 @@ export const fs_share_path = (path: FSNode[]): string => {
|
||||
|
||||
// Find the last node in the path that has a public ID
|
||||
for (let i = path.length - 1; i >= 0; i--) {
|
||||
if (path[i].id !== undefined && path[i].id !== "me") {
|
||||
if (node_is_shared(path[i])) {
|
||||
bucket_idx = i
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user