diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index af24b421..00f6bc97 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Initialize CodeQL uses: github/codeql-action/init@v4 diff --git a/.github/workflows/deploy-development.yml b/.github/workflows/deploy-development.yml index e3dd1360..9cd25f68 100644 --- a/.github/workflows/deploy-development.yml +++ b/.github/workflows/deploy-development.yml @@ -18,10 +18,10 @@ jobs: os: ubuntu-latest - platform: linux/arm64 os: ubuntu-24.04-arm - - platform: linux/arm/v7 - os: ubuntu-24.04-arm + # - platform: linux/arm/v7 + # os: ubuntu-24.04-arm steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Prepare run: | @@ -69,7 +69,7 @@ jobs: touch "${{ runner.temp }}/digests/${digest#sha256:}" - name: Upload digest - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: digests-${{ env.PLATFORM_PAIR }} path: ${{ runner.temp }}/digests/* @@ -85,7 +85,7 @@ jobs: needs: docker-build steps: - name: Download digests - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v7 with: path: ${{ runner.temp }}/digests pattern: digests-* @@ -138,7 +138,7 @@ jobs: contents: write needs: docker-merge steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup Python uses: actions/setup-python@v6 diff --git a/.github/workflows/deploy-edge.yml b/.github/workflows/deploy-edge.yml index ebfb8bbc..e7ecc442 100644 --- a/.github/workflows/deploy-edge.yml +++ b/.github/workflows/deploy-edge.yml @@ -25,10 +25,10 @@ jobs: os: ubuntu-latest - platform: linux/arm64 os: ubuntu-24.04-arm - - platform: linux/arm/v7 - os: ubuntu-24.04-arm + # - platform: linux/arm/v7 + # os: ubuntu-24.04-arm steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: ref: master @@ -78,7 +78,7 @@ jobs: touch "${{ runner.temp }}/digests/${digest#sha256:}" - name: Upload digest - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: digests-${{ env.PLATFORM_PAIR }} path: ${{ runner.temp }}/digests/* @@ -94,7 +94,7 @@ jobs: needs: docker-build steps: - name: Download digests - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v7 with: path: ${{ runner.temp }}/digests pattern: digests-* @@ -147,7 +147,7 @@ jobs: contents: write needs: docker-merge steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: ref: master diff --git a/.github/workflows/deploy-pr.yml b/.github/workflows/deploy-pr.yml index da215625..77af14ea 100644 --- a/.github/workflows/deploy-pr.yml +++ b/.github/workflows/deploy-pr.yml @@ -21,10 +21,10 @@ jobs: os: ubuntu-latest - platform: linux/arm64 os: ubuntu-24.04-arm - - platform: linux/arm/v7 - os: ubuntu-24.04-arm + # - platform: linux/arm/v7 + # os: ubuntu-24.04-arm steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Prepare run: | diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 17ff91e0..a7f1bfaa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,10 +26,10 @@ jobs: os: ubuntu-latest - platform: linux/arm64 os: ubuntu-24.04-arm - - platform: linux/arm/v7 - os: ubuntu-24.04-arm + # - platform: linux/arm/v7 + # os: ubuntu-24.04-arm steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Prepare run: | @@ -77,7 +77,7 @@ jobs: touch "${{ runner.temp }}/digests/${digest#sha256:}" - name: Upload digest - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: digests-${{ env.PLATFORM_PAIR }} path: ${{ runner.temp }}/digests/* @@ -95,7 +95,7 @@ jobs: needs: docker-build steps: - name: Download digests - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v7 with: path: ${{ runner.temp }}/digests pattern: digests-* @@ -152,7 +152,7 @@ jobs: contents: write needs: docker-merge steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup Python uses: actions/setup-python@v6 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c921bd5b..7e8ba49a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - uses: pnpm/action-setup@v4 name: Install pnpm @@ -24,7 +24,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v6 with: - node-version: "lts/*" + node-version: "lts/jod" check-latest: true cache: "pnpm" @@ -47,7 +47,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - uses: pnpm/action-setup@v4 name: Install pnpm @@ -57,7 +57,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v6 with: - node-version: "lts/*" + node-version: "lts/jod" check-latest: true cache: "pnpm" diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 9e000e03..819c8328 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,8 +3,7 @@ "aaron-bond.better-comments", "dbaeumer.vscode-eslint", "antfu.goto-alias", - "visualstudioexptteam.vscodeintellicode", - "esbenp.prettier-vscode", + "prettier.prettier-vscode", "yoavbls.pretty-ts-errors", "bradlc.vscode-tailwindcss", "vue.volar", diff --git a/.vscode/settings.json b/.vscode/settings.json index f62f2c98..791e9e0a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,22 +1,22 @@ { "editor.tabSize": 2, "editor.useTabStops": false, - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "prettier.prettier-vscode", "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": "always" }, "[vue]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "prettier.prettier-vscode" }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "prettier.prettier-vscode" }, "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "prettier.prettier-vscode" }, "[markdown]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "prettier.prettier-vscode", "editor.tabSize": 4, "editor.useTabStops": false }, diff --git a/CHANGELOG.md b/CHANGELOG.md index fbc29052..6233f326 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,50 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +## [15.2.1] - 2026-01-14 + +### Fixed + +- Icon in Searchbar (https://github.com/wg-easy/wg-easy/commit/458f66818a400f181e2c6326ede077c8793d71f2) +- Interface save not working (https://github.com/wg-easy/wg-easy/commit/48f3fbd715a889e2425702a8a46332f2752aef91) +- Error Messages in Setup (https://github.com/wg-easy/wg-easy/commit/32a055093a76342c40858d8dcf563b0700a8bd48) + +## [15.2.0] - 2026-01-12 + +### Added + +- AmneziaWG integration (https://github.com/wg-easy/wg-easy/pull/2102, https://github.com/wg-easy/wg-easy/pull/2226) +- Search / filter box (https://github.com/wg-easy/wg-easy/pull/2170) +- `INIT_ALLOWED_IPS` env var (https://github.com/wg-easy/wg-easy/pull/2164) +- Show client endpoint (https://github.com/wg-easy/wg-easy/pull/2058) +- Add option to view and copy config (https://github.com/wg-easy/wg-easy/pull/2289) + +### Fixed + +- Fix download as conf.txt (https://github.com/wg-easy/wg-easy/pull/2269) +- Clean filename for OTL download (https://github.com/wg-easy/wg-easy/pull/2253) +- Text color in admin menu in light mode (https://github.com/wg-easy/wg-easy/pull/2307) + +### Changed + +- Allow lower MTU (https://github.com/wg-easy/wg-easy/pull/2228) +- Use /32 and /128 for client Cidr (https://github.com/wg-easy/wg-easy/pull/2217) +- Return client id on create (https://github.com/wg-easy/wg-easy/pull/2190) +- Publish on Codeberg (https://github.com/wg-easy/wg-easy/pull/2160) +- Allow empty DNS (https://github.com/wg-easy/wg-easy/pull/2052, https://github.com/wg-easy/wg-easy/pull/2057) +- Don't include keys in API responses (https://github.com/wg-easy/wg-easy/pull/2015) +- Try all QR ecc levels (https://github.com/wg-easy/wg-easy/pull/2288) +- Update OneTimeLink expiry on reuse (https://github.com/wg-easy/wg-easy/pull/2370) +- Removed ARMv7 support (https://github.com/wg-easy/wg-easy/pull/2369) + +### Docs + +- Add AdGuard Home (https://github.com/wg-easy/wg-easy/pull/2175) +- Add Routed (No NAT) docs (https://github.com/wg-easy/wg-easy/pull/2181, https://github.com/wg-easy/wg-easy/pull/2380) +- Add AmneziaWG docs (https://github.com/wg-easy/wg-easy/pull/2108, https://github.com/wg-easy/wg-easy/pull/2292) + ## [15.1.0] - 2025-07-01 ### Added diff --git a/Dockerfile b/Dockerfile index d5bba623..45b46d50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/node:lts-alpine AS build +FROM docker.io/library/node:jod-alpine AS build WORKDIR /app # update corepack @@ -22,7 +22,7 @@ RUN apk add linux-headers build-base git && \ # Copy build result to a new image. # This saves a lot of disk space. -FROM docker.io/library/node:lts-alpine +FROM docker.io/library/node:jod-alpine WORKDIR /app HEALTHCHECK --interval=1m --timeout=5s --retries=3 CMD /usr/bin/timeout 5s /bin/sh -c "/usr/bin/wg show | /bin/grep -q interface || exit 1" diff --git a/Dockerfile.dev b/Dockerfile.dev index d0857ad8..e9dcec16 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM docker.io/library/node:lts-alpine +FROM docker.io/library/node:jod-alpine WORKDIR /app # update corepack diff --git a/assets/screenshot.png b/assets/screenshot.png index dd39f3ff..b55deb79 100644 Binary files a/assets/screenshot.png and b/assets/screenshot.png differ diff --git a/docs/content/advanced/config/amnezia.md b/docs/content/advanced/config/amnezia.md index bdead28b..f8b86ff6 100644 --- a/docs/content/advanced/config/amnezia.md +++ b/docs/content/advanced/config/amnezia.md @@ -2,7 +2,9 @@ title: AmneziaWG --- -Experimental support for AmneziaWG can be enabled by setting the `EXPERIMENTAL_AWG` environment variable to `true`. This feature is still under development and may change in future releases. +## Introduction + +**AmneziaWG** is a modified version of the WireGuard protocol with enhanced traffic obfuscation capabilities. AmneziaWG's primary goal is to counter deep packet inspection (DPI) systems and bypass VPN blocking. AmneziaWG adds multi-level transport-layer obfuscation by: @@ -12,6 +14,12 @@ AmneziaWG adds multi-level transport-layer obfuscation by: These measures make it harder for third parties to analyze or identify your traffic, enhancing both privacy and security. +## Activating AmneziaWG + +You must install the [AmneziaWG kernel module](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module) on the host system. + +Experimental support for AmneziaWG can be enabled by setting the `EXPERIMENTAL_AWG` environment variable to `true`. Starting from wg-easy version 16, this setting will be enabled by default. This feature is still under development and may change in future releases. + When enabled, wg-easy will automatically detect whether the AmneziaWG kernel module is available. If it is not, the system will fall back to the standard WireGuard module. To override this automatic detection, set the `OVERRIDE_AUTO_AWG` environment variable. By default, this variable is unset. @@ -21,17 +29,51 @@ Possible values: - `awg` — Force use of AmneziaWG - `wg` — Force use of standard WireGuard -To be able to connect to wg-easy if AmneziaWG is enabled, you must have a AmneziaWG-compatible client. +## AmneziaWG Parameters + +Parameter descriptions can be found in the [AmneziaWG documentation](https://docs.amnezia.org/documentation/amnezia-wg) and on the [kernel module page](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module). + +All parameters except I1-I5 will be set at first startup. For information on how to set I1-I5 parameters, refer to the [AmneziaWG documentation](https://docs.amnezia.org/documentation/instructions/new-amneziawg-selfhosted/#how-to-extract-a-protocol-signature-for-amneziawg-15-manually). + +If a parameter is not set, it will not be added to the configuration. If all AmneziaWG-specific parameters are absent, AmneziaWG will be fully compatible with standard WireGuard. + +### Parameter Compatibility Table + +| Parameter | Can differ between server and client | Configurable on server | Configurable on client | +| --------- | ------------------------------------ | ---------------------- | ----------------------- | +| Jc | ✅ Yes | ✅ | ✅ | +| Jmin | ✅ Yes | ✅ | ✅ | +| Jmax | ✅ Yes | ✅ | ✅ | +| S1-S4 | ❌ No, must match | ✅ | ❌ (copied from server) | +| H1-H4 | ❌ No, must match | ✅ | ❌ (copied from server) | +| I1-I5 | ✅ Yes | ✅ | ✅ | + +## Client Applications + +To be able to connect to wg-easy if AmneziaWG is enabled, you must have an AmneziaWG-compatible client. Currently, only WG Tunnel and Amnezia VPN supports AmneziaWG 1.5/2.0! AmneziaWG clients require building from source code. Android: -- [AmneziaWG](https://play.google.com/store/apps/details?id=org.amnezia.awg) - Official Client +- [Amnezia VPN](https://play.google.com/store/apps/details?id=org.amnezia.vpn) - Amnezia VPN Official Client +- [AmneziaWG](https://play.google.com/store/apps/details?id=org.amnezia.awg) - AmneziaWG Official Client - [WG Tunnel](https://play.google.com/store/apps/details?id=com.zaneschepke.wireguardautotunnel) - Third Party Client iOS and macOS: -- [AmneziaWG](https://apps.apple.com/us/app/amneziawg/id6478942365) - Official Client +- [Amnezia VPN](https://apps.apple.com/us/app/amneziavpn/id1600529900) - Amnezia VPN Official Client +- [AmneziaWG](https://apps.apple.com/us/app/amneziawg/id6478942365) - AmneziaWG Official Client Windows: -- [AmneziaWG](https://github.com/amnezia-vpn/amneziawg-windows-client/releases) - Official Client +- [Amnezia VPN](https://amnezia.org/downloads) - Amnezia VPN Official Client +- [AmneziaWG](https://github.com/amnezia-vpn/amneziawg-windows-client/releases) - AmneziaWG Official Client + +Linux: + +- [Amnezia VPN](https://amnezia.org/downloads) - Amnezia VPN Official Client +- [amneziawg-tools](https://github.com/amnezia-vpn/amneziawg-tools) - AmneziaWG Tools + +OpenWRT: + +- [AmneziaWG OpenWRT](https://github.com/Slava-Shchipunov/awg-openwrt) - AmneziaWG OpenWRT Packages +- [AmneziaWG OpenWRT](https://github.com/lolo6oT/awg-openwrt) - AmneziaWG OpenWRT Packages diff --git a/docs/content/advanced/migrate/from-14-to-15.md b/docs/content/advanced/migrate/from-14-to-15.md index c0e2bd16..3ec3276e 100644 --- a/docs/content/advanced/migrate/from-14-to-15.md +++ b/docs/content/advanced/migrate/from-14-to-15.md @@ -7,7 +7,7 @@ This guide will help you migrate from `v14` to version `v15` of `wg-easy`. ## Changes - This is a complete rewrite of the `wg-easy` project, therefore the configuration files and the way you interact with the project have changed. -- If you use armv6, you unfortunately won't be able to migrate to `v15`. +- If you use armv6 or armv7, you unfortunately won't be able to migrate to `v15`. - If you are connecting to the Web UI via HTTP, you need to set the `INSECURE` environment variable to `true` in the new container. ## Migration diff --git a/docs/content/examples/tutorials/basic-installation.md b/docs/content/examples/tutorials/basic-installation.md index 8fc2ea17..0ef8cddb 100644 --- a/docs/content/examples/tutorials/basic-installation.md +++ b/docs/content/examples/tutorials/basic-installation.md @@ -8,7 +8,7 @@ title: Basic Installation 1. You need to have a host that you can manage 2. You need to have a domain name or a public IP address -3. You need a supported architecture (x86_64, arm64, armv7) +3. You need a supported architecture (x86_64, arm64) 4. You need curl installed on your host ## Install Docker diff --git a/docs/content/examples/tutorials/routed.md b/docs/content/examples/tutorials/routed.md index b72eb647..3ed4070d 100644 --- a/docs/content/examples/tutorials/routed.md +++ b/docs/content/examples/tutorials/routed.md @@ -93,3 +93,19 @@ PostDown ```shell iptables -D INPUT -p udp -m udp --dport {{port}} -j ACCEPT; iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; ip6tables -D INPUT -p udp -m udp --dport {{port}} -j ACCEPT; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -D FORWARD -o wg0 -j ACCEPT ``` + +/// warning | Important: When using nftables use the following hooks instead. + +PostUp + +```shell +nft add chain ip filter WG_EASY; nft add rule ip filter DOCKER-USER jump WG_EASY; nft add rule ip filter WG_EASY iifname {{device}} accept; nft add rule ip filter WG_EASY oifname {{device}} accept; nft add chain ip6 filter WG_EASY; nft add rule ip6 filter DOCKER-USER jump WG_EASY; nft add rule ip6 filter WG_EASY iifname {{device}} accept; nft add rule ip6 filter WG_EASY oifname {{device}} accept; +``` + +PostDown + +```shell +nft delete rule ip filter DOCKER-USER handle $(nft -a list chain ip filter DOCKER-USER | awk '/jump WG_EASY/ {print $NF}'); nft flush chain ip filter WG_EASY; nft delete chain ip filter WG_EASY; nft delete rule ip6 filter DOCKER-USER handle $(nft -a list chain ip6 filter DOCKER-USER | awk '/jump WG_EASY/ {print $NF}'); nft flush chain ip6 filter WG_EASY; nft delete chain ip6 filter WG_EASY +``` + +/// diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index c1d2a451..c58f6827 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -12,7 +12,7 @@ Before you can get started with deploying your own VPN, there are some requireme 1. You need to have a host that you can manage 2. You need to have a domain name or a public IP address -3. You need a supported architecture (x86_64, arm64, armv7) +3. You need a supported architecture (x86_64, arm64) ### Host Setup diff --git a/package.json b/package.json index 9c71de73..7b46e8e0 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,11 @@ "build": "docker build -t wg-easy .", "docs:preview": "docker run --rm -it -p 8080:8080 -v ./docs:/docs squidfunk/mkdocs-material serve -a 0.0.0.0:8080", "scripts:version": "bash scripts/version.sh", + "scripts:i18n": "bash scripts/i18n.sh", "format:check:docs": "prettier --check docs" }, "devDependencies": { - "prettier": "^3.6.2" + "prettier": "^3.8.0" }, - "packageManager": "pnpm@10.18.3" + "packageManager": "pnpm@10.28.1" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af0feb48..3ad3a049 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,16 +9,16 @@ importers: .: devDependencies: prettier: - specifier: ^3.6.2 - version: 3.6.2 + specifier: ^3.8.0 + version: 3.8.0 packages: - prettier@3.6.2: - resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} + prettier@3.8.0: + resolution: {integrity: sha512-yEPsovQfpxYfgWNhCfECjG5AQaO+K3dp6XERmOepyPDVqcJm+bjyCVO3pmU+nAPe0N5dDvekfGezt/EIiRe1TA==} engines: {node: '>=14'} hasBin: true snapshots: - prettier@3.6.2: {} + prettier@3.8.0: {} diff --git a/scripts/i18n.sh b/scripts/i18n.sh new file mode 100755 index 00000000..4d6de690 --- /dev/null +++ b/scripts/i18n.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +folder="src/i18n/locales" +base_file="$folder/en.json" + +# Get all leaf keys from the English base file +base_keys=$(jq -r 'paths(scalars) | map(tostring) | join(".")' "$base_file") +total=$(echo "$base_keys" | wc -l) + +# Loop through all JSON files in the folder +for file in "$folder"/*.json; do + name=$(basename "$file" .json) + translated_keys=$(jq -r 'paths(scalars) | map(tostring) | join(".")' "$file") + done=$(comm -12 <(echo "$base_keys" | sort) <(echo "$translated_keys" | sort) | wc -l) + percent=$((100 * done / total)) + check="[ ]" + [ "$percent" -eq 100 ] && check="[x]" + printf "%s %s (%d%%)\n" "- $check" "$name" "$percent" +done \ No newline at end of file diff --git a/scripts/version.sh b/scripts/version.sh index ba6ee106..6d38b2e1 100644 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -30,6 +30,7 @@ echo "Updated package.json to version $new_version" echo "----" echo "If you changed the major version, remember to update the docker-compose.yml file and docs (search for: ref: major version)" +echo "Make sure to stage any changes before proceeding (e.g. Changelog updates)." echo "----" echo "If you did everything press 'y' to commit the changes and create a new tag" diff --git a/src/app/components/Base/CodeBlock.vue b/src/app/components/Base/CodeBlock.vue new file mode 100644 index 00000000..2169476e --- /dev/null +++ b/src/app/components/Base/CodeBlock.vue @@ -0,0 +1,29 @@ + + + {{ code }} + + + + diff --git a/src/app/components/Clients/ConfigDialog.vue b/src/app/components/Clients/ConfigDialog.vue new file mode 100644 index 00000000..e78b1a83 --- /dev/null +++ b/src/app/components/Clients/ConfigDialog.vue @@ -0,0 +1,74 @@ + + + + + + + {{ $t('client.config') }} + + + + + + + {{ $t('general.loading') }} + + + + + {{ $t('dialog.cancel') }} + + + + {{ $t('copy.copy') }} + + + + + + + diff --git a/src/app/components/Clients/QRCodeDialog.vue b/src/app/components/Clients/QRCodeDialog.vue index 9905c354..c182150b 100644 --- a/src/app/components/Clients/QRCodeDialog.vue +++ b/src/app/components/Clients/QRCodeDialog.vue @@ -9,7 +9,7 @@ - + {{ $t('dialog.cancel') }} diff --git a/src/app/components/Clients/Search.vue b/src/app/components/Clients/Search.vue index f55e8084..94ebbe46 100644 --- a/src/app/components/Clients/Search.vue +++ b/src/app/components/Clients/Search.vue @@ -1,14 +1,14 @@ - + + + {{ label }} + + + + + + + + + diff --git a/src/app/components/Icons/MagnifyingGlass.vue b/src/app/components/Icons/MagnifyingGlass.vue new file mode 100644 index 00000000..750c8044 --- /dev/null +++ b/src/app/components/Icons/MagnifyingGlass.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/src/app/middleware/auth.global.ts b/src/app/middleware/auth.global.ts index 70a37e86..06029fd6 100644 --- a/src/app/middleware/auth.global.ts +++ b/src/app/middleware/auth.global.ts @@ -4,25 +4,27 @@ export default defineNuxtRouteMiddleware(async (to) => { return; } + const event = useRequestEvent(); + const authStore = useAuthStore(); - const userData = await authStore.getSession(); + authStore.userData = await authStore.getSession(event); // skip login if already logged in if (to.path === '/login') { - if (userData?.username) { + if (authStore.userData?.username) { return navigateTo('/', { redirectCode: 302 }); } return; } // Require auth for every page other than Login - if (!userData?.username) { + if (!authStore.userData?.username) { return navigateTo('/login', { redirectCode: 302 }); } // Check for admin access if (to.path.startsWith('/admin')) { - if (!hasPermissions(userData, 'admin', 'any')) { + if (!hasPermissions(authStore.userData, 'admin', 'any')) { return abortNavigation('Not allowed to access Admin Panel'); } } diff --git a/src/app/pages/admin.vue b/src/app/pages/admin.vue index 7420817d..48f30f21 100644 --- a/src/app/pages/admin.vue +++ b/src/app/pages/admin.vue @@ -13,11 +13,12 @@ v-for="(item, index) in menuItems" :key="index" :to="`/admin/${item.id}`" - active-class="bg-red-800 rounded" + class="group rounded" + active-class="bg-red-800 active" > {{ item.name }} @@ -37,9 +38,6 @@
{{ code }}