Remove disable_menu button because it was being abused to hide the file report button
This commit is contained in:
@@ -239,7 +239,6 @@ let custom_footer = ""
|
|||||||
let custom_footer_link = ""
|
let custom_footer_link = ""
|
||||||
let disable_download_button = false
|
let disable_download_button = false
|
||||||
let disable_share_button = false
|
let disable_share_button = false
|
||||||
let disable_menu = false
|
|
||||||
const apply_customizations = file => {
|
const apply_customizations = file => {
|
||||||
if (!file.branding) {
|
if (!file.branding) {
|
||||||
return
|
return
|
||||||
@@ -262,12 +261,6 @@ const apply_customizations = file => {
|
|||||||
if (file.branding.disable_share_button && !file.can_edit) {
|
if (file.branding.disable_share_button && !file.can_edit) {
|
||||||
disable_share_button = true
|
disable_share_button = true
|
||||||
}
|
}
|
||||||
if (file.branding.disable_menu && !file.can_edit) {
|
|
||||||
disable_menu = true
|
|
||||||
if (toolbar_visible) {
|
|
||||||
toolbar_toggle()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file.branding.background_image) {
|
if (file.branding.background_image) {
|
||||||
custom_background = window.api_endpoint+"/file/"+file.branding.background_image
|
custom_background = window.api_endpoint+"/file/"+file.branding.background_image
|
||||||
@@ -376,7 +369,6 @@ const keyboard_event = evt => {
|
|||||||
|
|
||||||
<div class="file_viewer" bind:this={file_viewer}>
|
<div class="file_viewer" bind:this={file_viewer}>
|
||||||
<div class="headerbar">
|
<div class="headerbar">
|
||||||
{#if !disable_menu}
|
|
||||||
<button
|
<button
|
||||||
on:click={toolbar_toggle}
|
on:click={toolbar_toggle}
|
||||||
class="round"
|
class="round"
|
||||||
@@ -385,7 +377,6 @@ const keyboard_event = evt => {
|
|||||||
title="Open or close the toolbar">
|
title="Open or close the toolbar">
|
||||||
<i class="icon">menu</i>
|
<i class="icon">menu</i>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
|
||||||
|
|
||||||
<HomeButton embedded_viewer={embedded}/>
|
<HomeButton embedded_viewer={embedded}/>
|
||||||
|
|
||||||
|
@@ -21,7 +21,6 @@ let footer_image = ""
|
|||||||
let footer_link = ""
|
let footer_link = ""
|
||||||
let disable_download_button = false
|
let disable_download_button = false
|
||||||
let disable_share_button = false
|
let disable_share_button = false
|
||||||
let disable_menu = false
|
|
||||||
|
|
||||||
let select_file = t => {
|
let select_file = t => {
|
||||||
currently_selecting = t
|
currently_selecting = t
|
||||||
@@ -60,7 +59,6 @@ let save = async () => {
|
|||||||
form.append("footer_link", footer_link)
|
form.append("footer_link", footer_link)
|
||||||
form.append("disable_download_button", disable_download_button)
|
form.append("disable_download_button", disable_download_button)
|
||||||
form.append("disable_share_button", disable_share_button)
|
form.append("disable_share_button", disable_share_button)
|
||||||
form.append("disable_menu", disable_menu)
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const resp = await fetch(
|
const resp = await fetch(
|
||||||
@@ -94,7 +92,6 @@ onMount(() => {
|
|||||||
footer_link = b.footer_link ? b.footer_link : ""
|
footer_link = b.footer_link ? b.footer_link : ""
|
||||||
disable_download_button = b.disable_download_button ? b.disable_download_button : false
|
disable_download_button = b.disable_download_button ? b.disable_download_button : false
|
||||||
disable_share_button = b.disable_share_button ? b.disable_share_button : false
|
disable_share_button = b.disable_share_button ? b.disable_share_button : false
|
||||||
disable_menu = b.disable_menu ? b.disable_menu : false
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -244,17 +241,6 @@ onMount(() => {
|
|||||||
<i class="icon">close</i> OFF (click to turn on)
|
<i class="icon">close</i> OFF (click to turn on)
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
<p>
|
|
||||||
You can also choose the hide the menu bar altogether
|
|
||||||
</p>
|
|
||||||
Disable menu:
|
|
||||||
<button on:click={() => {disable_menu = !disable_menu; save()}}>
|
|
||||||
{#if disable_menu}
|
|
||||||
<i class="icon">check</i> ON (click to turn off)
|
|
||||||
{:else}
|
|
||||||
<i class="icon">close</i> OFF (click to turn on)
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<FilePicker
|
<FilePicker
|
||||||
|
Reference in New Issue
Block a user