mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-26 03:11:12 +01:00
Integrated titlebar windows
This commit is contained in:
@@ -6,16 +6,13 @@ import { ReactComponent as LeftPanelHiddenIcon } from '../../assets/icons/LeftPa
|
||||
import { ReactComponent as LeftPanelVisibleIcon } from '../../assets/icons/LeftPanelVisibleIcon.svg';
|
||||
|
||||
const icons = {
|
||||
square: I.SquareIcon,
|
||||
minus: I.MinusIcon,
|
||||
hamburger: I.HamburgerMenuIcon,
|
||||
archive: I.ArchiveIcon,
|
||||
chat: I.ChatBubbleIcon,
|
||||
check: I.CheckIcon,
|
||||
checkbox: I.CheckboxIcon,
|
||||
clock: I.ClockIcon,
|
||||
chevronDown: I.ChevronDownIcon,
|
||||
chevronRight: I.ChevronRightIcon,
|
||||
clock: I.ClockIcon,
|
||||
code: I.CodeIcon,
|
||||
colorWheel: I.ColorWheelIcon,
|
||||
copy: I.CopyIcon,
|
||||
@@ -33,6 +30,7 @@ const icons = {
|
||||
listBullet: I.ListBulletIcon,
|
||||
magicWand: I.MagicWandIcon,
|
||||
magnifyingGlass: I.MagnifyingGlassIcon,
|
||||
minus: I.MinusIcon,
|
||||
moon: I.MoonIcon,
|
||||
openNewWindow: I.OpenInNewWindowIcon,
|
||||
paperPlane: I.PaperPlaneIcon,
|
||||
@@ -42,6 +40,7 @@ const icons = {
|
||||
question: I.QuestionMarkIcon,
|
||||
rocket: I.RocketIcon,
|
||||
rows: I.RowsIcon,
|
||||
square: I.SquareIcon,
|
||||
sun: I.SunIcon,
|
||||
trash: I.TrashIcon,
|
||||
triangleDown: I.TriangleDownIcon,
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
@apply w-full h-full;
|
||||
@apply w-full h-full overflow-hidden;
|
||||
}
|
||||
|
||||
#root {
|
||||
@apply bg-gray-50 text-gray-900 overflow-hidden;
|
||||
@apply bg-gray-50 text-gray-900;
|
||||
}
|
||||
|
||||
/* Setup default transitions for elements */
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { attachConsole } from 'tauri-plugin-log-api';
|
||||
import { App } from './components/App';
|
||||
import { maybeRestorePathname } from './lib/persistPathname';
|
||||
import {StrictMode} from 'react';
|
||||
import {createRoot} from 'react-dom/client';
|
||||
import {attachConsole} from 'tauri-plugin-log-api';
|
||||
import {App} from './components/App';
|
||||
import {maybeRestorePathname} from './lib/persistPathname';
|
||||
import './main.css';
|
||||
import { getSettings } from './lib/store';
|
||||
import type { Appearance } from './lib/theme/window';
|
||||
import { setAppearanceOnDocument } from './lib/theme/window';
|
||||
import {getSettings} from './lib/store';
|
||||
import type {Appearance} from './lib/theme/window';
|
||||
import {setAppearanceOnDocument} from './lib/theme/window';
|
||||
import {appWindow} from "@tauri-apps/api/window";
|
||||
|
||||
// Hide decorations here because it doesn't work in Rust for some reason (bug?)
|
||||
await appWindow.setDecorations(false);
|
||||
|
||||
await attachConsole();
|
||||
await maybeRestorePathname();
|
||||
@@ -15,12 +19,12 @@ const settings = await getSettings();
|
||||
setAppearanceOnDocument(settings.appearance as Appearance);
|
||||
|
||||
document.addEventListener('keydown', (e) => {
|
||||
// Don't go back in history on backspace
|
||||
if (e.key === 'Backspace') e.preventDefault();
|
||||
// Don't go back in history on backspace
|
||||
if (e.key === 'Backspace') e.preventDefault();
|
||||
});
|
||||
|
||||
createRoot(document.getElementById('root') as HTMLElement).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>,
|
||||
<StrictMode>
|
||||
<App/>
|
||||
</StrictMode>,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user