Block sharing if subscription does not support it
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user