Getting ready for CHOW 2024 demo call tomorrow
This commit is contained in:
@@ -1,31 +1,27 @@
|
||||
<script lang="ts">
|
||||
import type { SvelteComponent } from 'svelte';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
|
||||
// const dispatch = createEventDispatcher();
|
||||
|
||||
|
||||
// This works and uses local storage:
|
||||
// store_current_tab must be prefixed with $ to be reactive.
|
||||
import { clipboard, localStorageStore, ProgressRadial } from '@skeletonlabs/skeleton';
|
||||
import { clipboard, FileDropzone, getModalStore, localStorageStore, ProgressRadial, TabGroup, Tab, TabAnchor } from '@skeletonlabs/skeleton';
|
||||
import type { Writable } from 'svelte/store';
|
||||
const store_current_tab: Writable<string> = localStorageStore('store_current_tab', 'start');
|
||||
const store_current_tab: Writable<string> = localStorageStore('ae_sponsorships_current_tab', 'start');
|
||||
console.log(`store_current_tab:`, $store_current_tab);
|
||||
|
||||
|
||||
// This works, but does not uses local storage:
|
||||
// store_current_tab is not reactive and should not be prefixed with $.
|
||||
// let store_current_tab: string = 'start';
|
||||
// console.log(`store_current_tab:`, store_current_tab);
|
||||
|
||||
|
||||
// This does not work:
|
||||
// let tab_set = $store_current_tab;
|
||||
// let tab_set = store_current_tab;
|
||||
|
||||
// Stores
|
||||
import { getModalStore, FileDropzone, TabGroup, Tab, TabAnchor } from '@skeletonlabs/skeleton';
|
||||
// import { getModalStore, FileDropzone, TabGroup, Tab, TabAnchor } from '@skeletonlabs/skeleton';
|
||||
|
||||
// Props
|
||||
/** Exposes parent props to this component. */
|
||||
@@ -50,6 +46,7 @@ onMount(() => {
|
||||
console.log('Sponsorship link:', $ae_loc.mod.sponsorships.link);
|
||||
}
|
||||
|
||||
// I tried adding this to load with the sponsorships +layout.ts. This did not seem to work. Probably an async related issue?
|
||||
let ds_code: null|string = 'sponsorships__agree_li';
|
||||
let ds_type: null|string = 'json';
|
||||
|
||||
@@ -78,21 +75,10 @@ onMount(() => {
|
||||
});
|
||||
});
|
||||
|
||||
// We've created a custom submit function to pass the response and close the modal.
|
||||
// function onFormSubmit(): void {
|
||||
// if ($modalStore[0].response) $modalStore[0].response(formData);
|
||||
// modalStore.close();
|
||||
// }
|
||||
|
||||
// Base Classes
|
||||
// const cBase = 'card p-4 shadow-xl space-y-4 ae_modal_scrollfix';
|
||||
// w-modal-wide
|
||||
// const cBase = 'bg-surface-100-800-token w-screen h-screen';
|
||||
// const cBase = 'card h-screen';
|
||||
// const cBase = 'card p-4 w-modal-wide h-screen shadow-xl space-y-4';
|
||||
|
||||
const cForm = 'border border-surface-500 p-4 space-y-4 rounded-container-token';
|
||||
|
||||
let ae_promises: key_val = {}; // Promise<any>;
|
||||
|
||||
$ae_loc.mod.sponsorships.submit_status = null;
|
||||
$ae_loc.mod.sponsorships.disable_submit__sponsorship_obj = false;
|
||||
let placeholder_li: key_val = {
|
||||
@@ -100,17 +86,10 @@ let placeholder_li: key_val = {
|
||||
file_logo_secondary: '-- No File Selected --',
|
||||
file_media_promo_video: '-- No File Selected --',
|
||||
};
|
||||
let ae_promises: key_val = {};
|
||||
// let ae_promises.api_create__sponsorship_obj: Promise<any>;
|
||||
|
||||
if ($slct.sponsorship_id) {
|
||||
console.log(`Sponsorship ID selected: ${$slct.sponsorship_id}`);
|
||||
console.log(`Sponsorship object selected:`, $slct.sponsorship_obj);
|
||||
|
||||
// $slct_trigger = 'load__sponsorship_obj';
|
||||
|
||||
// $ae_loc.mod.sponsorships.link = `${$ae_loc.href_url}/load?ae_id=${$slct.sponsorship_id}`;
|
||||
// console.log('Sponsorship link:', $ae_loc.mod.sponsorships.link);
|
||||
} else {
|
||||
$store_current_tab = 'start';
|
||||
$slct.sponsorship_id = null;
|
||||
|
||||
Reference in New Issue
Block a user