Skip to content

Commit

Permalink
format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesPeck committed Feb 27, 2024
1 parent c799a52 commit c60fd8f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ async function send({
method,
path,
token,
data,
data
}: {
method: string;
path: string;
Expand All @@ -13,7 +13,7 @@ async function send({
}) {
const opts: { method: string; headers: { [key: string]: string }; body?: string } = {
method,
headers: {},
headers: {}
};

if (data) {
Expand Down
39 changes: 23 additions & 16 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
<script lang="ts">
import { AppShell, initializeStores, Modal, Toast, getModalStore, type ModalSettings } from '@skeletonlabs/skeleton';
import {
AppShell,
initializeStores,
Modal,
Toast,
getModalStore,
type ModalSettings
} from '@skeletonlabs/skeleton';
import Navigation from '$lib/navigation.svelte';
import '@fortawesome/fontawesome-free/css/all.min.css';
import '../app.postcss';
import { onMount } from 'svelte';
initializeStores();
let modalProps: Record<string, unknown> = {
buttonPositive: 'variant-filled-primary',
buttonPositive: 'variant-filled-primary'
};
const modalStore = getModalStore();
onMount(() => {
document.body.classList.add("started");
document.body.classList.add('started');
checkForSession();
});
// // Floating UI for Popups
Expand All @@ -21,19 +28,19 @@
function checkForSession() {
if (!sessionStorage.getItem('token')) {
const modal: ModalSettings = {
type: 'prompt',
// Data
title: 'Enter Long Term Token',
body: 'Provide your long term token below.',
// Populates the input value and attributes
value: 'Token here...',
valueAttr: { type: 'text', required: true },
// Returns the updated response value
response: (r: string) => {
sessionStorage.setItem('token', r);
},
};
modalStore.trigger(modal);
type: 'prompt',
// Data
title: 'Enter Long Term Token',
body: 'Provide your long term token below.',
// Populates the input value and attributes
value: 'Token here...',
valueAttr: { type: 'text', required: true },
// Returns the updated response value
response: (r: string) => {
sessionStorage.setItem('token', r);
}
};
modalStore.trigger(modal);
}
}
</script>
Expand Down

0 comments on commit c60fd8f

Please sign in to comment.