Fork pd_web, remove everything we don't need

This commit is contained in:
2025-09-24 15:37:57 +02:00
parent 9dcdd94b3a
commit fd5cd0bfd1
415 changed files with 146269 additions and 120786 deletions

View File

@@ -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 () => {