feat(tui): add categorical theme hues (#37985)
This commit is contained in:
parent
0aa4031dd0
commit
79d0077f63
13 changed files with 202 additions and 91 deletions
|
|
@ -41,10 +41,7 @@ export function parseModel(model: string) {
|
|||
}
|
||||
}
|
||||
|
||||
export function recentModels(
|
||||
model: ModelPreferenceModel,
|
||||
recent: ModelPreferenceModel[],
|
||||
) {
|
||||
export function recentModels(model: ModelPreferenceModel, recent: ModelPreferenceModel[]) {
|
||||
const seen = new Set<string>()
|
||||
return [model, ...recent]
|
||||
.filter((item) => {
|
||||
|
|
@ -94,17 +91,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
|||
})
|
||||
const colors = createMemo(() => {
|
||||
const step = mode() === "light" ? 800 : 200
|
||||
return dedupeWith(
|
||||
[
|
||||
themeV2.hue.blue(step),
|
||||
themeV2.hue.purple(step),
|
||||
themeV2.hue.green(step),
|
||||
themeV2.hue.orange(step),
|
||||
themeV2.hue.red(step),
|
||||
themeV2.hue.cyan(step),
|
||||
],
|
||||
(first, second) => first.equals(second),
|
||||
)
|
||||
return dedupeWith(themeV2.categorical(step), (first, second) => first.equals(second))
|
||||
})
|
||||
return {
|
||||
list() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue