-
Notifications
You must be signed in to change notification settings - Fork 3
feat(admin): Serve the admin console from the shared layer #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /* | ||
| * Trakli's brand, expressed in the design system's brand contract. | ||
| * | ||
| * Only tokens listed in @whilesmart/design/tokens/brand.css belong here. Anything else the | ||
| * admin needs is derived from these, so one value changes the whole console. | ||
| * | ||
| * Every text pair here is held to 4.5:1 in both themes by a test. | ||
| */ | ||
|
|
||
| :root { | ||
| --ds-brand-primary-50: #f0f5f2; | ||
| --ds-brand-primary-100: #d8e8e1; | ||
| --ds-brand-primary-200: #b6d8c9; | ||
| --ds-brand-primary-300: #89c8ab; | ||
| --ds-brand-primary-400: #57c192; | ||
| --ds-brand-primary-500: #27a56c; | ||
| --ds-brand-primary-600: #129158; | ||
| --ds-brand-primary-700: #09864e; | ||
| --ds-brand-primary-800: #047844; | ||
| --ds-brand-primary-900: #02502d; | ||
|
|
||
| --ds-brand-secondary-50: #edf7f6; | ||
| --ds-brand-secondary-100: #d2efeb; | ||
| --ds-brand-secondary-200: #aae4dc; | ||
| --ds-brand-secondary-300: #78d9cc; | ||
| --ds-brand-secondary-400: #43d0bd; | ||
| --ds-brand-secondary-500: #24b29f; | ||
| --ds-brand-secondary-600: #189584; | ||
| --ds-brand-secondary-700: #0e8171; | ||
| --ds-brand-secondary-800: #07695c; | ||
| --ds-brand-secondary-900: #024b41; | ||
|
|
||
| --ds-brand-font-sans: | ||
| 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, | ||
| sans-serif; | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -31,10 +31,7 @@ export const useAuth = () => { | |||||||||||||
| } | ||||||||||||||
| }; | ||||||||||||||
|
|
||||||||||||||
| // Auto-sync auth state on client-side | ||||||||||||||
| if (typeof window !== 'undefined') { | ||||||||||||||
| syncAuthState(); | ||||||||||||||
|
Comment on lines
-34
to
-36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This call previously ran behind a
Suggested change
|
||||||||||||||
| } | ||||||||||||||
| syncAuthState(); | ||||||||||||||
|
|
||||||||||||||
| const login = async (credentials: { email: string; password: string }) => { | ||||||||||||||
| try { | ||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||||||
| export interface FeedbackItem { | ||||||||||
| id: number; | ||||||||||
| type: string; | ||||||||||
| status: string; | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| subject: string | null; | ||||||||||
| message: string; | ||||||||||
| created_at: string; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| export function useFeedback() { | ||||||||||
| const api = useApi(); | ||||||||||
|
|
||||||||||
| async function list(): Promise<FeedbackItem[]> { | ||||||||||
| const response = await api<{ data: FeedbackItem[] }>('/feedback'); | ||||||||||
| return response.data; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| async function send(payload: { | ||||||||||
| type: string; | ||||||||||
| subject?: string; | ||||||||||
| message: string; | ||||||||||
| }): Promise<FeedbackItem> { | ||||||||||
| const response = await api<{ data: FeedbackItem }>('/feedback', { | ||||||||||
| method: 'POST', | ||||||||||
| body: payload | ||||||||||
| }); | ||||||||||
| return response.data; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| return { list, send }; | ||||||||||
| } | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| export default defineI18nConfig(() => ({ | ||
| legacy: false, | ||
| // English is the source language: a key missing from another locale renders its English | ||
| // text instead of the key, and without a console warning for every string. | ||
| fallbackLocale: 'en' | ||
| })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new variable has a non-obvious effect:
plugins/engagement.client.tsreturns early when no site key is configured, so an empty value silently disables analytics. Every other variable in this file carries a short explanatory comment; add one here too so operators know what leaving it empty does.