diff --git a/README.md b/README.md index e405c0b..585c375 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@
- Logo + Logo

Notepad

@@ -268,5 +268,5 @@ export default writable(0) [license-url]: https://github.com/Muhammed-Rahif/Notepad/blob/main/LICENSE [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555 [linkedin-url]: https://linkedin.com/in/Muhammed-Rahif -[product-screenshot]: static/screenshot.png +[product-screenshot]: public/screenshot.png diff --git a/index.html b/index.html index 97c59f6..590cc9f 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@
- + diff --git a/neutralino.config.json b/neutralino.config.json index 4ded052..e0b96df 100644 --- a/neutralino.config.json +++ b/neutralino.config.json @@ -16,7 +16,8 @@ "height": 500, "minWidth": 400, "minHeight": 200, - "icon": "/www/favicon.png" + "icon": "/www/favicon.png", + "enableInspector": true } }, "cli": { @@ -25,7 +26,6 @@ "extensionsPath": "/extensions/", "binaryVersion": "5.4.0", "clientVersion": "5.4.0", - "clientLibrary": "/public/js/neutralino.js", "frontendLibrary": { "patchFile": "/index.html", "devUrl": "http://localhost:5173", diff --git a/src/App.svelte b/src/App.svelte index 40b6fc0..f4972f9 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -6,9 +6,6 @@ import favIcon from '@/assets/imgs/favicon.png'; import favIconDark from '@/assets/imgs/favicon-dark.png'; import { mode, ModeWatcher } from 'mode-watcher'; - import { init } from '@neutralinojs/lib'; - - init(); diff --git a/src/app.css b/src/app.css index e783e91..aa100b2 100644 --- a/src/app.css +++ b/src/app.css @@ -3,73 +3,73 @@ @tailwind base; @tailwind components; @tailwind utilities; - + @layer base { :root { --background: 0 0% 100%; --foreground: 0 0% 3.9%; - + --muted: 0 0% 96.1%; --muted-foreground: 0 0% 45.1%; - + --popover: 0 0% 100%; --popover-foreground: 0 0% 3.9%; - + --card: 0 0% 100%; --card-foreground: 0 0% 3.9%; - + --border: 0 0% 89.8%; --input: 0 0% 89.8%; - + --primary: 0 0% 9%; --primary-foreground: 0 0% 98%; - + --secondary: 0 0% 96.1%; --secondary-foreground: 0 0% 9%; - + --accent: 0 0% 96.1%; --accent-foreground: 0 0% 9%; - + --destructive: 0 72.2% 50.6%; --destructive-foreground: 0 0% 98%; - + --ring: 0 0% 3.9%; - + --radius: 0.5rem; } - + .dark { --background: 0 0% 3.9%; --foreground: 0 0% 98%; - + --muted: 0 0% 14.9%; --muted-foreground: 0 0% 63.9%; - + --popover: 0 0% 3.9%; --popover-foreground: 0 0% 98%; - + --card: 0 0% 3.9%; --card-foreground: 0 0% 98%; - + --border: 0 0% 14.9%; --input: 0 0% 14.9%; - + --primary: 0 0% 98%; --primary-foreground: 0 0% 9%; - + --secondary: 0 0% 14.9%; --secondary-foreground: 0 0% 98%; - + --accent: 0 0% 14.9%; --accent-foreground: 0 0% 98%; - + --destructive: 0 62.8% 30.6%; --destructive-foreground: 0 0% 98%; - + --ring: 0 0% 83.1%; } } - + @layer base { * { @apply border-border; @@ -79,9 +79,9 @@ } } - html, -body { +body, +#app { height: 100%; overflow: scroll; overflow: hidden; @@ -104,6 +104,8 @@ body { ::-webkit-scrollbar-thumb { background: #ff0000; } -::selection { +::selection, +::-moz-selection, +::-webkit-selection { @apply bg-zinc-400 dark:bg-zinc-700; } diff --git a/src/lib/components/Editors.svelte b/src/lib/components/Editors.svelte index bc1f0dd..1be7cb8 100644 --- a/src/lib/components/Editors.svelte +++ b/src/lib/components/Editors.svelte @@ -34,7 +34,7 @@ } $: isXS = innerWidth <= 450; $: tabsMode = $editors.length > 1; // compact mode will not available on mobile width (w<=450), also on pc when multiple editors. - $: tabsClass = tabsMode ? 'h-[calc(100%-60px)] w-full' : 'h-[calc(100%-96px)] w-full'; + $: tabsClass = tabsMode ? 'h-[calc(100%-96px)] w-full' : 'h-[calc(100%-60px)] w-full'; diff --git a/src/lib/components/MenuBar.svelte b/src/lib/components/MenuBar.svelte index 2fa928e..a1a4b0d 100644 --- a/src/lib/components/MenuBar.svelte +++ b/src/lib/components/MenuBar.svelte @@ -1,7 +1,6 @@ ', + `` + ); + } + return html; + } + }; +}; // https://vitejs.dev/config/ export default defineConfig({ @@ -19,8 +51,12 @@ export default defineConfig({ port: 5173, strictPort: true }, + define: { + isNeutralino: fs.existsSync(authInfoFilePath) + }, plugins: [ svelte(), + neutralino(), VitePWA({ registerType: 'prompt', injectRegister: false,