mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 09:08:32 +02:00
Hotdog stand
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
|
pub use tauri::AppHandle;
|
||||||
use tauri::menu::{
|
use tauri::menu::{
|
||||||
AboutMetadata, Menu, MenuItemBuilder, PredefinedMenuItem, Submenu, HELP_SUBMENU_ID,
|
AboutMetadata, HELP_SUBMENU_ID, Menu, MenuItemBuilder, PredefinedMenuItem, Submenu,
|
||||||
WINDOW_SUBMENU_ID,
|
WINDOW_SUBMENU_ID,
|
||||||
};
|
};
|
||||||
pub use tauri::AppHandle;
|
|
||||||
use tauri::Wry;
|
use tauri::Wry;
|
||||||
|
|
||||||
pub fn app_menu(app_handle: &AppHandle) -> tauri::Result<Menu<Wry>> {
|
pub fn app_menu(app_handle: &AppHandle) -> tauri::Result<Menu<Wry>> {
|
||||||
@@ -107,15 +107,15 @@ pub fn app_menu(app_handle: &AppHandle) -> tauri::Result<Menu<Wry>> {
|
|||||||
&PredefinedMenuItem::fullscreen(app_handle, None)?,
|
&PredefinedMenuItem::fullscreen(app_handle, None)?,
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
&PredefinedMenuItem::separator(app_handle)?,
|
&PredefinedMenuItem::separator(app_handle)?,
|
||||||
&MenuItemBuilder::with_id("zoom_reset".to_string(), "Zoom to Actual Size")
|
// &MenuItemBuilder::with_id("zoom_reset".to_string(), "Zoom to Actual Size")
|
||||||
.accelerator("CmdOrCtrl+0")
|
// .accelerator("CmdOrCtrl+0")
|
||||||
.build(app_handle)?,
|
// .build(app_handle)?,
|
||||||
&MenuItemBuilder::with_id("zoom_in".to_string(), "Zoom In")
|
// &MenuItemBuilder::with_id("zoom_in".to_string(), "Zoom In")
|
||||||
.accelerator("CmdOrCtrl+=")
|
// .accelerator("CmdOrCtrl+=")
|
||||||
.build(app_handle)?,
|
// .build(app_handle)?,
|
||||||
&MenuItemBuilder::with_id("zoom_out".to_string(), "Zoom Out")
|
// &MenuItemBuilder::with_id("zoom_out".to_string(), "Zoom Out")
|
||||||
.accelerator("CmdOrCtrl+-")
|
// .accelerator("CmdOrCtrl+-")
|
||||||
.build(app_handle)?,
|
// .build(app_handle)?,
|
||||||
],
|
],
|
||||||
)?,
|
)?,
|
||||||
&window_menu,
|
&window_menu,
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ const Menu = forwardRef<Omit<DropdownRef, 'open' | 'isOpen' | 'toggle'>, MenuPro
|
|||||||
<span
|
<span
|
||||||
aria-hidden
|
aria-hidden
|
||||||
style={triangleStyles}
|
style={triangleStyles}
|
||||||
className="bg-background absolute rotate-45 border-background-highlight border-t border-l"
|
className="bg-background absolute rotate-45 border-background-highlight-secondary border-t border-l"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{containerStyles && (
|
{containerStyles && (
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ export const baseExtensions = [
|
|||||||
dropCursor(),
|
dropCursor(),
|
||||||
drawSelection(),
|
drawSelection(),
|
||||||
autocompletion({
|
autocompletion({
|
||||||
tooltipClass: () => 'x-theme-dialog',
|
tooltipClass: () => 'x-theme-menu',
|
||||||
closeOnBlur: true, // Set to `false` for debugging in devtools without closing it
|
closeOnBlur: true, // Set to `false` for debugging in devtools without closing it
|
||||||
compareCompletions: (a, b) => {
|
compareCompletions: (a, b) => {
|
||||||
// Don't sort completions at all, only on boost
|
// Don't sort completions at all, only on boost
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
import type { CSSProperties } from 'react';
|
||||||
|
|
||||||
interface Props<T extends string> {
|
interface Props<T extends string> {
|
||||||
name: string;
|
name: string;
|
||||||
@@ -75,9 +76,11 @@ export function Select<T extends string>({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectBackgroundStyles = {
|
const selectBackgroundStyles: CSSProperties = {
|
||||||
backgroundImage: `url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`,
|
backgroundImage: `url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`,
|
||||||
backgroundPosition: 'right 0.3rem center',
|
backgroundPosition: 'right 0.3rem center',
|
||||||
backgroundRepeat: 'no-repeat',
|
backgroundRepeat: 'no-repeat',
|
||||||
backgroundSize: '1.5em 1.5em',
|
backgroundSize: '1.5em 1.5em',
|
||||||
|
appearance: 'none',
|
||||||
|
printColorAdjust: 'exact',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,11 +1,71 @@
|
|||||||
|
import { Color } from './color';
|
||||||
import { catppuccin } from './themes/catppuccin';
|
import { catppuccin } from './themes/catppuccin';
|
||||||
import { github } from './themes/github';
|
import { github } from './themes/github';
|
||||||
import { monokaiPro } from './themes/monokai-pro';
|
import { monokaiPro } from './themes/monokai-pro';
|
||||||
import { relaxing } from './themes/relaxing';
|
import { relaxing } from './themes/relaxing';
|
||||||
import { rosePine } from './themes/rose-pine';
|
import { rosePine } from './themes/rose-pine';
|
||||||
import { yaak, yaakDark, yaakLight } from './themes/yaak';
|
import { yaak, yaakDark, yaakLight } from './themes/yaak';
|
||||||
|
import type { YaakTheme } from './window';
|
||||||
|
|
||||||
|
const hotdogStand: YaakTheme = {
|
||||||
|
id: 'hotdog-stand',
|
||||||
|
name: 'Hotdog Stand',
|
||||||
|
background: new Color('#ff0000', 'dark'),
|
||||||
|
backgroundHighlight: new Color('#000000', 'dark'),
|
||||||
|
backgroundHighlightSecondary: new Color('#000000', 'dark'),
|
||||||
|
foreground: new Color('#ffffff', 'dark'),
|
||||||
|
foregroundSubtle: new Color('#ffffff', 'dark'),
|
||||||
|
foregroundSubtler: new Color('#ffff00', 'dark'),
|
||||||
|
colors: {
|
||||||
|
primary: new Color('#ffff00', 'dark'),
|
||||||
|
secondary: new Color('#ffff00', 'dark'),
|
||||||
|
info: new Color('#ffff00', 'dark'),
|
||||||
|
notice: new Color('#ffff00', 'dark'),
|
||||||
|
warning: new Color('#ffff00', 'dark'),
|
||||||
|
danger: new Color('#ffff00', 'dark'),
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
appHeader: {
|
||||||
|
background: new Color('#000000', 'dark'),
|
||||||
|
foreground: new Color('#ffffff', 'dark'),
|
||||||
|
foregroundSubtle: new Color('#ffff00', 'dark'),
|
||||||
|
foregroundSubtler: new Color('#ff0000', 'dark'),
|
||||||
|
},
|
||||||
|
menu: {
|
||||||
|
background: new Color('#000000', 'dark'),
|
||||||
|
backgroundHighlight: new Color('#ff0000', 'dark'),
|
||||||
|
backgroundHighlightSecondary: new Color('#ff0000', 'dark'),
|
||||||
|
foreground: new Color('#ffffff', 'dark'),
|
||||||
|
foregroundSubtle: new Color('#ffff00', 'dark'),
|
||||||
|
foregroundSubtler: new Color('#ffff00', 'dark'),
|
||||||
|
},
|
||||||
|
button: {
|
||||||
|
background: new Color('#000000', 'dark'),
|
||||||
|
foreground: new Color('#ffffff', 'dark'),
|
||||||
|
colors: {
|
||||||
|
primary: new Color('#000000', 'dark'),
|
||||||
|
secondary: new Color('#ffffff', 'dark'),
|
||||||
|
info: new Color('#000000', 'dark'),
|
||||||
|
notice: new Color('#ffff00', 'dark'),
|
||||||
|
warning: new Color('#000000', 'dark'),
|
||||||
|
danger: new Color('#ff0000', 'dark'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
editor: {
|
||||||
|
colors: {
|
||||||
|
primary: new Color('#ffffff', 'dark'),
|
||||||
|
secondary: new Color('#ffffff', 'dark'),
|
||||||
|
info: new Color('#ffffff', 'dark'),
|
||||||
|
notice: new Color('#ffff00', 'dark'),
|
||||||
|
warning: new Color('#ffffff', 'dark'),
|
||||||
|
danger: new Color('#ffffff', 'dark'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export const yaakThemes = [
|
export const yaakThemes = [
|
||||||
|
hotdogStand,
|
||||||
...yaak,
|
...yaak,
|
||||||
...catppuccin,
|
...catppuccin,
|
||||||
...relaxing,
|
...relaxing,
|
||||||
|
|||||||
@@ -80,14 +80,4 @@
|
|||||||
--color-white: 255 100% 100%;
|
--color-white: 255 100% 100%;
|
||||||
--color-black: 255 0% 0%;
|
--color-black: 255 0% 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
|
||||||
@apply appearance-none;
|
|
||||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
|
||||||
background-position: right 0.5rem center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: 1.5em 1.5em;
|
|
||||||
padding-right: 2.5rem;
|
|
||||||
-webkit-print-color-adjust: exact;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user