Block sharing if subscription does not support it

This commit is contained in:
2026-07-30 23:13:55 +02:00
parent 263f959565
commit 1536b8bd1b
4 changed files with 63 additions and 13 deletions

View File

@@ -1,10 +1,11 @@
<script lang="ts">
import { run } from 'svelte/legacy';
import { domain_url } from "util/Util";
import CopyButton from "layout/CopyButton.svelte";
import { formatDate } from "util/Formatting";
import { type FSNode, type NodeOptions } from "lib/FilesystemAPI.svelte";
import AccessControl from "./AccessControl.svelte";
import { onMount } from 'svelte';
import { user } from "lib/UserStore";
let {
file = $bindable(),
@@ -45,11 +46,18 @@ const toggle_example = () => {
}
let share_link = $derived(window.location.protocol+"//"+window.location.host+"/d/"+file.id)
run(() => {
onMount(() => {
embed_iframe(file, options)
});
</script>
{#if $user.subscription.file_sharing === false}
<div class="highlight_yellow">
Your account does not support sharing features. Access controls will not
have any effect until you upgrade to premium.
</div>
{/if}
<fieldset>
<legend>Public link</legend>