Convert multiple pages into SPA
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { fs_rename, fs_update, type FSNode, type NodeOptions } from "filesystem/FilesystemAPI";
|
||||
import { fs_rename, fs_update, type FSNode, type NodeOptions } from "lib/FilesystemAPI";
|
||||
import Modal from "util/Modal.svelte";
|
||||
import BrandingOptions from "./BrandingOptions.svelte";
|
||||
import { branding_from_node } from "./Branding";
|
||||
@@ -39,18 +39,9 @@ export const edit = (f: FSNode, oae = false, open_tab = "") => {
|
||||
}
|
||||
|
||||
options.custom_domain_name = file.custom_domain_name
|
||||
|
||||
options.shared = !(file.id === undefined || file.id === "")
|
||||
if (options.shared) {
|
||||
if (file.link_permissions === undefined) {
|
||||
// Default to read-only for public links
|
||||
file.link_permissions = { owner: false, read: true, write: false, delete: false}
|
||||
} else {
|
||||
options.link_permissions = file.link_permissions
|
||||
}
|
||||
options.user_permissions = file.user_permissions
|
||||
options.password_permissions = file.password_permissions
|
||||
}
|
||||
options.link_permissions = file.link_permissions
|
||||
options.user_permissions = file.user_permissions
|
||||
options.password_permissions = file.password_permissions
|
||||
|
||||
branding_enabled = options.branding_enabled === "true"
|
||||
if (branding_enabled) {
|
||||
@@ -122,7 +113,7 @@ const save = async (keep_editing = false) => {
|
||||
<i class="icon">share</i>
|
||||
Sharing
|
||||
</button>
|
||||
{#if options.shared && $nav.permissions.owner}
|
||||
{#if $nav.permissions.owner}
|
||||
<button class:button_highlight={tab === "access"} on:click={() => tab = "access"}>
|
||||
<i class="icon">key</i>
|
||||
Access control
|
||||
|
||||
Reference in New Issue
Block a user