diff --git a/.downstream/native-domains.md b/.downstream/native-domains.md index 130541aa15d3..b8013bf0019f 100644 --- a/.downstream/native-domains.md +++ b/.downstream/native-domains.md @@ -112,12 +112,14 @@ actual model-quality diagnostics remain separately budgeted and coordinated. `observability.theme_enabled` (public `flat_theme_enabled`, default on) toggles `html.flat-theme`; switching it off restores the upstream look. The console look -lives only in the central layer: `frontend/src/styles/flat-theme.css` (tokens and -Geist/Geist Mono Latin subsets; CJK uses system fonts), `frontend/tailwind.config.js` -(every palette, radius, shadow and gradient resolves through a CSS variable whose -fallback is the upstream value; hue families fold into danger/warning/info/success/ -purple; `primary` is ink), `frontend/src/style.css` (upstream recipes plus a -`:where(.flat-theme)` console block) and the shared components and layout. Page +lives only in the central layer: `frontend/src/styles/flat-theme.css` (tokens, the +Inter and Geist Mono Latin subsets; Chinese uses MiSans loaded at runtime from +Xiaomi's font service by `utils/flatTheme.ts`, falling back to system fonts), +`frontend/tailwind.config.js` (every palette, radius, shadow and gradient resolves +through a CSS variable whose fallback is the upstream value; `primary` is Apple blue +and the hue families map to Apple system colours), `frontend/src/style.css` +(upstream recipes plus a `flat-theme` console block: colour only where upstream has +colour, Liquid Glass only on chrome) and the shared components and layout. Page files keep upstream class strings; after upstream merges, re-run the ops-repo de-sweep (`artifacts/tmp/admin-rework/ui/desweep/desweep.py`) instead of restyling pages. diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index e118ba3133f6..6549edee1a69 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -38,6 +38,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -## Geist +## Inter -The frontend includes the Geist and Geist Mono variable fonts by Vercel, taken from the npm package [`geist` 1.7.2](https://www.npmjs.com/package/geist) and subset to the Latin range with fontTools (no other glyph changes). The fonts are distributed under the SIL Open Font License 1.1, included at `frontend/src/assets/fonts/geist/OFL.txt`. +The frontend includes the Inter 4.001 variable font (weights 100-900) by The Inter Project Authors (https://github.com/rsms/inter), the Latin subset file `files/inter-latin-wght-normal.woff2` of the npm package [`@fontsource-variable/inter` 5.3.0](https://www.npmjs.com/package/@fontsource-variable/inter) with no glyph changes. The font is distributed under the SIL Open Font License 1.1, included at `frontend/src/assets/fonts/inter/OFL.txt`. + +## Geist Mono + +The frontend includes the Geist Mono variable font by Vercel, taken from the npm package [`geist` 1.7.2](https://www.npmjs.com/package/geist) and subset to the Latin range with fontTools (no other glyph changes). The font is distributed under the SIL Open Font License 1.1, included at `frontend/src/assets/fonts/geist/OFL.txt`. diff --git a/frontend/src/assets/fonts/geist/Geist-Variable.latin.woff2 b/frontend/src/assets/fonts/geist/Geist-Variable.latin.woff2 deleted file mode 100644 index 87ca17423f05..000000000000 Binary files a/frontend/src/assets/fonts/geist/Geist-Variable.latin.woff2 and /dev/null differ diff --git a/frontend/src/assets/fonts/inter/Inter-Variable.latin.woff2 b/frontend/src/assets/fonts/inter/Inter-Variable.latin.woff2 new file mode 100644 index 000000000000..d15208de03cd Binary files /dev/null and b/frontend/src/assets/fonts/inter/Inter-Variable.latin.woff2 differ diff --git a/frontend/src/assets/fonts/inter/OFL.txt b/frontend/src/assets/fonts/inter/OFL.txt new file mode 100644 index 000000000000..40589daa9de8 --- /dev/null +++ b/frontend/src/assets/fonts/inter/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/frontend/src/components/admin/account/AccountStatsModal.vue b/frontend/src/components/admin/account/AccountStatsModal.vue index 50cc9a66149b..2c5af222faf1 100644 --- a/frontend/src/components/admin/account/AccountStatsModal.vue +++ b/frontend/src/components/admin/account/AccountStatsModal.vue @@ -520,8 +520,8 @@ const trendChartData = computed(() => { { label: t('usage.accountBilled') + ' (USD)', data: stats.value.history.map((h) => h.actual_cost), - borderColor: '#3b82f6', - backgroundColor: 'rgba(59, 130, 246, 0.1)', + borderColor: presentation.value.tone('#3b82f6'), + backgroundColor: presentation.value.tone('rgba(59, 130, 246, 0.1)'), fill: true, tension: 0.3, yAxisID: 'y' @@ -529,8 +529,8 @@ const trendChartData = computed(() => { { label: t('usage.userBilled') + ' (USD)', data: stats.value.history.map((h) => h.user_cost), - borderColor: '#10b981', - backgroundColor: 'rgba(16, 185, 129, 0.08)', + borderColor: presentation.value.tone('#10b981'), + backgroundColor: presentation.value.tone('rgba(16, 185, 129, 0.08)'), fill: false, tension: 0.3, borderDash: [5, 5], @@ -539,8 +539,8 @@ const trendChartData = computed(() => { { label: t('admin.accounts.stats.requests'), data: stats.value.history.map((h) => h.requests), - borderColor: '#f97316', - backgroundColor: 'rgba(249, 115, 22, 0.1)', + borderColor: presentation.value.tone('#f97316'), + backgroundColor: presentation.value.tone('rgba(249, 115, 22, 0.1)'), fill: false, tension: 0.3, yAxisID: 'y1' @@ -605,7 +605,7 @@ const lineChartOptions = computed(() => ({ color: chartColors.value.grid }, ticks: { - color: '#3b82f6', + color: presentation.value.toneText('#3b82f6'), font: { size: 10 }, @@ -614,7 +614,7 @@ const lineChartOptions = computed(() => ({ title: { display: true, text: t('usage.accountBilled') + ' (USD)', - color: '#3b82f6', + color: presentation.value.toneText('#3b82f6'), font: { size: 11 } @@ -628,7 +628,7 @@ const lineChartOptions = computed(() => ({ drawOnChartArea: false }, ticks: { - color: '#f97316', + color: presentation.value.toneText('#f97316'), font: { size: 10 }, @@ -637,7 +637,7 @@ const lineChartOptions = computed(() => ({ title: { display: true, text: t('admin.accounts.stats.requests'), - color: '#f97316', + color: presentation.value.toneText('#f97316'), font: { size: 11 } diff --git a/frontend/src/components/admin/account/BatchAccountTestModal.vue b/frontend/src/components/admin/account/BatchAccountTestModal.vue index eeee0952fb6a..ac387cc667e6 100644 --- a/frontend/src/components/admin/account/BatchAccountTestModal.vue +++ b/frontend/src/components/admin/account/BatchAccountTestModal.vue @@ -91,6 +91,7 @@ import BaseDialog from '@/components/common/BaseDialog.vue' import { adminAPI } from '@/api/admin' import type { Account } from '@/types' import type { BatchTestAccountEvent } from '@/api/admin/accounts' +import { extractApiErrorMessage } from '@/utils/apiError' type KnownAccount = Pick const props = defineProps<{ show: boolean; accountIds: number[]; accounts: KnownAccount[] }>() @@ -184,7 +185,7 @@ const loadModels = async () => { row.supportedModels = (await adminAPI.accounts.getAvailableModels(row.id)).map(model => model.id) if (row.status === 'checking') row.status = 'ready' } catch (error) { - if (row.status === 'checking') { row.status = 'skipped'; row.error = String(error) } + if (row.status === 'checking') { row.status = 'skipped'; row.error = extractApiErrorMessage(error, t('common.unknownError')) } } } await Promise.all(Array.from({ length: Math.min(CATALOG_CONCURRENCY, queue.length) }, async () => { diff --git a/frontend/src/components/admin/account/ReAuthAccountModal.vue b/frontend/src/components/admin/account/ReAuthAccountModal.vue index 0a094834a3ea..7696e6dbb97e 100644 --- a/frontend/src/components/admin/account/ReAuthAccountModal.vue +++ b/frontend/src/components/admin/account/ReAuthAccountModal.vue @@ -22,7 +22,7 @@ : isAntigravity ? 'from-purple-500 to-purple-600' : isGrok - ? 'bg-zinc-700 ' + ? 'from-zinc-700 to-zinc-900' : 'from-orange-500 to-orange-600' ]" > diff --git a/frontend/src/components/admin/payment/DailyRevenueChart.vue b/frontend/src/components/admin/payment/DailyRevenueChart.vue index 6e2544f99436..c811f8f301f2 100644 --- a/frontend/src/components/admin/payment/DailyRevenueChart.vue +++ b/frontend/src/components/admin/payment/DailyRevenueChart.vue @@ -19,6 +19,7 @@ diff --git a/frontend/src/views/admin/ops/components/OpsErrorTrendChart.vue b/frontend/src/views/admin/ops/components/OpsErrorTrendChart.vue index 40d92f815d11..1c1d6a2c0f4e 100644 --- a/frontend/src/views/admin/ops/components/OpsErrorTrendChart.vue +++ b/frontend/src/views/admin/ops/components/OpsErrorTrendChart.vue @@ -37,10 +37,10 @@ const { t } = useI18n() const presentation = usePresentationColors() const colors = computed(() => ({ - red: '#ef4444', - redAlpha: '#ef444420', - purple: '#8b5cf6', - purpleAlpha: '#8b5cf620', + red: presentation.value.tone('#ef4444'), + redAlpha: presentation.value.tone('#ef444420'), + purple: presentation.value.tone('#8b5cf6'), + purpleAlpha: presentation.value.tone('#8b5cf620'), gray: presentation.value.gray, grid: presentation.value.axisGrid, text: presentation.value.axis diff --git a/frontend/src/views/admin/ops/components/OpsLatencyChart.vue b/frontend/src/views/admin/ops/components/OpsLatencyChart.vue index 723a7bae371e..902784c715cc 100644 --- a/frontend/src/views/admin/ops/components/OpsLatencyChart.vue +++ b/frontend/src/views/admin/ops/components/OpsLatencyChart.vue @@ -21,7 +21,7 @@ const { t } = useI18n() const presentation = usePresentationColors() const colors = computed(() => ({ - blue: '#3b82f6', + blue: presentation.value.tone('#3b82f6'), grid: presentation.value.axisGrid, text: presentation.value.axis })) diff --git a/frontend/src/views/admin/ops/components/OpsSwitchRateTrendChart.vue b/frontend/src/views/admin/ops/components/OpsSwitchRateTrendChart.vue index 6787d58bc279..c72e577f8f30 100644 --- a/frontend/src/views/admin/ops/components/OpsSwitchRateTrendChart.vue +++ b/frontend/src/views/admin/ops/components/OpsSwitchRateTrendChart.vue @@ -34,8 +34,8 @@ const { t } = useI18n() const presentation = usePresentationColors() const colors = computed(() => ({ - teal: '#168a49', - tealAlpha: '#168a4920', + teal: presentation.value.tone('#14b8a6'), + tealAlpha: presentation.value.tone('#14b8a620'), grid: presentation.value.axisGrid, text: presentation.value.axis })) diff --git a/frontend/src/views/admin/ops/components/OpsThroughputTrendChart.vue b/frontend/src/views/admin/ops/components/OpsThroughputTrendChart.vue index b746587d62f7..58df4e4c3659 100644 --- a/frontend/src/views/admin/ops/components/OpsThroughputTrendChart.vue +++ b/frontend/src/views/admin/ops/components/OpsThroughputTrendChart.vue @@ -46,10 +46,12 @@ watch( const presentation = usePresentationColors() const colors = computed(() => ({ - blue: '#3b82f6', - blueAlpha: '#3b82f620', - green: '#10b981', - greenAlpha: '#10b98120', + blue: presentation.value.tone('#3b82f6'), + blueAlpha: presentation.value.tone('#3b82f620'), + green: presentation.value.tone('#10b981'), + greenAlpha: presentation.value.tone('#10b98120'), + // the TPS axis labels are drawn in the series colour: its readable text shade under the console theme + greenText: presentation.value.toneText('#10b981'), grid: presentation.value.axisGrid, text: presentation.value.axis })) @@ -151,7 +153,7 @@ const options = computed(() => { display: true, position: 'right' as const, grid: { display: false }, - ticks: { color: c.green, font: { size: 10 } } + ticks: { color: c.greenText, font: { size: 10 } } } } } diff --git a/frontend/src/views/setup/SetupWizardView.vue b/frontend/src/views/setup/SetupWizardView.vue index 317e3257f647..d883c1b835ee 100644 --- a/frontend/src/views/setup/SetupWizardView.vue +++ b/frontend/src/views/setup/SetupWizardView.vue @@ -1,6 +1,6 @@