feat: add image pasting, close #234
This commit is contained in:
1 parent
a5287b03e8
commit
b80d6bd930
6 files changed
+90
-22
No files matched your search
+3
-14
@@ -116,7 +116,6 @@ export function colorsToVars(colors: Colors): string {
|
||||
let vars: string[] = []
|
||||
for (let category in colors) {
|
||||
for (let shade in colors[category as keyof Colors]) {
|
||||
console.log(shade)
|
||||
if (category)
|
||||
// @ts-ignore
|
||||
vars.push(`--c-${category.slice(0, 1)}-${shade}:${colors[category][shade]}`)
|
||||
@@ -128,14 +127,14 @@ export function colorsToVars(colors: Colors): string {
|
||||
export const colorToVar = (category: keyof Colors, shade: keyof keyof Colors): string =>
|
||||
`--c-${category.slice(0,2)}-${shade.toString()}`
|
||||
|
||||
colors.subscribe((v) => {
|
||||
|
||||
})
|
||||
|
||||
function loadColors() {
|
||||
const loaded = localStorage.getItem('colors')
|
||||
if (!loaded) return
|
||||
colors.set(JSON.parse(loaded))
|
||||
colors.subscribe((v) => {
|
||||
localStorage.setItem('colors', JSON.stringify(v))
|
||||
})
|
||||
}
|
||||
|
||||
if (browser) {
|
||||
@@ -143,16 +142,6 @@ if (browser) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const configuredLegacyTheme = env.PUBLIC_LEGACYTHEME ?? 'system'
|
||||
export const legacyTheme = writable<'system' | 'light' | 'dark'>(
|
||||
configuredLegacyTheme as 'system' | 'light' | 'dark'
|
||||
|
||||
Reference in new issue
Block a user