Still working on upgrading to Tailwind CSS v4 an dSkeleton v3.....
This commit is contained in:
@@ -5,8 +5,6 @@ export let data: any;
|
||||
import { goto } from '$app/navigation';
|
||||
import { onMount } from 'svelte';
|
||||
import type { Writable } from 'svelte/store';
|
||||
import { localStorageStore } from '@skeletonlabs/skeleton';
|
||||
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
// import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import { api } from '$lib/api';
|
||||
@@ -103,14 +101,14 @@ onMount(() => {
|
||||
class:hidden={$ae_loc.iframe}
|
||||
>
|
||||
|
||||
<span class="btn-group variant-soft-secondary px-4 py-2">
|
||||
<span class=" preset-tonal-secondary px-4 py-2">
|
||||
{#each Object.entries(data.submenu) as [key, item]}
|
||||
<!-- <a href="/settings/{item.slug}">{item.title}</a> -->
|
||||
<!-- class:hidden={!$ae_loc.trusted_access && item.access} -->
|
||||
{#if item.disable}
|
||||
<button
|
||||
title={item.title}
|
||||
class="hover:variant-ghost-secondary"
|
||||
class="hover:preset-tonal-secondary border border-secondary-500"
|
||||
class:hidden={(!$ae_loc.trusted_access && item.access === 'trusted') || (!$ae_loc.administrator_access && item.access === 'administrator' || item.hide)}
|
||||
disabled={item.disable}
|
||||
|
||||
@@ -127,7 +125,7 @@ onMount(() => {
|
||||
<a
|
||||
href={item.href}
|
||||
title={item.title}
|
||||
class="hover:variant-ghost-secondary"
|
||||
class="hover:preset-tonal-secondary border border-secondary-500"
|
||||
class:hidden={(!$ae_loc.trusted_access && item.access === 'trusted') || (!$ae_loc.administrator_access && item.access === 'administrator' || item.hide)}
|
||||
class:disabled={item.disable}
|
||||
>
|
||||
|
||||
@@ -334,7 +334,7 @@ function handle_qr_camera(event) {
|
||||
{#if $ae_loc.iframe}
|
||||
<span class="flex flex-row items-center justify-center">
|
||||
<img src={$ae_loc.site_cfg_json?.header_image_path} alt="header" class="w-auto max-h-20 m-2" />
|
||||
<h1 class="h3 text-center m-2">Review & Print<br>Your Badge</h1>
|
||||
<h1 class="h3 text-center m-2">Review & Print<br>Your Badge</h1>
|
||||
</span>
|
||||
{:else}
|
||||
<header>
|
||||
@@ -342,7 +342,7 @@ function handle_qr_camera(event) {
|
||||
</header>
|
||||
{/if}
|
||||
|
||||
<div class="variant-ghost-success my-2 p-2 flex flex-row items-center">
|
||||
<div class="preset-tonal-success border border-success-500 my-2 p-2 flex flex-row items-center">
|
||||
|
||||
{#if $events_sess.badges.show_form__search}
|
||||
<form
|
||||
@@ -350,7 +350,7 @@ function handle_qr_camera(event) {
|
||||
$events_trigger = 'load__event_badge_obj_li';
|
||||
}}
|
||||
autocomplete="off"
|
||||
class="form flex-grow flex flex-row flex-wrap gap-1 justify-center items-center w-full"
|
||||
class="form grow flex flex-row flex-wrap gap-1 justify-center items-center w-full"
|
||||
>
|
||||
{#if $ae_loc.trusted_access && badge_type_code_li}
|
||||
<div class="search_by_badge_type_code">
|
||||
@@ -402,7 +402,7 @@ function handle_qr_camera(event) {
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-lg variant-ghost-success hover:variant-glass-success text-2xl font-bold w-48 transition-all"
|
||||
class="btn btn-lg preset-tonal-success border border-success-500 hover:preset-tonal-success text-2xl font-bold w-48 transition-all"
|
||||
on:click={() => {
|
||||
|
||||
}}
|
||||
@@ -490,7 +490,7 @@ function handle_qr_camera(event) {
|
||||
$events_sess.badges.show_form__scan = true;
|
||||
$events_sess.badges.qr_scan_start = true;
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-primary"
|
||||
class="btn btn-sm preset-tonal-primary border border-primary-500"
|
||||
>
|
||||
<span class="fas fa-qrcode mx-1"></span>
|
||||
QR Scan
|
||||
@@ -504,7 +504,7 @@ function handle_qr_camera(event) {
|
||||
$events_sess.badges.show_form__scan = false;
|
||||
$events_sess.badges.qr_scan_start = false;
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-primary"
|
||||
class="btn btn-sm preset-tonal-primary border border-primary-500"
|
||||
>
|
||||
<span class="fas fa-search mx-1"></span>
|
||||
Search
|
||||
@@ -558,7 +558,7 @@ function handle_qr_camera(event) {
|
||||
>
|
||||
<td class="">
|
||||
<button
|
||||
class="btn btn-xl text-xl variant-ghost-secondary hover:variant-glass-secondary w-96 overflow-hidden transition-all"
|
||||
class="btn btn-lg text-xl preset-tonal-secondary border border-secondary-500 hover:preset-tonal-secondary w-96 overflow-hidden transition-all"
|
||||
on:click={() => {
|
||||
// Confirm they want to view the badge.
|
||||
if (badge_obj.print_count >= 1 && !confirm(`That badge has already been printed ${badge_obj.print_count} times. View badge for ${badge_obj.full_name}?`)) {
|
||||
@@ -583,7 +583,7 @@ function handle_qr_camera(event) {
|
||||
<span class="fas fa-check text-green-500"></span>
|
||||
|
||||
{#if $ae_loc.trusted_access}
|
||||
<span class="print_count variant-soft-warning px-1">{badge_obj.print_count}×</span>
|
||||
<span class="print_count preset-tonal-warning px-1">{badge_obj.print_count}×</span>
|
||||
{/if}
|
||||
{/if}
|
||||
</span>
|
||||
@@ -673,7 +673,7 @@ function handle_qr_camera(event) {
|
||||
// badge_obj.print_count = 0;
|
||||
ae_triggers.print_count = true;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning"
|
||||
class="btn btn-sm preset-tonal-warning"
|
||||
>
|
||||
<span class="fas fa-save m-1"></span>
|
||||
Save
|
||||
@@ -709,7 +709,7 @@ function handle_qr_camera(event) {
|
||||
badge_obj.hide = !badge_obj?.hide;
|
||||
ae_triggers.hide = true;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning"
|
||||
class="btn btn-sm preset-tonal-warning"
|
||||
class:hidden={!$ae_loc.trusted_access}
|
||||
>
|
||||
{#if $ae_loc.trusted_access}
|
||||
@@ -730,12 +730,12 @@ function handle_qr_camera(event) {
|
||||
</table>
|
||||
</section>
|
||||
{:else}
|
||||
<div class="text-xl variant-filled-success font-bold p-2">
|
||||
<div class="text-xl preset-filled-success-500 font-bold p-2">
|
||||
Type your name, email, or affiliations. Results will start to appear automatically.
|
||||
</div>
|
||||
|
||||
{#if $events_sess.badges.fulltext_search_qry_str && $events_sess.badges.fulltext_search_qry_str.length > 5}
|
||||
<div class="text-xl variant-filled-warning font-bold p-2">
|
||||
<div class="text-xl preset-filled-warning-500 font-bold p-2">
|
||||
No badges found. Please change your search.
|
||||
</div>
|
||||
{/if}
|
||||
@@ -769,7 +769,7 @@ function handle_qr_camera(event) {
|
||||
console.log('Turn on iframe mode');
|
||||
$ae_loc.iframe = !$ae_loc.iframe;
|
||||
}}
|
||||
class="btn btn-sm variant-soft w-48"
|
||||
class="btn btn-sm preset-tonal w-48"
|
||||
>
|
||||
<span class="fas fa-compress mx-1"></span>
|
||||
Turn {$ae_loc.iframe ? 'off' : 'on'} iframe mode
|
||||
@@ -778,7 +778,7 @@ function handle_qr_camera(event) {
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn variant-soft-primary"
|
||||
class="btn preset-tonal-primary"
|
||||
on:click={() => {
|
||||
$events_sess.badges.show_form__search = true;
|
||||
$events_sess.badges.show_form__search_results = false;
|
||||
@@ -799,7 +799,7 @@ function handle_qr_camera(event) {
|
||||
|
||||
<Element_qr_scanner start_qr_scanner={$events_sess.badges.qr_scan_start} show_qr_scan_result={true} show_qr_manual_badge_id_entry_option={true} on:qr_scan_result={handle_qr_scan_result} on:qr_camera={handle_qr_camera} />
|
||||
|
||||
<div class="qr_quick_results variant-soft-secondary font-bold p-4">
|
||||
<div class="qr_quick_results preset-tonal-secondary font-bold p-4">
|
||||
{@html $events_sess.badges.qr_scan_result ?? 'No results yet'}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@ function handle_qr_camera(event) {
|
||||
{#if $ae_loc.iframe}
|
||||
<span class="flex flex-row items-center justify-center">
|
||||
<img src={$ae_loc.site_cfg_json?.header_image_path} alt="header" class="w-auto max-h-20 m-2" />
|
||||
<h1 class="h3 text-center m-2">Review & Print<br>Your Badge</h1>
|
||||
<h1 class="h3 text-center m-2">Review & Print<br>Your Badge</h1>
|
||||
</span>
|
||||
{:else}
|
||||
<header>
|
||||
@@ -349,7 +349,7 @@ function handle_qr_camera(event) {
|
||||
</header>
|
||||
{/if}
|
||||
|
||||
<div class="variant-ghost-success my-2 p-2 flex flex-row items-center">
|
||||
<div class="preset-tonal-success border border-success-500 my-2 p-2 flex flex-row items-center">
|
||||
|
||||
{#if $events_sess.badges.show_form__search}
|
||||
<form
|
||||
@@ -357,7 +357,7 @@ function handle_qr_camera(event) {
|
||||
$events_trigger = 'load__event_badge_obj_li';
|
||||
}}
|
||||
autocomplete="off"
|
||||
class="form flex-grow flex flex-row flex-wrap gap-1 justify-center items-center w-full"
|
||||
class="form grow flex flex-row flex-wrap gap-1 justify-center items-center w-full"
|
||||
>
|
||||
{#if $ae_loc.trusted_access && badge_type_code_li}
|
||||
<div class="search_by_badge_type_code">
|
||||
@@ -409,7 +409,7 @@ function handle_qr_camera(event) {
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-lg variant-ghost-success hover:variant-glass-success text-2xl font-bold w-48 transition-all"
|
||||
class="btn btn-lg preset-tonal-success border border-success-500 hover:preset-tonal-success text-2xl font-bold w-48 transition-all"
|
||||
on:click={() => {
|
||||
|
||||
}}
|
||||
@@ -497,7 +497,7 @@ function handle_qr_camera(event) {
|
||||
$events_sess.badges.show_form__scan = true;
|
||||
$events_sess.badges.qr_scan_start = true;
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-primary"
|
||||
class="btn btn-sm preset-tonal-primary border border-primary-500"
|
||||
>
|
||||
<span class="fas fa-qrcode mx-1"></span>
|
||||
QR Scan
|
||||
@@ -511,7 +511,7 @@ function handle_qr_camera(event) {
|
||||
$events_sess.badges.show_form__scan = false;
|
||||
$events_sess.badges.qr_scan_start = false;
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-primary"
|
||||
class="btn btn-sm preset-tonal-primary border border-primary-500"
|
||||
>
|
||||
<span class="fas fa-search mx-1"></span>
|
||||
Search
|
||||
@@ -565,7 +565,7 @@ function handle_qr_camera(event) {
|
||||
>
|
||||
<td class="">
|
||||
<button
|
||||
class="btn btn-xl text-xl variant-ghost-secondary hover:variant-glass-secondary w-96 overflow-hidden transition-all"
|
||||
class="btn btn-lg text-xl preset-tonal-secondary border border-secondary-500 hover:preset-tonal-secondary w-96 overflow-hidden transition-all"
|
||||
on:click={() => {
|
||||
// Confirm they want to view the badge.
|
||||
if (badge_obj.print_count >= 1 && !confirm(`That badge has already been printed ${badge_obj.print_count} times. View badge for ${badge_obj.full_name}?`)) {
|
||||
@@ -590,7 +590,7 @@ function handle_qr_camera(event) {
|
||||
<span class="fas fa-check text-green-500"></span>
|
||||
|
||||
{#if $ae_loc.trusted_access}
|
||||
<span class="print_count variant-soft-warning px-1">{badge_obj.print_count}×</span>
|
||||
<span class="print_count preset-tonal-warning px-1">{badge_obj.print_count}×</span>
|
||||
{/if}
|
||||
{/if}
|
||||
</span>
|
||||
@@ -680,7 +680,7 @@ function handle_qr_camera(event) {
|
||||
// badge_obj.print_count = 0;
|
||||
ae_triggers.print_count = true;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning"
|
||||
class="btn btn-sm preset-tonal-warning"
|
||||
>
|
||||
<span class="fas fa-save m-1"></span>
|
||||
Save
|
||||
@@ -716,7 +716,7 @@ function handle_qr_camera(event) {
|
||||
badge_obj.hide = !badge_obj?.hide;
|
||||
ae_triggers.hide = true;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning"
|
||||
class="btn btn-sm preset-tonal-warning"
|
||||
class:hidden={!$ae_loc.trusted_access}
|
||||
>
|
||||
{#if $ae_loc.trusted_access}
|
||||
@@ -737,12 +737,12 @@ function handle_qr_camera(event) {
|
||||
</table>
|
||||
</section>
|
||||
{:else}
|
||||
<div class="text-xl variant-filled-success font-bold p-2">
|
||||
<div class="text-xl preset-filled-success-500 font-bold p-2">
|
||||
Type your name, email, or affiliations. Results will start to appear automatically.
|
||||
</div>
|
||||
|
||||
{#if $events_sess.badges.fulltext_search_qry_str && $events_sess.badges.fulltext_search_qry_str.length > 5}
|
||||
<div class="text-xl variant-filled-warning font-bold p-2">
|
||||
<div class="text-xl preset-filled-warning-500 font-bold p-2">
|
||||
No badges found. Please change your search.
|
||||
</div>
|
||||
{/if}
|
||||
@@ -776,7 +776,7 @@ function handle_qr_camera(event) {
|
||||
console.log('Turn on iframe mode');
|
||||
$ae_loc.iframe = !$ae_loc.iframe;
|
||||
}}
|
||||
class="btn btn-sm variant-soft w-48"
|
||||
class="btn btn-sm preset-tonal w-48"
|
||||
>
|
||||
<span class="fas fa-compress mx-1"></span>
|
||||
Turn {$ae_loc.iframe ? 'off' : 'on'} iframe mode
|
||||
@@ -785,7 +785,7 @@ function handle_qr_camera(event) {
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn variant-soft-primary"
|
||||
class="btn preset-tonal-primary"
|
||||
on:click={() => {
|
||||
$events_sess.badges.show_form__search = true;
|
||||
$events_sess.badges.show_form__search_results = false;
|
||||
@@ -806,7 +806,7 @@ function handle_qr_camera(event) {
|
||||
|
||||
<Element_qr_scanner start_qr_scanner={$events_sess.badges.qr_scan_start} show_qr_scan_result={true} show_qr_manual_badge_id_entry_option={true} on:qr_scan_result={handle_qr_scan_result} on:qr_camera={handle_qr_camera} />
|
||||
|
||||
<div class="qr_quick_results variant-soft-secondary font-bold p-4">
|
||||
<div class="qr_quick_results preset-tonal-secondary font-bold p-4">
|
||||
{@html $events_sess.badges.qr_scan_result ?? 'No results yet'}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user