-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
179 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
interface Rating { | ||
rating: number; | ||
code: string; | ||
humanReadable: string; | ||
} | ||
export interface User { | ||
id: string; | ||
rating: Rating; | ||
pilotRating: Rating; | ||
militaryRating: Rating; | ||
suspDate: Date; | ||
regDate: Date; | ||
region: 'string'; | ||
division: string; | ||
subdivision: string; | ||
lastRatingChange: Date; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script> | ||
import 'carbon-components-svelte/css/g10.css'; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<script> | ||
import 'carbon-components-svelte/css/g10.css'; | ||
import { | ||
Header, | ||
HeaderUtilities, | ||
HeaderAction, | ||
HeaderGlobalAction, | ||
HeaderPanelLinks, | ||
HeaderPanelDivider, | ||
HeaderPanelLink, | ||
SideNav, | ||
SideNavItems, | ||
SideNavMenu, | ||
SideNavMenuItem, | ||
SideNavLink, | ||
SkipToContent, | ||
Content, | ||
Grid, | ||
Row, | ||
Column | ||
} from 'carbon-components-svelte'; | ||
import SettingsAdjust from 'carbon-icons-svelte/lib/SettingsAdjust.svelte'; | ||
import UserAvatarFilledAlt from 'carbon-icons-svelte/lib/UserAvatarFilledAlt.svelte'; | ||
let isSideNavOpen = false; | ||
let isOpen1 = false; | ||
let isOpen2 = false; | ||
</script> | ||
|
||
<Header company="ROvACC" platformName="Operations" bind:isSideNavOpen> | ||
<svelte:fragment slot="skip-to-content"> | ||
<SkipToContent /> | ||
</svelte:fragment> | ||
<HeaderUtilities> | ||
<HeaderGlobalAction aria-label="Settings" icon={SettingsAdjust} /> | ||
<HeaderAction bind:isOpen={isOpen1} icon={UserAvatarFilledAlt} closeIcon={UserAvatarFilledAlt}> | ||
<HeaderPanelLinks> | ||
<HeaderPanelDivider>Switcher subject 1</HeaderPanelDivider> | ||
<HeaderPanelLink>Switcher item 1</HeaderPanelLink> | ||
<HeaderPanelLink>Switcher item 2</HeaderPanelLink> | ||
<HeaderPanelLink>Switcher item 3</HeaderPanelLink> | ||
<HeaderPanelLink>Switcher item 4</HeaderPanelLink> | ||
<HeaderPanelDivider>Switcher subject 2</HeaderPanelDivider> | ||
<HeaderPanelLink>Switcher item 1</HeaderPanelLink> | ||
<HeaderPanelLink>Switcher item 2</HeaderPanelLink> | ||
<HeaderPanelDivider>Switcher subject 3</HeaderPanelDivider> | ||
<HeaderPanelLink>Switcher item 1</HeaderPanelLink> | ||
</HeaderPanelLinks> | ||
</HeaderAction> | ||
</HeaderUtilities> | ||
</Header> | ||
|
||
<SideNav bind:isOpen={isSideNavOpen}> | ||
<SideNavItems> | ||
<SideNavLink text="Link 1" /> | ||
<SideNavLink text="Link 2" /> | ||
<SideNavLink text="Link 3" /> | ||
<SideNavMenu text="Menu"> | ||
<SideNavMenuItem href="/" text="Link 1" /> | ||
<SideNavMenuItem href="/" text="Link 2" /> | ||
<SideNavMenuItem href="/" text="Link 3" /> | ||
</SideNavMenu> | ||
</SideNavItems> | ||
</SideNav> | ||
|
||
<Content> | ||
<Grid> | ||
<Row> | ||
<Column> | ||
<h1>Welcome</h1> | ||
<slot /> | ||
</Column> | ||
</Row> | ||
</Grid> | ||
</Content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
export function load() { | ||
export async function load() { | ||
const response = await fetch('https://metar.vatsim.net/metar.php?id=LROP'); | ||
const metar = response.ok ? response.text() : ''; | ||
return { | ||
today: new Date().toISOString() | ||
today: new Date().toISOString(), | ||
metar | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
</script> | ||
|
||
<h1>Welcome to SvelteKit</h1> | ||
<p>Today is {data.today}</p> | ||
<p>Today is {data.metar}</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { writable } from 'svelte/store'; | ||
import type { User } from '@rovacc/vatsim-types'; | ||
|
||
const createAuthStore = () => { | ||
const { subscribe, set, update } = writable({}); | ||
|
||
return { | ||
subscribe, | ||
set, | ||
login: (user: User) => set({ user }), | ||
logout: () => set({}) | ||
}; | ||
}; | ||
|
||
export const auth = createAuthStore(); |