diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 639f355a..df275bf1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,15 +45,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: - version: 8 run_install: false - name: Get pnpm store directory shell: bash @@ -75,15 +74,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: - version: 8 run_install: false - name: Get pnpm store directory shell: bash @@ -109,15 +107,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: - version: 8 run_install: false - name: Get pnpm store directory shell: bash @@ -158,15 +155,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: - version: 8 run_install: false - name: Get pnpm store directory shell: bash @@ -196,15 +192,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: - version: 8 run_install: false - name: Get pnpm store directory shell: bash @@ -228,15 +223,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: - version: 8 run_install: false - name: Get pnpm store directory shell: bash diff --git a/app.vue b/app.vue index db272f9f..e938570d 100644 --- a/app.vue +++ b/app.vue @@ -123,4 +123,11 @@ svg { flex-direction: column; flex-grow: 1; } + +.os-scrollbar { + /* https://kingsora.github.io/OverlayScrollbars/#:~:text=to%20read%20it.-,Styling,-OverlayScrollbars%20comes%20with */ + --os-handle-bg: rgb(var(--layer-bg-hover)); + --os-handle-bg-hover: rgb(var(--layer-bg-hover)); + --os-handle-bg-active: rgb(var(--layer-bg-hover)); +} diff --git a/assets/css/tailwind.css b/assets/css/tailwind.css index ee2894d4..5dd3f110 100644 --- a/assets/css/tailwind.css +++ b/assets/css/tailwind.css @@ -86,10 +86,10 @@ } .light { - --layer-0-bg: 255 255 255; - --layer-0-bg-hover: 244 244 245; - --layer-0-bg-active: 255 255 255; - --layer-0-bg-disabled: 253 253 253; + --layer-0-bg: 244 244 245; + --layer-0-bg-hover: 228 228 231; + --layer-0-bg-active: 228 228 231; + --layer-0-bg-disabled: 242 242 243; --layer-0-border: var(--layer-0-bg-hover); --layer-0-text: 24 24 27; --layer-0-text-hover: 24 24 27; @@ -97,11 +97,11 @@ --layer-0-text-disabled: 113 113 122; --layer-0-text-muted: 113 113 122; - --layer-1-bg: 244 244 245; - --layer-1-bg-hover: 228 228 231; - --layer-1-bg-active: 228 228 231; - --layer-1-bg-disabled: 242 242 243; - --layer-1-border: var(--layer-1-bg-hover); + --layer-1-bg: 255 255 255; + --layer-1-bg-hover: 244 244 245; + --layer-1-bg-active: 255 255 255; + --layer-1-bg-disabled: 253 253 253; + --layer-1-border: var(--layer-0-bg-hover); --layer-1-text: 24 24 27; --layer-1-text-hover: 24 24 27; --layer-1-text-active: 24 24 27; @@ -302,19 +302,19 @@ } .button { - @apply inline-flex items-center rounded cursor-pointer focus:outline-none focus:ring focus-within:ring; + @apply inline-flex items-center rounded cursor-pointer focus-visible:outline-none focus-visible:ring has-[:focus-visible]:ring; } .core-button { @apply core-button-shape; @apply cursor-pointer; @apply outline-none; - @apply focus:ring focus-within:ring; + @apply focus-visible:ring has-[:focus-visible]:ring; @apply bg-layer; @apply disabled:bg-layer-disabled ui-disabled:bg-layer-disabled; @apply disabled:text-layer-disabled ui-disabled:text-layer-disabled; @apply disabled:hover:bg-layer-disabled; - @apply disabled:cursor-not-allowed ui-disabled:cursor-not-allowed disabled-within:cursor-not-allowed; + @apply disabled:cursor-default ui-disabled:cursor-default disabled-within:cursor-default; @apply disabled-within:bg-layer-disabled disabled-within:text-layer-disabled; @apply disabled-within:hover:bg-layer-disabled disabled-within:hover:text-layer-disabled; @apply hover:bg-layer-hover ui-active:bg-layer-hover; @@ -322,7 +322,7 @@ } .core-button-shape { - @apply p-2 rounded inline-flex gap-3 items-center justify-center; + @apply px-2 py-1 rounded inline-flex gap-2 items-center justify-center; } /* utils */ @@ -373,6 +373,36 @@ } .sidebar-link { - @apply flex items-center justify-between rounded p-2 hover:bg-layer-hover focus:outline-none focus:ring; + @apply flex items-center justify-between rounded px-2 py-1 hover:bg-layer-hover focus-visible:outline-none focus-visible:ring; + } +} + +@layer utilities { + .flex-direction-inherit { + flex-direction: inherit; + } + + .flex-inherit { + align-items: inherit; + flex-direction: inherit; + flex-wrap: inherit; + gap: inherit; + justify-content: inherit; + } + + .flex-wrap-inherit { + flex-wrap: inherit; + } + + .gap-inherit { + gap: inherit; + } + + .items-inherit { + align-items: inherit; + } + + .justify-inherit { + justify-content: inherit; } } diff --git a/components/CoreEditor.vue b/components/CoreEditor.vue index aa788990..c0bd6823 100644 --- a/components/CoreEditor.vue +++ b/components/CoreEditor.vue @@ -1,5 +1,5 @@ diff --git a/composables/useToggle.ts b/composables/useToggle.ts new file mode 100644 index 00000000..0e68777f --- /dev/null +++ b/composables/useToggle.ts @@ -0,0 +1,12 @@ +import { ref } from 'vue' + +export const useToggle = ({ state = ref(true) } = {}) => { + const toggle = () => { + state.value = !state.value + } + + return { + state, + toggle, + } +} diff --git a/composables/useZen.ts b/composables/useZen.ts new file mode 100644 index 00000000..78b81d7b --- /dev/null +++ b/composables/useZen.ts @@ -0,0 +1,12 @@ +import { useLocalStorage } from '@vueuse/core' +import { useToggle } from './useToggle' + +export const useZen = () => { + const isZen = useLocalStorage('isZen', false, { initOnMounted: true }) + const { toggle: toggleZen } = useToggle({ state: isZen }) + + return { + isZen, + toggleZen, + } +} diff --git a/layouts/dashboard.vue b/layouts/dashboard.vue index af0c967e..a463938a 100644 --- a/layouts/dashboard.vue +++ b/layouts/dashboard.vue @@ -1,233 +1,125 @@ - @@ -236,4 +128,12 @@ export default defineComponent({ .dashboard { height: var(--app-height, 100vh); } + +.gutter-right { + direction: rtl; +} + +:deep(.gutter-right > *) { + direction: ltr; +} diff --git a/nuxt.config.ts b/nuxt.config.ts index 154d769a..7146e17e 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -252,7 +252,7 @@ export default defineNuxtConfig({ registerPlugin: true, }, devOptions: { - enabled: true, + enabled: !process.env.DISABLE_PWA, type: 'module', }, includeManifestIcons: true, @@ -306,7 +306,7 @@ export default defineNuxtConfig({ }, }, sourcemap: true, - ssr: true, + ssr: !process.env.DISABLE_SSR, tailwindcss: { configPath: '~/tailwind.config.cjs', }, diff --git a/package.json b/package.json index 9e105e62..cd519deb 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "clean": "rimraf .output dev-dist dist", "dev": "nuxt dev --port 8888", "dev:full": "run-p dev firebase:start", + "dev:minimal": "DISABLE_SSR=1 DISABLE_PWA=1 NUXT_PUBLIC_FIREBASE_DISABLED=1 run-s dev", "firebase:login": "firebase login", "firebase:start": "firebase -c ./firebase/firebase.json --project \"${FIREBASE_PROJECT_ID:-demo-octo}\" emulators:start --import ./firebase/data --export-on-exit ./firebase/data", "lint": "eslint .", @@ -29,6 +30,7 @@ "@headlessui/tailwindcss": "^0.2.0", "@headlessui/vue": "^1.7.17", "@mermaid-js/mermaid-mindmap": "^9.3.0", + "@tabler/icons-vue": "^3.11.0", "codemirror-lang-mermaid": "^0.2.2", "culori": "^3.3.0", "deepmerge": "^4.3.1", @@ -61,6 +63,7 @@ "@nuxtjs/tailwindcss": "^6.10.3", "@pinia/nuxt": "^0.4.11", "@playwright/test": "^1.41.2", + "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/typography": "^0.5.10", "@types/culori": "^2.0.4", "@types/file-saver": "^2.0.7", diff --git a/pages/menu.vue b/pages/menu.vue index 8704c12b..76c43460 100644 --- a/pages/menu.vue +++ b/pages/menu.vue @@ -124,50 +124,32 @@ export default {