Fork pd_web, remove everything we don't need
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import type { FSNavigator } from "./FSNavigator";
|
||||
import { fs_node_icon, fs_share_hotlink_url, fs_share_url, fs_update, type FSNode } from "./FilesystemAPI";
|
||||
import { fs_node_icon, fs_share_hotlink_url, fs_share_url, fs_update, node_is_shared, type FSNode, type FSPermissions } from "./FilesystemAPI";
|
||||
import { copy_text } from "util/Util.svelte";
|
||||
import CopyButton from "layout/CopyButton.svelte";
|
||||
import Dialog from "layout/Dialog.svelte";
|
||||
@@ -36,11 +36,16 @@ export const open = async (e: MouseEvent, p: FSNode[]) => {
|
||||
}
|
||||
|
||||
const make_public = async () => {
|
||||
base = await fs_update(base.path, {shared: true})
|
||||
await nav.reload()
|
||||
if (!node_is_shared(base)) {
|
||||
base = await fs_update(
|
||||
base.path,
|
||||
{link_permissions: {read: true} as FSPermissions},
|
||||
)
|
||||
await nav.reload()
|
||||
|
||||
// Insert the new FSNode into the path
|
||||
path[path.length-1] = base
|
||||
// Insert the new FSNode into the path
|
||||
path[path.length-1] = base
|
||||
}
|
||||
}
|
||||
|
||||
const share = async () => {
|
||||
|
||||
Reference in New Issue
Block a user