chore: generate
This commit is contained in:
parent
0c0d193474
commit
a468680965
3 changed files with 16 additions and 15 deletions
|
|
@ -974,7 +974,9 @@ export class RunFooter implements FooterApi {
|
||||||
this.themes.push(theme)
|
this.themes.push(theme)
|
||||||
this.setTheme(theme)
|
this.setTheme(theme)
|
||||||
this.renderer.setBackgroundColor(theme.background)
|
this.renderer.setBackgroundColor(theme.background)
|
||||||
this.flushing = this.flushing.then(() => this.scrollback.setTheme(theme)).catch((error) => {
|
this.flushing = this.flushing
|
||||||
|
.then(() => this.scrollback.setTheme(theme))
|
||||||
|
.catch((error) => {
|
||||||
this.flushError = error
|
this.flushError = error
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -585,7 +585,9 @@ export async function resolveRunTheme(renderer: CliRenderer): Promise<RunTheme>
|
||||||
|
|
||||||
// Palette-only terminal reloads can leave renderer.themeMode stale, but
|
// Palette-only terminal reloads can leave renderer.themeMode stale, but
|
||||||
// ANSI slot zero is not the terminal background when OSC 11 is absent.
|
// ANSI slot zero is not the terminal background when OSC 11 is absent.
|
||||||
const pick = colors.defaultBackground ? mode(RGBA.fromHex(colors.defaultBackground)) : renderer.themeMode ?? mode(RGBA.fromHex(bg))
|
const pick = colors.defaultBackground
|
||||||
|
? mode(RGBA.fromHex(colors.defaultBackground))
|
||||||
|
: (renderer.themeMode ?? mode(RGBA.fromHex(bg)))
|
||||||
const theme = resolveTheme(generateSystem(colors, pick), pick)
|
const theme = resolveTheme(generateSystem(colors, pick), pick)
|
||||||
const indexed = indexedPalette(colors, 256)
|
const indexed = indexedPalette(colors, 256)
|
||||||
const shared = await import("../tui/context/theme")
|
const shared = await import("../tui/context/theme")
|
||||||
|
|
|
||||||
|
|
@ -345,10 +345,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
void Promise.allSettled([
|
void Promise.allSettled([resolveSystemTheme(store.mode), syncCustomThemes()]).finally(() => {
|
||||||
resolveSystemTheme(store.mode),
|
|
||||||
syncCustomThemes(),
|
|
||||||
]).finally(() => {
|
|
||||||
setStore("ready", true)
|
setStore("ready", true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue