mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-27 19:27:01 +02:00
Theme plugins (#231)
This commit is contained in:
@@ -1,27 +1,12 @@
|
||||
import { copyToClipboard } from '../lib/copy';
|
||||
import { catppuccinMacchiato } from '../lib/theme/themes/catppuccin';
|
||||
import { githubLight } from '../lib/theme/themes/github';
|
||||
import { gruvboxDefault } from '../lib/theme/themes/gruvbox';
|
||||
import { hotdogStandDefault } from '../lib/theme/themes/hotdog-stand';
|
||||
import { monokaiProDefault } from '../lib/theme/themes/monokai-pro';
|
||||
import { rosePineDefault } from '../lib/theme/themes/rose-pine';
|
||||
import { yaakDark } from '../lib/theme/themes/yaak';
|
||||
import { getThemes } from '../lib/theme/themes';
|
||||
import { getThemeCSS } from '../lib/theme/window';
|
||||
import { useListenToTauriEvent } from './useListenToTauriEvent';
|
||||
|
||||
export function useGenerateThemeCss() {
|
||||
useListenToTauriEvent('generate_theme_css', () => {
|
||||
const themesCss = [
|
||||
yaakDark,
|
||||
monokaiProDefault,
|
||||
rosePineDefault,
|
||||
catppuccinMacchiato,
|
||||
githubLight,
|
||||
gruvboxDefault,
|
||||
hotdogStandDefault,
|
||||
]
|
||||
.map(getThemeCSS)
|
||||
.join('\n\n');
|
||||
useListenToTauriEvent('generate_theme_css', async () => {
|
||||
const themes = await getThemes();
|
||||
const themesCss = themes.themes.map(getThemeCSS).join('\n\n');
|
||||
copyToClipboard(themesCss);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user