Compare commits
2 Commits
382eddf8ea
...
5d24b80e26
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d24b80e26 | |||
| 32263ad6c6 |
@@ -5,8 +5,8 @@
|
||||
import favicon from "$lib/assets/favicon.svg"
|
||||
|
||||
let { data } = $props();
|
||||
const all_prefixes = [...data.prefixes];
|
||||
let prefix_name = $state("");
|
||||
let all_prefixes = $state([]);
|
||||
let current_prefix = $state({name: "", color: "", weight: 0});
|
||||
let admin_mode = $state(false);
|
||||
const venue = env.PUBLIC_TAM3_VENUE || "TAM3";
|
||||
@@ -19,7 +19,6 @@
|
||||
})
|
||||
|
||||
if (browser) {
|
||||
all_prefixes = [...data.prefixes];
|
||||
document.title = `${venue} - Main Menu`;
|
||||
hotkeys.filter = function(event) {return true};
|
||||
hotkeys('alt+a', function(event) {event.preventDefault(); admin_mode = !admin_mode; return false;});
|
||||
@@ -36,7 +35,7 @@
|
||||
<img src="{favicon}" alt="TAM3 Icon - Red ticket with TAM3 on it" class="icon">
|
||||
<h1>{venue} - Main Menu</h1>
|
||||
</div>
|
||||
{#if prefix_name !== ""}
|
||||
{#if all_prefixes.length > 0}
|
||||
<div class="universal-reports flex-row tb-margin">
|
||||
<a href="/counts" target="_blank" class="styled">Counts</a>
|
||||
</div>
|
||||
@@ -66,6 +65,8 @@
|
||||
<a href="/reports/byname/{current_prefix.name}/" target="_blank" class="styled">By Name</a>
|
||||
<a href="/reports/bybasket/{current_prefix.name}/" target="_blank" class="styled">By Basket ID</a>
|
||||
</div>
|
||||
{:else}
|
||||
<p>There aren't any prefixes available, please create them.</p>
|
||||
{/if}
|
||||
</div>
|
||||
{#if admin_mode}
|
||||
|
||||
Reference in New Issue
Block a user