Remove disable_menu button because it was being abused to hide the file report button

This commit is contained in:
2024-06-26 19:12:33 +02:00
parent 19a9aceefd
commit 1200523fa6
2 changed files with 8 additions and 31 deletions

View File

@@ -239,7 +239,6 @@ let custom_footer = ""
let custom_footer_link = ""
let disable_download_button = false
let disable_share_button = false
let disable_menu = false
const apply_customizations = file => {
if (!file.branding) {
return
@@ -262,12 +261,6 @@ const apply_customizations = file => {
if (file.branding.disable_share_button && !file.can_edit) {
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) {
custom_background = window.api_endpoint+"/file/"+file.branding.background_image
@@ -376,16 +369,14 @@ const keyboard_event = evt => {
<div class="file_viewer" bind:this={file_viewer}>
<div class="headerbar">
{#if !disable_menu}
<button
on:click={toolbar_toggle}
class="round"
class:button_highlight={toolbar_visible}
style="line-height: 1em;"
title="Open or close the toolbar">
<i class="icon">menu</i>
</button>
{/if}
<button
on:click={toolbar_toggle}
class="round"
class:button_highlight={toolbar_visible}
style="line-height: 1em;"
title="Open or close the toolbar">
<i class="icon">menu</i>
</button>
<HomeButton embedded_viewer={embedded}/>

View File

@@ -21,7 +21,6 @@ let footer_image = ""
let footer_link = ""
let disable_download_button = false
let disable_share_button = false
let disable_menu = false
let select_file = t => {
currently_selecting = t
@@ -60,7 +59,6 @@ let save = async () => {
form.append("footer_link", footer_link)
form.append("disable_download_button", disable_download_button)
form.append("disable_share_button", disable_share_button)
form.append("disable_menu", disable_menu)
try {
const resp = await fetch(
@@ -94,7 +92,6 @@ onMount(() => {
footer_link = b.footer_link ? b.footer_link : ""
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_menu = b.disable_menu ? b.disable_menu : false
}
})
</script>
@@ -244,17 +241,6 @@ onMount(() => {
<i class="icon">close</i> OFF (click to turn on)
{/if}
</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>
<FilePicker