mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 21:05:15 +00:00
* Progress bar should be primary colour * Projects page shouldn't refresh on archive * Fix GitHub syncing * Add HCA lookup * Fix .ad and .mdx * Misc. * Badges can use owner/repo * Format + make Zeitwerk happy
31 lines
852 B
TypeScript
31 lines
852 B
TypeScript
import "@fontsource-variable/spline-sans";
|
|
import { createInertiaApp, type ResolvedComponent } from "@inertiajs/svelte";
|
|
import AppLayout from "../layouts/AppLayout.svelte";
|
|
|
|
const pages = import.meta.glob<ResolvedComponent>("../pages/**/*.svelte", {
|
|
eager: true,
|
|
});
|
|
|
|
createInertiaApp({
|
|
// see https://inertia-rails.dev/guide/progress-indicators
|
|
progress: {
|
|
color: 'var(--color-primary)',
|
|
},
|
|
|
|
resolve: (name) => {
|
|
const component = pages[`../pages/${name}.svelte`];
|
|
if (!component) {
|
|
console.error(`Missing Inertia page component: '${name}.svelte'`);
|
|
}
|
|
|
|
const layout =
|
|
component.layout === false ? undefined : component.layout || AppLayout;
|
|
return { default: component.default, layout } as ResolvedComponent;
|
|
},
|
|
|
|
defaults: {
|
|
form: {
|
|
forceIndicesArrayFormatInFormData: false,
|
|
},
|
|
},
|
|
});
|