diff --git a/app/app.vue b/app/app.vue index ca0b432..3dddf52 100644 --- a/app/app.vue +++ b/app/app.vue @@ -2,9 +2,10 @@ + - + @@ -17,22 +18,4 @@ diff --git a/app/assets/css/main.css b/app/assets/css/main.css index 5dcf273..08044ec 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -36,6 +36,12 @@ gap: 1rem; } -.h-screen-no-header { +.h-layout { + /* margin of the navbar + actual navbar */ height: calc(100vh - 64px*2); } + +.min-h-layout { + /* margin of the navbar + actual navbar */ + min-height: calc(100vh - 64px*2); +} \ No newline at end of file diff --git a/app/components.d.ts b/app/components.d.ts index 51350f4..7828e50 100644 --- a/app/components.d.ts +++ b/app/components.d.ts @@ -21,6 +21,7 @@ declare module 'vue' { NCarousel: typeof import('naive-ui')['NCarousel'] NCarouselItem: typeof import('naive-ui')['NCarouselItem'] NChip: typeof import('naive-ui')['NChip'] + NCode: typeof import('naive-ui')['NCode'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] NDialog: typeof import('naive-ui')['NDialog'] NDialogProvider: typeof import('naive-ui')['NDialogProvider'] @@ -32,6 +33,8 @@ declare module 'vue' { NImg: typeof import('naive-ui')['NImg'] NInfiniteScroll: typeof import('naive-ui')['NInfiniteScroll'] NInput: typeof import('naive-ui')['NInput'] + NList: typeof import('naive-ui')['NList'] + NListItem: typeof import('naive-ui')['NListItem'] NLoadingBarProvider: typeof import('naive-ui')['NLoadingBarProvider'] NMenu: typeof import('naive-ui')['NMenu'] NMessageProvider: typeof import('naive-ui')['NMessageProvider'] @@ -62,6 +65,7 @@ declare global { const NCarousel: typeof import('naive-ui')['NCarousel'] const NCarouselItem: typeof import('naive-ui')['NCarouselItem'] const NChip: typeof import('naive-ui')['NChip'] + const NCode: typeof import('naive-ui')['NCode'] const NConfigProvider: typeof import('naive-ui')['NConfigProvider'] const NDialog: typeof import('naive-ui')['NDialog'] const NDialogProvider: typeof import('naive-ui')['NDialogProvider'] @@ -73,6 +77,8 @@ declare global { const NImg: typeof import('naive-ui')['NImg'] const NInfiniteScroll: typeof import('naive-ui')['NInfiniteScroll'] const NInput: typeof import('naive-ui')['NInput'] + const NList: typeof import('naive-ui')['NList'] + const NListItem: typeof import('naive-ui')['NListItem'] const NLoadingBarProvider: typeof import('naive-ui')['NLoadingBarProvider'] const NMenu: typeof import('naive-ui')['NMenu'] const NMessageProvider: typeof import('naive-ui')['NMessageProvider'] diff --git a/app/composables/useSolarNetwork.ts b/app/composables/useSolarNetwork.ts index 0cf09b3..1d003df 100644 --- a/app/composables/useSolarNetwork.ts +++ b/app/composables/useSolarNetwork.ts @@ -3,6 +3,7 @@ import { keysToCamel, keysToSnake } from "~/utils/transformKeys" export const useSolarNetwork = () => { const apiBase = useSolarNetworkUrl() + const devToken = useRuntimeConfig().public.devToken // Forward cookies from the incoming request const headers: HeadersInit = import.meta.server @@ -18,6 +19,11 @@ export const useSolarNetwork = () => { const side = import.meta.server ? "SERVER" : "CLIENT" console.log(`[useSolarNetwork] onRequest for ${request} on ${side}`) + if (devToken) { + options.headers = new Headers(options.headers) + options.headers.set("Authorization", `Bearer ${devToken}`) + } + // Transform request data from camelCase to snake_case if (options.body && typeof options.body === "object") { options.body = keysToSnake(options.body) diff --git a/app/pages/auth/authorize.vue b/app/pages/auth/authorize.vue index ca6e11b..690e5a9 100644 --- a/app/pages/auth/authorize.vue +++ b/app/pages/auth/authorize.vue @@ -1,110 +1,17 @@ - - - + diff --git a/app/pages/auth/create-account.vue b/app/pages/auth/create-account.vue index 7e21505..7715623 100644 --- a/app/pages/auth/create-account.vue +++ b/app/pages/auth/create-account.vue @@ -1,5 +1,5 @@