Compare commits

...

59 Commits

Author SHA1 Message Date
Maxi Quoß 43ebe5f86c fix: ignore static file error 404 on build 2025-09-15 22:52:45 +02:00
Maxi Quoß 5e4664356d fix: icon sometimes gets removed 2025-09-15 22:49:22 +02:00
Maxi Quoß ef75531a6f fix: generate manifest in go backend 2025-09-15 22:45:33 +02:00
Maxi Quoß bd6038720b fix: generate manifest in go backend 2025-09-15 22:21:00 +02:00
Maxi Quoß 41cc546b81 update deps 2025-09-15 21:35:47 +02:00
Maxi Quoß 25a67af29d spelling 2025-09-15 21:32:57 +02:00
Maxi Quoß 3f3ef10fbc feat: custom manifest data from backend, close #1351 2025-09-15 21:31:58 +02:00
Maxi Quoß f9f73da80a fix: pwa website rotation #1350 2025-09-15 20:23:11 +02:00
dependabot[bot] 00d1659474 npm-dep: bump @sveltejs/kit from 2.38.1 to 2.39.1 in /frontend
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.38.1 to 2.39.1.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.39.1/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-version: 2.39.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-15 10:00:48 +00:00
dependabot[bot] 36abd34f07 npm-dep: bump @inlang/paraglide-js from 2.3.0 to 2.3.2 in /frontend
Bumps [@inlang/paraglide-js](https://github.com/opral/inlang-paraglide-js) from 2.3.0 to 2.3.2.
- [Commits](https://github.com/opral/inlang-paraglide-js/commits)

---
updated-dependencies:
- dependency-name: "@inlang/paraglide-js"
  dependency-version: 2.3.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-15 09:59:29 +00:00
dependabot[bot] ba997ba94f npm-dep: bump daisyui from 5.1.10 to 5.1.12 in /frontend
Bumps [daisyui](https://github.com/saadeghi/daisyui/tree/HEAD/packages/daisyui) from 5.1.10 to 5.1.12.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits/v5.1.12/packages/daisyui)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-version: 5.1.12
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-15 09:57:37 +00:00
Maxi Quoß 56b25b708e fix: gopher on welcome page for sub paths 2025-09-12 11:51:25 +02:00
Maxi Quoß 8297498902 add nginx example for sub path 2025-09-12 11:50:59 +02:00
dependabot[bot] 8e63cbe42d npm-dep: bump svelte from 5.38.8 to 5.38.10 in /frontend
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 5.38.8 to 5.38.10.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@5.38.10/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-version: 5.38.10
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-12 09:09:02 +00:00
dependabot[bot] b0c6696c97 npm-dep: bump eslint-plugin-svelte from 3.12.2 to 3.12.3 in /frontend
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte/tree/HEAD/packages/eslint-plugin-svelte) from 3.12.2 to 3.12.3.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Changelog](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/packages/eslint-plugin-svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/commits/eslint-plugin-svelte@3.12.3/packages/eslint-plugin-svelte)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-version: 3.12.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-11 09:08:04 +00:00
dependabot[bot] 010e306b07 npm-dep: bump daisyui from 5.1.9 to 5.1.10 in /frontend
Bumps [daisyui](https://github.com/saadeghi/daisyui/tree/HEAD/packages/daisyui) from 5.1.9 to 5.1.10.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits/v5.1.10/packages/daisyui)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-version: 5.1.10
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-11 09:07:54 +00:00
dependabot[bot] 5b755990fa npm-dep: bump @sveltejs/kit from 2.37.1 to 2.38.1 in /frontend
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.37.1 to 2.38.1.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.38.1/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-version: 2.38.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-11 09:07:42 +00:00
dependabot[bot] b4c30a4eaa npm-dep: bump @inlang/paraglide-js from 2.2.0 to 2.3.0 in /frontend
Bumps [@inlang/paraglide-js](https://github.com/opral/inlang-paraglide-js) from 2.2.0 to 2.3.0.
- [Commits](https://github.com/opral/inlang-paraglide-js/commits)

---
updated-dependencies:
- dependency-name: "@inlang/paraglide-js"
  dependency-version: 2.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-11 09:07:25 +00:00
dependabot[bot] a6d582bc53 npm-dep: bump globals from 16.3.0 to 16.4.0 in /frontend
Bumps [globals](https://github.com/sindresorhus/globals) from 16.3.0 to 16.4.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.3.0...v16.4.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 16.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 09:07:46 +00:00
dependabot[bot] 24ceac63e1 npm-dep: bump svelte from 5.38.7 to 5.38.8 in /frontend
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 5.38.7 to 5.38.8.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@5.38.8/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-version: 5.38.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 09:07:24 +00:00
dependabot[bot] 05c2765a3c npm-dep: bump daisyui from 5.1.8 to 5.1.9 in /frontend
Bumps [daisyui](https://github.com/saadeghi/daisyui/tree/HEAD/packages/daisyui) from 5.1.8 to 5.1.9.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits/v5.1.9/packages/daisyui)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-version: 5.1.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 09:09:57 +00:00
dependabot[bot] 6ce67831f9 npm-dep: bump typescript-eslint from 8.42.0 to 8.43.0 in /frontend
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.42.0 to 8.43.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.43.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.43.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 09:09:37 +00:00
dependabot[bot] 97774b8e70 npm-dep: bump vite from 6.3.5 to 6.3.6 in /frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.3.5 to 6.3.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 09:19:41 +00:00
dependabot[bot] a103c62a72 npm-dep: bump eslint from 9.34.0 to 9.35.0 in /frontend
Bumps [eslint](https://github.com/eslint/eslint) from 9.34.0 to 9.35.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.34.0...v9.35.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.35.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 09:19:15 +00:00
dependabot[bot] 5bc4f94f3d npm-dep: bump eslint-plugin-svelte from 3.12.1 to 3.12.2 in /frontend
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) from 3.12.1 to 3.12.2.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/compare/eslint-plugin-svelte@3.12.1...eslint-plugin-svelte@3.12.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-version: 3.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 09:15:32 +00:00
dependabot[bot] 0724942481 npm-dep: bump @eslint/js from 9.34.0 to 9.35.0 in /frontend
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.34.0 to 9.35.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.35.0/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.35.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 09:14:44 +00:00
dependabot[bot] b66bb2b1ea npm-dep: bump daisyui from 5.1.7 to 5.1.8 in /frontend
Bumps [daisyui](https://github.com/saadeghi/daisyui/tree/HEAD/packages/daisyui) from 5.1.7 to 5.1.8.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits/v5.1.8/packages/daisyui)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-version: 5.1.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 09:13:03 +00:00
dependabot[bot] 57e0285761 go-dep: bump golang.org/x/sys from 0.35.0 to 0.36.0 in /backend
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.35.0 to 0.36.0.
- [Commits](https://github.com/golang/sys/compare/v0.35.0...v0.36.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.36.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 09:12:33 +00:00
dependabot[bot] a10a5bf575 npm-dep: bump @sveltejs/kit from 2.37.0 to 2.37.1 in /frontend
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.37.0 to 2.37.1.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.37.1/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-version: 2.37.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 09:12:04 +00:00
dependabot[bot] 4a874f01d9 go-dep: bump github.com/pocketbase/pocketbase in /backend
Bumps [github.com/pocketbase/pocketbase](https://github.com/pocketbase/pocketbase) from 0.29.3 to 0.30.0.
- [Release notes](https://github.com/pocketbase/pocketbase/releases)
- [Changelog](https://github.com/pocketbase/pocketbase/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pocketbase/pocketbase/compare/v0.29.3...v0.30.0)

---
updated-dependencies:
- dependency-name: github.com/pocketbase/pocketbase
  dependency-version: 0.30.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 09:11:46 +00:00
dependabot[bot] dd8df050e3 npm-dep: bump svelte from 5.38.6 to 5.38.7 in /frontend
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 5.38.6 to 5.38.7.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@5.38.7/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-version: 5.38.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-05 09:08:44 +00:00
dependabot[bot] da91bd3e53 npm-dep: bump daisyui from 5.1.6 to 5.1.7 in /frontend
Bumps [daisyui](https://github.com/saadeghi/daisyui/tree/HEAD/packages/daisyui) from 5.1.6 to 5.1.7.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits/v5.1.7/packages/daisyui)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-version: 5.1.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-05 09:06:56 +00:00
dependabot[bot] bf621749cf gh-action: bump actions/download-artifact from 4 to 5
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-05 09:06:37 +00:00
Maxi Quoß 3ecec817b5 gh-action: fix goreleaser dirty state 2025-09-05 03:15:49 +02:00
Maxi Quoß 2729424b01 gh-action: fix goreleaser args 2025-09-05 03:10:04 +02:00
Maxi Quoß 03b3e67aa4 gh-action: use more caching 2025-09-05 03:06:59 +02:00
Maxi Quoß 2657a3b119 go-dep: use go 1.24.1 2025-09-04 23:36:33 +02:00
Maxi Quoß 81e9319873 gh-action: setup pnpm via action 2025-09-04 23:28:46 +02:00
Maxi Quoß b35544a455 gh-action: update setup-node and use cache pnpm 2025-09-04 23:21:50 +02:00
Maxi Quoß 7c640ac32e feat: support for sub path hosting 2025-09-04 23:12:50 +02:00
Maxi Quoß 75969b037e fix: improve device group logic
fix: timeout not updating
feat: use resolve() for internal paths
2025-09-04 20:36:05 +02:00
dependabot[bot] b1a4a6ce14 npm-dep: bump eslint-plugin-svelte from 3.11.0 to 3.12.1 in /frontend
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) from 3.11.0 to 3.12.1.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/compare/eslint-plugin-svelte@3.11.0...eslint-plugin-svelte@3.12.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-version: 3.12.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 12:51:19 +00:00
dependabot[bot] 24ccf1f277 gh-action: bump actions/setup-go from 5 to 6
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 10:28:10 +00:00
dependabot[bot] 7910f10005 npm-dep: bump daisyui from 5.1.3 to 5.1.6 in /frontend
Bumps [daisyui](https://github.com/saadeghi/daisyui/tree/HEAD/packages/daisyui) from 5.1.3 to 5.1.6.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits/v5.1.6/packages/daisyui)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-version: 5.1.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-03 23:56:09 +00:00
dependabot[bot] 6094ba2e6d npm-dep: bump typescript-eslint from 8.41.0 to 8.42.0 in /frontend
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.41.0 to 8.42.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.42.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.42.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-03 23:55:54 +00:00
dependabot[bot] bf5861561c npm-dep: bump daisyui from 5.0.54 to 5.1.3 in /frontend
Bumps [daisyui](https://github.com/saadeghi/daisyui/tree/HEAD/packages/daisyui) from 5.0.54 to 5.1.3.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits/v5.1.3/packages/daisyui)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-version: 5.1.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-03 08:05:04 +00:00
dependabot[bot] c77e76b502 npm-dep: bump cron-parser from 5.3.0 to 5.3.1 in /frontend
Bumps [cron-parser](https://github.com/harrisiirak/cron-parser) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/harrisiirak/cron-parser/releases)
- [Commits](https://github.com/harrisiirak/cron-parser/compare/v5.3.0...v5.3.1)

---
updated-dependencies:
- dependency-name: cron-parser
  dependency-version: 5.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-01 17:48:11 +00:00
Roshan Studley 6ce669d643 Update README.md (#1337) 2025-09-01 11:34:17 +02:00
Maxi Quoß ab5fa0e961 feat: add hindi language (hi-IN) 2025-08-31 10:36:55 +02:00
Maxi Quoß 9ad53148b4 update deps 2025-08-31 10:06:38 +02:00
Maxi Quoß f6a208f4d6 feat: use new svelte 5 syntax 2025-08-31 10:05:25 +02:00
dependabot[bot] 2d1c64c9b4 npm-dep: bump @sveltejs/kit from 2.36.3 to 2.37.0 in /frontend
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.36.3 to 2.37.0.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.37.0/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-version: 2.37.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-29 09:07:22 +00:00
dependabot[bot] 05a6a544f0 npm-dep: bump daisyui from 5.0.51 to 5.0.54 in /frontend
Bumps [daisyui](https://github.com/saadeghi/daisyui/tree/HEAD/packages/daisyui) from 5.0.51 to 5.0.54.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits/v5.0.54/packages/daisyui)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-version: 5.0.54
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-28 10:55:47 +00:00
dependabot[bot] 10469c8f10 npm-dep: bump svelte from 5.38.3 to 5.38.6 in /frontend
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 5.38.3 to 5.38.6.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@5.38.6/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-version: 5.38.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-28 10:37:24 +00:00
dependabot[bot] b5ecd4be83 npm-dep: bump typescript-eslint from 8.40.0 to 8.41.0 in /frontend
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.40.0 to 8.41.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.41.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.41.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-27 17:04:49 +00:00
dependabot[bot] 7d5fa685e5 npm-dep: bump @sveltejs/kit from 2.36.2 to 2.36.3 in /frontend
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.36.2 to 2.36.3.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.36.3/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-version: 2.36.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-27 17:03:18 +00:00
dependabot[bot] 6eadc5b48e npm-dep: bump daisyui from 5.0.50 to 5.0.51 in /frontend
Bumps [daisyui](https://github.com/saadeghi/daisyui/tree/HEAD/packages/daisyui) from 5.0.50 to 5.0.51.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/commits/v5.0.51/packages/daisyui)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-version: 5.0.51
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-27 01:25:13 +00:00
Maxi Quoß 7ab8170f8c remove log 2025-08-26 16:56:11 +02:00
Maxi Quoß 0fcd04884f fix: device cards not updating 2025-08-26 16:55:09 +02:00
31 changed files with 1271 additions and 824 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ jobs:
steps:
- uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: "./backend/go.mod"
cache-dependency-path: "./backend/go.sum"
+90 -34
View File
@@ -15,7 +15,9 @@ jobs:
- name: Set runner
id: set-runner
run: |
runners=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.REPO_ACCESS_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/actions/runners")
runners=$(curl -s -H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.REPO_ACCESS_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/actions/runners")
available=$(echo "$runners" | jq '.runners[] | select(.status == "online" and .busy == false and .labels[] .name == "self-hosted")')
if [ -n "$available" ]; then
echo "runner-label=self-hosted" >> "$GITHUB_OUTPUT"
@@ -23,39 +25,85 @@ jobs:
echo "runner-label=ubuntu-latest" >> "$GITHUB_OUTPUT"
fi
goreleaser:
frontend:
needs: check-runner
runs-on: ${{ needs.check-runner.outputs.runner-label }}
steps:
# pull code
- name: Checkout
uses: actions/checkout@v5
- uses: actions/checkout@v5
with:
fetch-depth: 1
- uses: pnpm/action-setup@v4
with:
version: latest
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: latest
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Cache frontend build
uses: actions/cache@v4
with:
path: |
frontend/node_modules
frontend/.svelte-kit
key: ${{ runner.os }}-pnpm-${{ hashFiles('frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Build frontend
run: |
pnpm --prefix=./frontend install --frozen-lockfile --prefer-offline
PUBLIC_VERSION=${GITHUB_REF##*/} pnpm --prefix=./frontend run build
tar -czf frontend-dist.tar.gz -C frontend/build .
- name: Upload frontend artifact
uses: actions/upload-artifact@v4
with:
name: frontend-dist
path: frontend-dist.tar.gz
goreleaser:
needs:
- check-runner
- frontend
runs-on: ${{ needs.check-runner.outputs.runner-label }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
# install latest node
- name: Set up Node.js
uses: actions/setup-node@v4
- name: Download frontend artifact
uses: actions/download-artifact@v5
with:
node-version: latest
name: frontend-dist
# build sveltekit frontend
- name: Build frontend
- name: Extract frontend into backend
run: |
npm i -g pnpm
pnpm --prefix=./frontend i
PUBLIC_VERSION=${GITHUB_REF##*/} pnpm --prefix=./frontend run build
cp -r ./frontend/build/* ./backend/pb_public/
mkdir -p backend/pb_public
tar -xzf frontend-dist.tar.gz -C backend/pb_public
git reset --hard
git clean -fd
# setup go
- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: "./backend/go.mod"
cache-dependency-path: "./backend/go.sum"
go-version-file: backend/go.mod
cache-dependency-path: backend/go.sum
- name: Cache Go build
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('backend/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# build
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
@@ -67,17 +115,29 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
- name: Upload backend artifact
uses: actions/upload-artifact@v4
with:
name: backend-dist
path: backend/dist
docker:
needs:
- goreleaser
- check-runner
- frontend
- goreleaser
runs-on: ${{ needs.check-runner.outputs.runner-label }}
steps:
# pull code
- name: Check Out Repo
uses: actions/checkout@v5
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Download backend artifact
uses: actions/download-artifact@v5
with:
name: backend-dist
path: backend/dist
# image tags
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
@@ -91,33 +151,27 @@ jobs:
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
# qemu
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# docker buildx
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
# ghcr.io login
- name: Log in to the Container registry
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# ducker hub login
- name: Login to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# build and push
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: .
@@ -125,5 +179,7 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VERSION=${{github.ref_name}}
VERSION=${{ github.ref_name }}
+51 -16
View File
@@ -78,7 +78,7 @@ You can use the [docker-compose](docker-compose.yml) example. See the comments i
### Non-root docker user:
You will loose the ability to add network devices via the scan page.
You will lose the ability to add network devices via the scan page.
Create the mount point first:
@@ -116,6 +116,40 @@ upsnap.example.com {
}
```
### Run in sub path
You can run UpSnap on a different path than `/`, e.g. `/upsnap-sub-path/`. To do this in caddy, set the following:
```
http://localhost:8091 {
handle /upsnap-sub-path/* {
uri strip_prefix /upsnap-sub-path
reverse_proxy localhost:8090
}
}
```
Or nginx:
```
http {
server {
listen 8091;
server_name localhost;
location /upsnap-sub-path/ {
proxy_pass http://localhost:8090/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}
```
Paths must end with a trailing `/`.
## 🐧 Install from the [AUR](https://aur.archlinux.org/packages/upsnap-bin)
```bash
@@ -138,22 +172,23 @@ Although UpSnap has user authorisation, it is **not recommended to expose it to
UpSnap is available in the following languages so far:
- 🇧🇬 **Bulgarian** (bg-BG)
- 🇩🇪 **German** (de-DE)
- 🇺🇸 **English** (en-US)
- 🇪🇸 **Spanish** (es-ES)
- 🇫🇷 **French** (fr-FR)
- 🇮🇩 **Bahasa Indonesia** (id-ID)
- 🇮🇹 **Italian** (it-IT)
- 🇯🇵 **Japanese** (ja-JP)
- 🇳🇱 **Dutch** (nl-NL)
- 🇳🇴 **Norwegian** (nb-NO)
- 🇵🇱 **Polish** (pl-PL)
- 🇵🇹 **Portuguese** (pt-PT)
- 🇺🇦 **Ukrainian** (uk-UA)
- 🇻🇳 **Vietnamese** (vi-VN)
- 🇧🇬 **Bulgarian (Bulgaria)** (bg-BG)
- 🇩🇪 **German (Germany)** (de-DE)
- 🇺🇸 **English (United States)** (en-US)
- 🇪🇸 **Spanish (Spain)** (es-ES)
- 🇫🇷 **French (France)** (fr-FR)
- 🇮🇳 **Hindi (India)** (hi-IN)
- 🇮🇩 **Bahasa (Indonesia)** (id-ID)
- 🇮🇹 **Italian (Italy)** (it-IT)
- 🇯🇵 **Japanese (Japan)** (ja-JP)
- 🇳🇱 **Dutch (Netherlands)** (nl-NL)
- 🇳🇴 **Norwegian (Norway)** (nb-NO)
- 🇵🇱 **Polish (Poland)** (pl-PL)
- 🇵🇹 **Portuguese (Portugal)** (pt-PT)
- 🇺🇦 **Ukrainian (Ukrain)** (uk-UA)
- 🇻🇳 **Vietnamese (Vietnam)** (vi-VN)
- 🇹🇼 **Chinese (Taiwan)** (zh-TW)
- 🇨🇳 **Chinese** (zh-CN)
- 🇨🇳 **Chinese (China)** (zh-CN)
**If you want to contribute and help translating, check the wiki: [How to add languages](https://github.com/seriousm4x/UpSnap/wiki/How-to-add-languages)**
+16 -16
View File
@@ -1,14 +1,14 @@
module github.com/seriousm4x/upsnap
go 1.24.0
go 1.24.1
require (
github.com/mdlayher/wol v0.0.0-20220221231636-b763a792253a
github.com/pocketbase/dbx v1.11.0
github.com/pocketbase/pocketbase v0.29.3
github.com/pocketbase/pocketbase v0.30.0
github.com/prometheus-community/pro-bing v0.7.0
github.com/robfig/cron/v3 v3.0.1
golang.org/x/sys v0.35.0
golang.org/x/sys v0.36.0
)
require (
@@ -17,10 +17,10 @@ require (
github.com/domodwyer/mailyak/v3 v3.6.2 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
github.com/gabriel-vasile/mimetype v1.4.10 // indirect
github.com/ganigeorgiev/fexpr v0.5.0 // indirect
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect
github.com/go-sql-driver/mysql v1.8.1 // indirect
github.com/go-sql-driver/mysql v1.9.3 // indirect
github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/uuid v1.6.0 // indirect
@@ -33,17 +33,17 @@ require (
github.com/mdlayher/socket v0.5.1 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/spf13/cast v1.9.2 // indirect
github.com/spf13/cobra v1.9.1 // indirect
github.com/spf13/pflag v1.0.7 // indirect
github.com/stretchr/testify v1.8.1 // indirect
golang.org/x/crypto v0.41.0 // indirect
golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b // indirect
golang.org/x/image v0.30.0 // indirect
golang.org/x/net v0.43.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/text v0.28.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/cobra v1.10.1 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/stretchr/testify v1.11.1 // indirect
golang.org/x/crypto v0.42.0 // indirect
golang.org/x/exp v0.0.0-20250911091902-df9299821621 // indirect
golang.org/x/image v0.31.0 // indirect
golang.org/x/net v0.44.0 // indirect
golang.org/x/oauth2 v0.31.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/text v0.29.0 // indirect
modernc.org/libc v1.66.3 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect
+35 -40
View File
@@ -17,15 +17,15 @@ github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY=
github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok=
github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0=
github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
github.com/ganigeorgiev/fexpr v0.5.0 h1:XA9JxtTE/Xm+g/JFI6RfZEHSiQlk+1glLvRK1Lpv/Tk=
github.com/ganigeorgiev/fexpr v0.5.0/go.mod h1:RyGiGqmeXhEQ6+mlGdnUleLHgtzzu/VGO2WtJkF5drE=
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es=
github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo=
github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -69,8 +69,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pocketbase/dbx v1.11.0 h1:LpZezioMfT3K4tLrqA55wWFw1EtH1pM4tzSVa7kgszU=
github.com/pocketbase/dbx v1.11.0/go.mod h1:xXRCIAKTHMgUCyCKZm55pUOdvFziJjQfXaWKhu2vhMs=
github.com/pocketbase/pocketbase v0.29.3 h1:Mj8o5awsbVJIdIoTuQNhfC2oL/c4aImQ3RyfFZlzFVg=
github.com/pocketbase/pocketbase v0.29.3/go.mod h1:oGpT67LObxCFK4V2fSL7J9YnPbBnnshOpJ5v3zcneww=
github.com/pocketbase/pocketbase v0.30.0 h1:7v9O3hBYyHyptnnFjdP8tEJIuyHEfjhG6PC4gjf5eoE=
github.com/pocketbase/pocketbase v0.30.0/go.mod h1:gZIwampw4VqMcEdGHwBZgSa54xWIDgVJb4uINUMXLmA=
github.com/prometheus-community/pro-bing v0.7.0 h1:KFYFbxC2f2Fp6c+TyxbCOEarf7rbnzr9Gw8eIb0RfZA=
github.com/prometheus-community/pro-bing v0.7.0/go.mod h1:Moob9dvlY50Bfq6i88xIwfyw7xLFHH69LUgx9n5zqCE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
@@ -80,60 +80,55 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE=
github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b h1:DXr+pvt3nC887026GRP39Ej11UATqWDmWuS99x26cD0=
golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b/go.mod h1:4QTo5u+SEIbbKW1RacMZq1YEfOBqeXa19JeshGi+zc4=
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
golang.org/x/exp v0.0.0-20250911091902-df9299821621 h1:2id6c1/gto0kaHYyrixvknJ8tUK/Qs5IsmBtrc+FtgU=
golang.org/x/exp v0.0.0-20250911091902-df9299821621/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.30.0 h1:jD5RhkmVAnjqaCUXfbGBrn3lpxbknfN9w2UhHHU+5B4=
golang.org/x/image v0.30.0/go.mod h1:SAEUTxCCMWSrJcCy/4HwavEsfZZJlYxeHLc6tTiAe/c=
golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ=
golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc=
golang.org/x/image v0.31.0 h1:mLChjE2MV6g1S7oqbXC0/UcKijjm5fnJLUYKIYrLESA=
golang.org/x/image v0.31.0/go.mod h1:R9ec5Lcp96v9FTF+ajwaH3uGxPH4fKfHHAVbUILxghA=
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo=
golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
modernc.org/cc/v4 v4.26.2 h1:991HMkLjJzYBIfha6ECZdjrIYz2/1ayr+FL8GN+CNzM=
+84
View File
@@ -1,7 +1,9 @@
package pb
import (
"encoding/json"
"encoding/xml"
"fmt"
"net"
"net/http"
"os"
@@ -381,3 +383,85 @@ func asyncCall(e *core.RequestEvent, fn func() *router.ApiError) *router.ApiErro
return nil
}
func HandlerWebsiteManifest(e *core.RequestEvent) error {
scheme := "http"
if e.Request.TLS != nil {
scheme = "https"
}
baseUrl := fmt.Sprintf("%s://%s", scheme, e.Request.Host)
manifest := map[string]any{
"name": "UpSnap",
"short_name": "UpSnap",
"description": "A simple wake on lan web app written with SvelteKit, Go and PocketBase.",
"theme_color": "#55BCD9",
"background_color": "#55BCD9",
"display": "standalone",
"scope": baseUrl,
"start_url": baseUrl,
"icons": []map[string]string{
{
"src": "/icon_192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any",
},
{
"src": "/icon_512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any",
},
{
"src": "/maskable_192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable",
},
{
"src": "/maskable_512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable",
},
{
"src": "/gopher.svg",
"sizes": "any",
"type": "image/svg+xml",
},
},
}
publicSettings, err := e.App.FindFirstRecordByFilter("settings_public", "")
if err != nil {
return writeManifest(e, manifest)
}
// override title if set
if title := publicSettings.GetString("website_title"); title != "" {
manifest["name"] = title
manifest["short_name"] = title
}
// override icons if set
if favicon := publicSettings.GetString("favicon"); favicon != "" {
manifest["icons"] = []map[string]string{
{
"src": fmt.Sprintf("%s/api/files/settings_public/%s/%s", baseUrl, publicSettings.Id, favicon),
"sizes": "any",
"purpose": "any",
},
}
}
return writeManifest(e, manifest)
}
func writeManifest(e *core.RequestEvent, manifest map[string]any) error {
e.Response.Header().Set("Content-Type", "application/manifest+json")
e.Response.Header().Set("Cache-Control", "no-cache, no-store")
enc := json.NewEncoder(e.Response)
return enc.Encode(manifest)
}
+1
View File
@@ -78,6 +78,7 @@ func StartPocketBase(distDirFS fs.FS) {
se.Router.GET("/api/upsnap/scan", HandlerScan).Bind(apis.RequireSuperuserAuth())
se.Router.POST("/api/upsnap/init-superuser", HandlerInitSuperuser) // https://github.com/pocketbase/pocketbase/discussions/6198
se.Router.POST("/api/upsnap/validate-cron", HandlerValidateCron)
se.Router.GET("/api/upsnap/manifest.webmanifest", HandlerWebsiteManifest)
if err := importSettings(app); err != nil {
return err
+13 -13
View File
@@ -16,28 +16,28 @@
},
"devDependencies": {
"@eslint/compat": "^1.3.2",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@inlang/cli": "^3.0.12",
"@inlang/paraglide-js": "2.2.0",
"@inlang/paraglide-js": "2.3.2",
"@sveltejs/adapter-static": "^3.0.9",
"@sveltejs/kit": "^2.36.2",
"@sveltejs/kit": "^2.39.1",
"@sveltejs/vite-plugin-svelte": "^5.1.1",
"daisyui": "^5.0.50",
"eslint": "^9.34.0",
"daisyui": "^5.1.12",
"eslint": "^9.35.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^3.11.0",
"globals": "^16.3.0",
"eslint-plugin-svelte": "^3.12.3",
"globals": "^16.4.0",
"husky": "^9.1.7",
"prettier": "^3.6.2",
"prettier-plugin-svelte": "^3.4.0",
"prettier-plugin-tailwindcss": "^0.6.14",
"svelte": "^5.38.3",
"svelte": "^5.38.10",
"svelte-check": "^4.3.1",
"tailwindcss": "^4.1.12",
"tailwindcss": "^4.1.13",
"tslib": "^2.8.1",
"typescript": "^5.9.2",
"typescript-eslint": "^8.40.0",
"vite": "^6.3.5"
"typescript-eslint": "^8.44.0",
"vite": "^6.3.6"
},
"type": "module",
"lint-staged": {
@@ -46,8 +46,8 @@
},
"dependencies": {
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@tailwindcss/postcss": "^4.1.12",
"cron-parser": "^5.3.0",
"@tailwindcss/postcss": "^4.1.13",
"cron-parser": "^5.4.0",
"date-fns": "^4.1.0",
"pocketbase": "^0.26.2",
"postcss": "^8.5.6",
+400 -397
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -7,6 +7,7 @@
"en-US",
"es-ES",
"fr-FR",
"hi-IN",
"id-ID",
"it-IT",
"ja-JP",
+1 -2
View File
@@ -2,8 +2,7 @@
<html lang="%lang%">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link rel="manifest" href="/manifest.webmanifest" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<script>
const darkTheme = 'dim';
+12 -13
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import { nextCronDate } from '$lib/helpers/cron';
import { m } from '$lib/paraglide/messages';
import { dateFnsLocale } from '$lib/stores/locale';
@@ -19,11 +20,9 @@
import { scale } from 'svelte/transition';
import DeviceCardNic from './DeviceCardNic.svelte';
export let device: Device;
let { device = $bindable() }: { device: Device } = $props();
let modalReboot: HTMLDialogElement;
$: moreButtons = [
let moreButtons = $derived([
{
text: m.device_card_btn_more_sleep(),
icon: faBed,
@@ -45,21 +44,20 @@
{
text: m.device_card_btn_more_edit(),
icon: faPen,
onClick: () => goto(`/device/${device.id}`),
onClick: () => goto(resolve(`/device/${device.id}`)),
requires: $pocketbase.authStore.isSuperuser || $permission.update?.includes(device.id)
}
];
]);
// update device status change
let now = Date.now();
let now = $state(Date.now());
let interval: number;
$: {
$effect(() => {
clearInterval(interval);
interval = setInterval(() => {
// eslint-disable-next-line svelte/infinite-reactive-loop
now = Date.now();
}, 1000);
}
});
function sleep() {
fetch(`${backendUrl}api/upsnap/sleep/${device.id}`, {
@@ -93,6 +91,7 @@
<div class="card bg-base-200 shadow-sm" transition:scale={{ delay: 0, duration: 200 }}>
<div class="card-body p-6">
{#if device.link !== ''}
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
<a href={device.link} target="_blank">
<h1 class="link card-title">{device.name}</h1>
</a>
@@ -103,7 +102,7 @@
<p class="grow-0">{device.description}</p>
{/if}
<div class="card rounded-box w-full">
<DeviceCardNic {device} />
<DeviceCardNic bind:device />
</div>
{#if device.wake_cron_enabled || device.shutdown_cron_enabled || device.password}
<div class="mt-1 flex flex-row flex-wrap gap-2">
@@ -146,7 +145,7 @@
{#each moreButtons as btn, i (i)}
{#if btn.requires}
<div class="tooltip" data-tip={btn.text}>
<button class="btn btn-sm btn-circle" on:click={btn.onClick}>
<button class="btn btn-sm btn-circle" onclick={btn.onClick}>
<Fa icon={btn.icon} />
</button>
</div>
@@ -167,7 +166,7 @@
<div class="modal-action">
<form method="dialog">
<button class="btn">{m.buttons_cancel()}</button>
<button class="btn btn-success" on:click={reboot}>{m.buttons_confirm()}</button>
<button class="btn btn-success" onclick={reboot}>{m.buttons_confirm()}</button>
</form>
</div>
</div>
@@ -6,44 +6,46 @@
import Fa from 'svelte-fa';
import toast from 'svelte-french-toast';
export let device: Device;
let hoverText = '';
let disabled = false;
let timeout = 120;
let { device = $bindable() }: { device: Device } = $props();
let hoverText = $state('');
let disabled = $state(false);
let timeout = $state(120);
let interval: number;
let modalWake: HTMLDialogElement;
let modalShutdown: HTMLDialogElement;
let seconds = $derived(timeout % 60);
let minutes = $derived(Math.floor(timeout / 60));
$: if (device.status === 'pending' && !interval) {
// eslint-disable-next-line svelte/infinite-reactive-loop
countdown(Date.parse(device.updated), 'wake');
}
$: minutes = Math.floor(timeout / 60);
$: seconds = timeout % 60;
$: if (device.status === 'pending' || device.status === '') {
disabled = true;
hoverText = m.device_card_nic_tooltip_pending();
} else if (device.status === 'online') {
if (device.shutdown_cmd === '') {
disabled = true;
hoverText = m.device_card_nic_tooltip_shutdown_no_cmd();
} else if (!$pocketbase.authStore.isSuperuser && !$permission.power?.includes(device.id)) {
disabled = true;
hoverText = m.device_card_nic_tooltip_shutdown_no_permission();
} else {
disabled = false;
hoverText = m.device_card_nic_tooltip_shutdown();
$effect(() => {
if (device.status === 'pending' && !interval) {
countdown(Date.parse(device.updated), 'wake');
}
} else if (device.status === 'offline') {
if (!$pocketbase.authStore.isSuperuser && !$permission.power?.includes(device.id)) {
});
$effect(() => {
if (device.status === 'pending' || device.status === '') {
disabled = true;
hoverText = m.device_card_nic_tooltip_power_no_permission();
} else {
disabled = false;
hoverText = m.device_card_nic_tooltip_power();
hoverText = m.device_card_nic_tooltip_pending();
} else if (device.status === 'online') {
if (device.shutdown_cmd === '') {
disabled = true;
hoverText = m.device_card_nic_tooltip_shutdown_no_cmd();
} else if (!$pocketbase.authStore.isSuperuser && !$permission.power?.includes(device.id)) {
disabled = true;
hoverText = m.device_card_nic_tooltip_shutdown_no_permission();
} else {
disabled = false;
hoverText = m.device_card_nic_tooltip_shutdown();
}
} else if (device.status === 'offline') {
if (!$pocketbase.authStore.isSuperuser && !$permission.power?.includes(device.id)) {
disabled = true;
hoverText = m.device_card_nic_tooltip_power_no_permission();
} else {
disabled = false;
hoverText = m.device_card_nic_tooltip_power();
}
}
}
});
function wake() {
countdown(Date.now(), 'wake');
@@ -114,7 +116,7 @@
if (timeout <= 0 || device.status !== 'pending') {
clearInterval(interval);
// eslint-disable-next-line svelte/infinite-reactive-loop
interval = 0;
}
}, 1000);
@@ -148,8 +150,8 @@
<div
class={`tooltip ${disabled ? 'cursor-not-allowed' : 'hover:bg-base-300 cursor-pointer'} bg-base-100 rounded-box flex items-start gap-4 p-2`}
data-tip={hoverText}
on:click={disabled ? null : handleClick}
on:keydown={disabled ? null : handleClick}
onclick={disabled ? null : handleClick}
onkeydown={disabled ? null : handleClick}
role="none"
>
{#if device.status === 'offline'}
@@ -176,7 +178,9 @@
<div>{device.mac}</div>
<div class="flex flex-wrap gap-x-4">
{#if device?.expand?.ports}
{#each device?.expand?.ports.sort((a, b) => a.number - b.number) as port (port.id)}
{#each $state
.snapshot(device)
.expand?.ports.sort((a, b) => a.number - b.number) as port (port.id)}
<span class="flex items-center gap-1 break-all">
{#if port.status}
<div class="inline-grid *:[grid-area:1/1]">
@@ -190,12 +194,14 @@
</div>
{/if}
{#if port.link}
<!-- eslint-disable svelte/no-navigation-without-resolve -->
<a
href={port.link}
target="_blank"
class="underline"
on:click={(e) => e.stopPropagation()}>{port.name} ({port.number})</a
onclick={(e) => e.stopPropagation()}>{port.name} ({port.number})</a
>
<!-- eslint-enable svelte/no-navigation-without-resolve -->
{:else}
{port.name} ({port.number})
{/if}
@@ -215,7 +221,7 @@
<div class="modal-action">
<form method="dialog">
<button class="btn">{m.buttons_cancel()}</button>
<button class="btn btn-success" on:click={wake}>{m.buttons_confirm()}</button>
<button class="btn btn-success" onclick={wake}>{m.buttons_confirm()}</button>
</form>
</div>
</div>
@@ -230,7 +236,7 @@
<div class="modal-action">
<form method="dialog">
<button class="btn">{m.buttons_cancel()}</button>
<button class="btn btn-success" on:click={shutdown}>{m.buttons_confirm()}</button>
<button class="btn btn-success" onclick={shutdown}>{m.buttons_confirm()}</button>
</form>
</div>
</div>
+18 -11
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import DeviceFormPort from '$lib/components/DeviceFormPort.svelte';
import { nextCronDate, parseCron as validateCron } from '$lib/helpers/cron';
import { m } from '$lib/paraglide/messages';
@@ -68,7 +69,7 @@
.update(device.id, device)
.then(() => {
toast.success(m.toasts_device_updated({ device: device.name }));
goto('/');
goto(resolve('/'));
})
.catch((err) => {
toast.error(err.message);
@@ -84,7 +85,7 @@
.create(device)
.then(() => {
toast.success(m.toasts_device_created({ device: device.name }));
goto('/');
goto(resolve('/'));
})
.catch((err) => {
toast.error(err.message);
@@ -127,7 +128,7 @@
.delete(device.id)
.then(() => {
toast.success(m.toasts_device_deleted({ device: device.name }));
goto('/');
goto(resolve('/'));
})
.catch((err) => {
toast.error(err.message);
@@ -194,7 +195,13 @@
}
</script>
<form on:submit|preventDefault={save}>
<form
onsubmit={(e) => {
e.preventDefault();
save();
}}
class="flex w-full flex-col"
>
<div class="card bg-base-200 w-full shadow-sm">
<div class="card-body">
<h2 class="card-title">{m.device_general()}</h2>
@@ -275,7 +282,7 @@
</div>
<button
class="btn max-w-xs {device.expand.ports.length > 0 ? 'mt-4' : ''}"
on:click={() => createEmptyPort()}
onclick={() => createEmptyPort()}
type="button">{m.device_ports_add_new()}</button
>
</div>
@@ -666,12 +673,12 @@ second (0–59, optional)
<button
class="btn btn-error join-item"
type="button"
on:click={() => deleteGroup(group)}><Fa icon={faX} /></button
onclick={() => deleteGroup(group)}><Fa icon={faX} /></button
>
</div>
<div
class="btn join-item bg-base-100 hover:bg-base-200"
on:click={() => toggleGroup(group.id)}
onclick={() => toggleGroup(group.id)}
role="none"
>
<input
@@ -689,7 +696,7 @@ second (0–59, optional)
class="input join-item"
placeholder={m.device_groups_placeholder()}
type="text"
on:keydown={(e) => {
onkeydown={(e) => {
if (e.key === 'Enter') {
e.preventDefault();
addGroup();
@@ -697,7 +704,7 @@ second (0–59, optional)
}}
bind:value={newGroup}
/>
<button class="btn btn-neutral join-item" type="button" on:click={() => addGroup()}
<button class="btn btn-neutral join-item" type="button" onclick={() => addGroup()}
>{m.buttons_add()}</button
>
</div>
@@ -705,7 +712,7 @@ second (0–59, optional)
</div>
<div class="card-actions mt-6 justify-end gap-4">
{#if $pocketbase.authStore.isSuperuser || $permission.delete?.includes(device.id)}
<button class="btn btn-error" type="button" on:click={() => deleteModal.showModal()}
<button class="btn btn-error" type="button" onclick={() => deleteModal.showModal()}
><Fa icon={faTrash} />{m.buttons_delete()}</button
>
{/if}
@@ -719,7 +726,7 @@ second (0–59, optional)
<div class="modal-action">
<form method="dialog">
<button class="btn">{m.buttons_cancel()}</button>
<button class="btn btn-error" on:click={() => deleteDevice()}>{m.buttons_delete()}</button>
<button class="btn btn-error" onclick={() => deleteDevice()}>{m.buttons_delete()}</button>
</form>
</div>
</div>
@@ -70,7 +70,7 @@
</fieldset>
<button
class="btn btn-error btn-xs btn-soft ms-auto"
on:click={() => deletePort(device.expand.ports[index])}
onclick={() => deletePort(device.expand.ports[index])}
type="button"><Fa icon={faTrash} />{m.buttons_delete()}</button
>
</fieldset>
+25 -21
View File
@@ -1,6 +1,7 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import { asset, resolve } from '$app/paths';
import { page } from '$app/state';
import { m } from '$lib/paraglide/messages';
import { backendUrl, permission, pocketbase } from '$lib/stores/pocketbase';
import { settingsPub } from '$lib/stores/settings';
@@ -73,7 +74,7 @@
await $pocketbase.collection('ports').unsubscribe('*');
await $pocketbase.collection('permissions').unsubscribe('*');
$pocketbase.authStore.clear();
goto('/login', { invalidateAll: true });
goto(resolve('/login'), { invalidateAll: true });
}
</script>
@@ -110,24 +111,24 @@
</div>
{/if}
<li>
<a href="/" class="px-4 py-2" class:active={$page.url.pathname === '/'}
<a href={resolve('/')} class="px-4 py-2" class:active={page.url.pathname === resolve('/')}
><Fa icon={faHome} />{m.home_page_title()}</a
>
</li>
{#if $pocketbase.authStore.isSuperuser}
<li>
<a
href="/users"
href={resolve('/users')}
class="px-4 py-2"
class:active={$page.url.pathname.startsWith('/users')}
class:active={page.url.pathname.startsWith(resolve('/users'))}
><Fa icon={faUsersGear} />{m.users_page_title()}</a
>
</li>
<li>
<a
href="/settings/"
href={resolve('/settings/')}
class="px-4 py-2"
class:active={$page.url.pathname.startsWith('/settings')}
class:active={page.url.pathname.startsWith(resolve('/settings'))}
><Fa icon={faCog} />{m.settings_page_title()}</a
>
</li>
@@ -145,8 +146,8 @@
<button
class="gap-3 px-2"
data-set-theme={theme}
on:click={() => (activeTheme = theme)}
on:keydown={() => (activeTheme = theme)}
onclick={() => (activeTheme = theme)}
onkeydown={() => (activeTheme = theme)}
>
<div
data-theme={theme}
@@ -168,11 +169,11 @@
</li>
</ul>
</div>
<a class="btn btn-ghost h-full border-0 px-2 text-xl" href="/">
<a class="btn btn-ghost h-full border-0 px-2 text-xl" href={resolve('/')}>
<img
src={$settingsPub?.id && $settingsPub?.favicon
? `${backendUrl}api/files/settings_public/${$settingsPub?.id}/${$settingsPub?.favicon}`
: '/gopher.svg'}
: asset('/gopher.svg')}
alt={$settingsPub?.website_title ? $settingsPub?.website_title : 'UpSnap'}
width="45"
height="45"
@@ -185,21 +186,24 @@
{/if}
<ul class="menu menu-horizontal h-full gap-1 px-1">
<li class="h-full">
<a href="/" class="p-2" class:menu-active={$page.url.pathname === '/'}
<a href={resolve('/')} class="p-2" class:menu-active={page.url.pathname === resolve('/')}
><Fa icon={faHome} />{m.home_page_title()}</a
>
</li>
{#if $pocketbase.authStore.isSuperuser}
<li class="h-full">
<a href="/users" class="p-2" class:menu-active={$page.url.pathname.startsWith('/users')}
<a
href={resolve('/users')}
class="p-2"
class:menu-active={page.url.pathname.startsWith(resolve('/users'))}
><Fa icon={faUsersGear} />{m.users_page_title()}</a
>
</li>
<li class="h-full">
<a
href="/settings/"
href={resolve('/settings/')}
class="p-2"
class:menu-active={$page.url.pathname.startsWith('/settings')}
class:menu-active={page.url.pathname.startsWith(resolve('/settings'))}
><Fa icon={faCog} />{m.settings_page_title()}</a
>
</li>
@@ -217,8 +221,8 @@
<button
class="gap-3 px-2"
data-set-theme={theme}
on:click={() => (activeTheme = theme)}
on:keydown={() => (activeTheme = theme)}
onclick={() => (activeTheme = theme)}
onkeydown={() => (activeTheme = theme)}
>
<div
data-theme={theme}
@@ -242,7 +246,7 @@
<div class="ms-auto justify-end">
{#if $pocketbase.authStore?.record !== null}
{#if $pocketbase.authStore.isSuperuser || $permission.create}
<a class="btn btn-success me-4" href="/device/new">
<a class="btn btn-success me-4" href={resolve('/device/new')}>
<Fa icon={faPlus} />
{m.navbar_new()}
</a>
@@ -250,7 +254,7 @@
<div class="dropdown dropdown-end">
<label tabindex="-1" class="avatar btn btn-circle btn-ghost" for="avatar">
<div class="w-10 rounded-full" id="avatar">
<img src="/avatars/avatar{avatar}.svg" alt="Avatar {avatar}" />
<img src={asset(`/avatars/avatar${avatar}.svg`)} alt="Avatar {avatar}" />
</div>
</label>
<ul
@@ -263,10 +267,10 @@
: $pocketbase.authStore.record?.username}
</li>
<li>
<a href="/account"><Fa icon={faUserGear} />{m.navbar_edit_account()}</a>
<a href={resolve('/account')}><Fa icon={faUserGear} />{m.navbar_edit_account()}</a>
</li>
<li>
<div on:click={async () => logout()} on:keydown={async () => logout()} role="none">
<div onclick={async () => logout()} onkeydown={async () => logout()} role="none">
<Fa icon={faDoorOpen} />{m.navbar_logout()}
</div>
</li>
+13 -7
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import PageLoading from '$lib/components/PageLoading.svelte';
import { m } from '$lib/paraglide/messages';
import { localeStore } from '$lib/stores/locale';
@@ -113,7 +114,7 @@
})
);
toast.success(m.toasts_devices_created_multiple({ count: count }));
goto('/');
goto(resolve('/'));
}
</script>
@@ -125,7 +126,12 @@
{m.device_network_scan_desc()}
</p>
<div class="flex flex-row flex-wrap items-end gap-4">
<form on:submit|preventDefault={saveSettings}>
<form
onsubmit={(e) => {
e.preventDefault();
saveSettings();
}}
>
<fieldset class="fieldset p-0">
<label class="floating-label mt-2">
<span>{m.device_network_scan_ip_range()}</span>
@@ -160,7 +166,7 @@
{m.device_network_scan_running()}
</button>
{:else}
<button class="btn btn-success" on:click={() => scan()}>
<button class="btn btn-success" onclick={() => scan()}>
<Fa icon={faMagnifyingGlass} />
{m.device_network_scan()}
</button>
@@ -197,7 +203,7 @@
<div class="ms-auto">
<button
class="btn btn-success btn-sm"
on:click={(e) => {
onclick={(e) => {
addSingle(device);
e.currentTarget.disabled = true;
}}><Fa icon={faPlus} />{m.buttons_add()}</button
@@ -240,7 +246,7 @@
{#if addAllCheckbox}
<button
class="btn btn-success"
on:click={() => addAll()}
onclick={() => addAll()}
disabled={scanResponse.devices.length === 0}
>
<Fa icon={faPlus} />
@@ -249,7 +255,7 @@
{:else}
<button
class="btn btn-success"
on:click={() => addAll()}
onclick={() => addAll()}
disabled={scanResponse.devices.filter((dev) => dev.name !== 'Unknown').length === 0}
>
<Fa icon={faPlus} />
@@ -263,7 +269,7 @@
<div class="max-w-fit">
<button
class="btn btn-success"
on:click={() => addAll()}
onclick={() => addAll()}
disabled={scanResponse.devices.length === 0}
>
<Fa icon={faPlus} />
+5 -1
View File
@@ -1,11 +1,12 @@
import { getLocale } from '$lib/paraglide/runtime';
import type { Locale } from 'date-fns';
import { id } from 'date-fns/locale';
import { bg } from 'date-fns/locale/bg';
import { de } from 'date-fns/locale/de';
import { enUS } from 'date-fns/locale/en-US';
import { es } from 'date-fns/locale/es';
import { fr } from 'date-fns/locale/fr';
import { hi } from 'date-fns/locale/hi';
import { id } from 'date-fns/locale/id';
import { it } from 'date-fns/locale/it';
import { ja } from 'date-fns/locale/ja';
import { ko } from 'date-fns/locale/ko';
@@ -40,6 +41,9 @@ localeStore.subscribe((l: string) => {
case 'fr-FR':
dateFnsLocale.set(fr);
break;
case 'hi-IN':
dateFnsLocale.set(hi);
break;
case 'id-ID':
dateFnsLocale.set(id);
break;
+2 -1
View File
@@ -1,9 +1,10 @@
import { resolve } from '$app/paths';
import type { Permission } from '$lib/types/permission';
import PocketBase from 'pocketbase';
import { writable } from 'svelte/store';
// set backend url based on environment
export const backendUrl = import.meta.env.DEV ? 'http://127.0.0.1:8090/' : '/';
export const backendUrl = import.meta.env.DEV ? 'http://127.0.0.1:8090/' : resolve('/');
// connect to backend
const pb = new PocketBase(backendUrl);
+7 -12
View File
@@ -1,10 +1,10 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { asset, resolve } from '$app/paths';
import { page } from '$app/state';
import Navbar from '$lib/components/Navbar.svelte';
import Transition from '$lib/components/Transition.svelte';
import { m } from '$lib/paraglide/messages.js';
import { locales, localizeHref } from '$lib/paraglide/runtime';
import { backendUrl, permission, pocketbase } from '$lib/stores/pocketbase';
import { settingsPub } from '$lib/stores/settings';
import type { Permission } from '$lib/types/permission';
@@ -50,7 +50,7 @@
// redirect to welcome page if setup is not completed
if ($settingsPub.setup_completed === false && page.url.pathname !== '/welcome') {
$pocketbase.authStore.clear();
goto('/welcome');
goto(resolve('/welcome'));
return;
}
@@ -64,7 +64,7 @@
const status = err?.status << 0;
if (status == 401 || status == 403) {
$pocketbase.authStore.clear();
goto('/login');
goto(resolve('/login'));
} else {
console.log('NOT CLEARED');
}
@@ -78,7 +78,7 @@
const status = err?.status << 0;
if (status == 401 || status == 403) {
$pocketbase.authStore.clear();
goto('/login');
goto(resolve('/login'));
}
});
}
@@ -86,11 +86,12 @@
</script>
<svelte:head>
<link rel="manifest" href={backendUrl + 'api/upsnap/manifest.webmanifest'} />
<link
rel="shortcut icon"
href={$settingsPub?.id && $settingsPub?.favicon
? `${backendUrl}api/files/settings_public/${$settingsPub?.id}/${$settingsPub?.favicon}`
: '/gopher.svg'}
: asset('/gopher.svg')}
/>
{#if $settingsPub === undefined}
<title>UpSnap</title>
@@ -99,7 +100,7 @@
{/if}
</svelte:head>
{#if authIsValid && !page.url.pathname.startsWith('/welcome')}
{#if authIsValid && !page.url.pathname.startsWith(resolve('/welcome'))}
<Navbar />
{/if}
@@ -110,9 +111,3 @@
<slot />
</div>
</Transition>
<div class="hidden">
{#each locales as locale (locale)}
<a href={localizeHref(page.url.pathname, { locale })}>{locale}</a>
{/each}
</div>
+77 -53
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { browser } from '$app/environment';
import { resolve } from '$app/paths';
import DeviceCard from '$lib/components/DeviceCard.svelte';
import PageLoading from '$lib/components/PageLoading.svelte';
import { m } from '$lib/paraglide/messages';
@@ -17,13 +18,20 @@
import Fa from 'svelte-fa';
import toast from 'svelte-french-toast';
let loading = true;
let devices: Device[] = [];
let orderBy: 'name' | 'ip' = 'name';
let orderExpanded = false;
let orderByGroups = true;
let searchQuery = '';
let searchInput: HTMLInputElement;
let loading = $state(true);
let devices: Device[] = $state([]);
let orderBy: 'name' | 'ip' = $state('name');
let orderExpanded = $state(false);
let orderByGroups = $state(true);
let searchQuery = $state('');
let searchInput: HTMLInputElement | undefined = $state();
let filteredDevices: Device[] = $derived([]);
let devicesWithoutGroups: Device[] = $derived([]);
let devicesWithGroup: {
group: Group | null;
devices: Device[];
}[] = $derived([]);
const isMac = /Mac|iPhone|iPad/.test(navigator.userAgent);
const gridClass = 'grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-4';
@@ -35,36 +43,47 @@
orderByGroups = localStorage.getItem('orderByGroups') !== 'false';
}
$: if (browser) {
localStorage.setItem('orderBy', orderBy);
}
$: if (browser) {
localStorage.setItem('orderByGroups', String(orderByGroups));
}
$: filteredDevices = devices.filter(
(dev) =>
dev.ip.includes(searchQuery.toLowerCase()) ||
dev.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
dev.mac.toLowerCase().includes(searchQuery.toLowerCase()) ||
dev.description.toLowerCase().includes(searchQuery.toLowerCase())
);
function devicesWithoutGroups() {
return filteredDevices.filter((dev) => dev.groups.length === 0);
}
function devicesWithGroup() {
return filteredDevices.reduce(
(groups, dev) => {
dev.expand?.groups?.forEach((group: Group) => {
groups[group.id] = [...(groups[group.id] || []), dev];
});
return groups;
},
{} as Record<string, Device[]>
$effect(() => {
if (browser) {
localStorage.setItem('orderBy', orderBy);
}
});
$effect(() => {
if (browser) {
localStorage.setItem('orderByGroups', String(orderByGroups));
}
});
$effect(() => {
filteredDevices = devices.filter(
(dev) =>
dev.ip.includes(searchQuery.toLowerCase()) ||
dev.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
dev.mac.toLowerCase().includes(searchQuery.toLowerCase()) ||
dev.description.toLowerCase().includes(searchQuery.toLowerCase())
);
}
});
$effect(() => {
devicesWithoutGroups = filteredDevices
.filter((dev) => dev.groups.length === 0)
.sort((a, b) => a[orderBy].localeCompare(b[orderBy], $localeStore, { numeric: true }));
});
$effect(() => {
const groups: Record<string, { group: Group; devices: Device[] }> = {};
filteredDevices.forEach((dev) => {
if (dev.expand?.groups?.length) {
for (const g of dev.expand.groups) {
if (!groups[g.id]) groups[g.id] = { group: g, devices: [] };
groups[g.id].devices.push(dev);
}
}
});
devicesWithGroup = Object.values(groups).map((g) => ({
group: g.group,
devices: g.devices.sort((a, b) =>
a[orderBy].localeCompare(b[orderBy], $localeStore, { numeric: true })
)
}));
});
function getAllDevices() {
$pocketbase
@@ -78,7 +97,7 @@
function handleShortcut(event: KeyboardEvent) {
if ((event.ctrlKey || event.metaKey) && event.key === 'k') {
event.preventDefault();
searchInput.focus();
searchInput?.focus();
}
}
@@ -102,7 +121,7 @@
});
</script>
<svelte:document on:keydown={handleShortcut} />
<svelte:document onkeydown={handleShortcut} />
{#if loading}
<PageLoading />
@@ -131,7 +150,7 @@
</label>
<div class="join ms-auto">
{#if orderExpanded}
<button class="btn join-item !outline-0" on:click={() => (orderByGroups = !orderByGroups)}>
<button class="btn join-item !outline-0" onclick={() => (orderByGroups = !orderByGroups)}>
{m.home_order_groups()}
<input type="checkbox" class="checkbox" checked={orderByGroups} />
</button>
@@ -155,43 +174,46 @@
<button
class="btn join-item tooltip {orderExpanded ? '' : 'rounded-field'}"
data-tip={m.home_order_tooltip()}
on:click={() => (orderExpanded = !orderExpanded)}
onclick={() => (orderExpanded = !orderExpanded)}
>
<Fa icon={orderExpanded ? faChevronCircleRight : faChevronCircleLeft} size="lg" />
</button>
</div>
</div>
{#if orderByGroups}
<div class="space-y-6">
{#if devicesWithoutGroups().length > 0}
{#if devicesWithoutGroups.length > 0}
<div class={gridClass}>
{#each devicesWithoutGroups().sort( (a, b) => a[orderBy].localeCompare( b[orderBy], $localeStore, { numeric: true } ) ) as device (device.id)}
<DeviceCard {device} />
{#each devicesWithoutGroups as device, i (device.id)}
<DeviceCard bind:device={devicesWithoutGroups[i]} />
{/each}
</div>
{/if}
{#each Object.entries(devicesWithGroup()).sort( ([a], [b]) => a.localeCompare( b, $localeStore, { numeric: true } ) ) as [group, groupDevices], i (i)}
{#each devicesWithGroup.sort( (a, b) => (a.group?.name ?? '').localeCompare( b.group?.name ?? '', $localeStore, { numeric: true } ) ) as { group, devices } (group?.id)}
<div>
<h1 class="mb-3 text-2xl font-bold">
{groupDevices[0].expand.groups.find((grp) => grp.id === group)?.name ||
'Unknown group name'}
<button class="btn btn-sm btn-success btn-soft" on:click={() => wakeGroup(group)}
{group?.name ?? 'Unknown group name'}
<button
class="btn btn-sm btn-success btn-soft"
onclick={() => wakeGroup(group?.id ?? '')}
><Fa icon={faPowerOff} /> {m.home_wake_group()}</button
>
</h1>
<div class={gridClass}>
{#each groupDevices.sort( (a, b) => a[orderBy].localeCompare( b[orderBy], $localeStore, { numeric: true } ) ) as device (device.id)}
<DeviceCard {device} />
{#each devices as device, i (device.id)}
<DeviceCard bind:device={devices[i]} />
{/each}
</div>
</div>
{/each}
</div>
{:else}
{@const sorted = $state
.snapshot(filteredDevices)
.sort((a, b) => a[orderBy].localeCompare(b[orderBy], $localeStore, { numeric: true }))}
<div class={gridClass}>
{#each structuredClone(filteredDevices).sort( (a, b) => a[orderBy].localeCompare( b[orderBy], $localeStore, { numeric: true } ) ) as device (device.id)}
<DeviceCard {device} />
{#each sorted as device, i (device.id)}
<DeviceCard bind:device={sorted[i]} />
{/each}
</div>
{/if}
@@ -204,7 +226,9 @@
<h3 class="font-bold">{m.home_no_devices()}</h3>
<div class="text-xs">{m.home_add_first_device()}</div>
</div>
<a href="/device/new" class="btn btn-sm"><Fa icon={faPlus} />{m.home_add_first_device()}</a>
<a href={resolve('/device/new')} class="btn btn-sm"
><Fa icon={faPlus} />{m.home_add_first_device()}</a
>
{:else}
<span>
{m.home_grant_permissions()}
+39 -22
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { asset, resolve } from '$app/paths';
import { m } from '$lib/paraglide/messages';
import type { Locale } from '$lib/paraglide/runtime';
import { getLocale, locales, setLocale } from '$lib/paraglide/runtime';
@@ -10,9 +11,8 @@
import Fa from 'svelte-fa';
import toast from 'svelte-french-toast';
let newAvatar: number;
let selectedLang: Locale;
let newAvatar: number | undefined = $state();
let selectedLang: Locale = $state('en-US' as Locale);
// locales
const languageEmojis = {
@@ -21,36 +21,43 @@
'en-US': '🇺🇸',
'es-ES': '🇪🇸',
'fr-FR': '🇫🇷',
'hi-IN': '🇮🇳',
'id-ID': '🇮🇩',
'it-IT': '🇮🇹',
'ja-JP': '🇯🇵',
'ko-KR': '🇰🇷',
'nl-NL': '🇳🇱',
'nb-NO': '🇳🇴',
'nl-NL': '🇳🇱',
'pl-PL': '🇵🇱',
'pt-PT': '🇵🇹',
'uk-UA': '🇺🇦',
'vi-VN': '🇻🇳',
'zh-TW': '🇹🇼',
'zh-CN': '🇨🇳'
'zh-CN': '🇨🇳',
'zh-TW': '🇹🇼'
};
// password change
let newPassword = {
let newPassword = $state({
old: '',
password: '',
confirm: ''
};
$: adminBody = JSON.stringify({
password: newPassword.password,
passwordConfirm: newPassword.confirm
});
$: userBody = JSON.stringify({
oldPassword: newPassword.old,
password: newPassword.password,
passwordConfirm: newPassword.confirm
});
let adminBody: string;
let userBody: string;
$effect(() => {
adminBody = JSON.stringify({
password: newPassword.password,
passwordConfirm: newPassword.confirm
});
});
$effect(() => {
userBody = JSON.stringify({
oldPassword: newPassword.old,
password: newPassword.password,
passwordConfirm: newPassword.confirm
});
});
onMount(() => {
selectedLang = getLocale();
});
@@ -105,7 +112,7 @@
if (data.ok) {
toast.success(m.toasts_password_changed());
$pocketbase.authStore.clear();
goto('/login');
goto(resolve('/login'));
} else {
const j = await data.json();
if (j?.data?.password?.message) {
@@ -138,7 +145,7 @@
<div class="w-16 rounded-full">
{#if $pocketbase.authStore.record?.id}
<img
src="/avatars/avatar{newAvatar ?? $pocketbase.authStore.record?.avatar}.svg"
src={asset(`/avatars/avatar${newAvatar ?? $pocketbase.authStore.record?.avatar}.svg`)}
alt="Avatar {newAvatar ?? $pocketbase.authStore.record?.avatar}"
/>
{/if}
@@ -157,7 +164,12 @@
</h3>
</div>
</div>
<form on:submit|preventDefault={saveUser}>
<form
onsubmit={(e) => {
e.preventDefault();
saveUser();
}}
>
<h2 class="card-title mt-4 mb-2">{m.account_avatar_title()}</h2>
<div class="flex flex-row flex-wrap gap-4">
{#each [...Array(10).keys()] as i (i)}
@@ -176,11 +188,11 @@
class:ring-offset-2={newAvatar !== undefined
? i === newAvatar
: i === $pocketbase.authStore.record?.avatar}
on:click={() => (newAvatar = i)}
onclick={() => (newAvatar = i)}
role="none"
>
{#if $pocketbase.authStore.record?.id}
<img src="/avatars/avatar{i}.svg" alt="{m.account_avatar_title()} {i}" />
<img src={asset(`/avatars/avatar${i}.svg`)} alt="{m.account_avatar_title()} {i}" />
{/if}
</div>
</div>
@@ -207,7 +219,12 @@
<div class="card-body">
<h2 class="card-title">{m.account_change_password_title()}</h2>
<p>{m.account_change_password_body()}</p>
<form on:submit|preventDefault={changePassword}>
<form
onsubmit={(e) => {
e.preventDefault();
changePassword();
}}
>
<div class="w-full max-w-xs">
{#if !$pocketbase.authStore.isSuperuser}
<fieldset class="fieldset">
+16 -11
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import { page } from '$app/state';
import DeviceForm from '$lib/components/DeviceForm.svelte';
import PageLoading from '$lib/components/PageLoading.svelte';
@@ -8,27 +9,31 @@
import type { Device, Group, Port } from '$lib/types/device';
import toast from 'svelte-french-toast';
$: if (Object.hasOwn($permission, 'update')) {
if (!$pocketbase.authStore.isSuperuser && !$permission.update.includes(page.params.id)) {
toast(m.toasts_no_permission({ url: page.url.pathname }), {
icon: '⛔'
});
goto('/');
$effect(() => {
if (Object.hasOwn($permission, 'update')) {
const id = page.params.id;
if (!$pocketbase.authStore.isSuperuser && !$permission.update.includes(id || '')) {
toast(m.toasts_no_permission({ url: page.url.pathname }), {
icon: '⛔'
});
goto(resolve('/'));
}
}
}
});
async function getDevice(): Promise<Device> {
const resp = await $pocketbase
.collection('devices')
.getOne(page.params.id, { expand: 'ports,groups' });
const id = page.params.id;
if (!id) throw new Error('No device ID provided');
const resp = await $pocketbase.collection('devices').getOne(id, { expand: 'ports,groups' });
let device = resp as Device;
if (!device.expand)
if (!device.expand) {
device.expand = {} as {
ports: Port[];
groups: Group[];
};
}
if (!device.expand.ports) {
device.expand.ports = [] as Port[];
+13 -10
View File
@@ -1,6 +1,7 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import { resolve } from '$app/paths';
import { page } from '$app/state';
import DeviceForm from '$lib/components/DeviceForm.svelte';
import NetworkScan from '$lib/components/NetworkScan.svelte';
import { m } from '$lib/paraglide/messages';
@@ -43,15 +44,18 @@
sol_password: '',
sol_port: 0
} as Device;
let activeTab = $state('manual');
$: if (Object.hasOwn($permission, 'create')) {
if (!$pocketbase.authStore.isSuperuser && !$permission.create) {
toast(m.toasts_no_permission({ url: $page.url.pathname }), {
icon: '⛔'
});
goto('/');
$effect(() => {
if (Object.hasOwn($permission, 'create')) {
if (!$pocketbase.authStore.isSuperuser && !$permission.create) {
toast(m.toasts_no_permission({ url: page.url.pathname }), {
icon: '⛔'
});
goto(resolve('/'));
}
}
}
});
let tabs = [
{
@@ -67,7 +71,6 @@
show: $pocketbase.authStore.isSuperuser
}
];
let activeTab = 'manual';
</script>
<h1 class="mb-8 text-3xl font-bold">{m.device_page_title()}</h1>
@@ -76,7 +79,7 @@
{#each tabs as tab (tab)}
{#if tab.show}
<li>
<button class:menu-active={activeTab === tab.name} on:click={() => (activeTab = tab.name)}
<button class:menu-active={activeTab === tab.name} onclick={() => (activeTab = tab.name)}
>{tab.ll_name} <Fa icon={tab.icon} class="ms-2" /></button
>
</li>
+15 -8
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import { toggleVisibility } from '$lib/helpers/forms';
import { m } from '$lib/paraglide/messages';
import { backendUrl, pocketbase } from '$lib/stores/pocketbase';
@@ -18,7 +19,7 @@
onMount(() => {
if ($pocketbase.authStore.isValid) {
goto('/');
goto(resolve('/'));
}
});
@@ -27,14 +28,14 @@
.collection('_superusers')
.authWithPassword(form.email, form.password)
.then(() => {
goto('/');
goto(resolve('/'));
})
.catch(() => {
$pocketbase
.collection('users')
.authWithPassword(form.email, form.password)
.then(() => {
goto('/');
goto(resolve('/'));
})
.catch((err) => {
toast.error(err.message);
@@ -47,7 +48,7 @@
.collection('users')
.authWithOAuth2({ provider: provider.name })
.then(() => {
goto('/');
goto(resolve('/'));
})
.catch((err) => {
console.log(err);
@@ -73,7 +74,13 @@
</figure>
<h2 class="card-title">{m.login_welcome()}</h2>
</div>
<form class="w-full" on:submit|preventDefault={tryAdminThenUser}>
<form
class="w-full"
onsubmit={(e) => {
e.preventDefault();
tryAdminThenUser();
}}
>
<label class="label" for="email">
<span>{m.login_email_label()}</span>
</label>
@@ -85,8 +92,8 @@
<div
class="absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer"
role="none"
on:click={() => toggleVisibility(inputPassword)}
on:keydown={() => toggleVisibility(inputPassword)}
onclick={() => toggleVisibility(inputPassword)}
onkeydown={() => toggleVisibility(inputPassword)}
>
<Fa icon={faEye} />
</div>
@@ -118,7 +125,7 @@
{#if authMethods.oauth2.enabled && authMethods.oauth2.providers.length > 0}
{#each authMethods.oauth2.providers as provider (provider)}
<li>
<button type="button" on:click={() => loginWithProvider(provider)}
<button type="button" onclick={() => loginWithProvider(provider)}
>{provider.displayName}</button
>
</li>
+31 -15
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { asset, resolve } from '$app/paths';
import { page } from '$app/state';
import { PUBLIC_VERSION } from '$env/static/public';
import PageLoading from '$lib/components/PageLoading.svelte';
@@ -14,17 +15,17 @@
import Fa from 'svelte-fa';
import toast from 'svelte-french-toast';
let settingsPubClone: SettingsPublic | undefined;
let settingsPrivClone: SettingsPrivate | undefined;
let faviconPreview: HTMLImageElement;
let faviconInputElement: HTMLInputElement;
let settingsPubClone: SettingsPublic | undefined = $state();
let settingsPrivClone: SettingsPrivate | undefined = $state();
let faviconPreview: HTMLImageElement | undefined = $state();
let faviconInputElement: HTMLInputElement | undefined = $state();
onMount(() => {
if (!$pocketbase.authStore.isSuperuser) {
toast(m.toasts_no_permission({ url: page.url.pathname }), {
icon: '⛔'
});
goto('/');
goto(resolve('/'));
return;
}
@@ -46,10 +47,9 @@
});
function resetFavicon() {
if (settingsPubClone === undefined) return;
settingsPubClone.favicon = '';
faviconInputElement.value = '';
faviconPreview.src = '/gopher.svg';
if (settingsPubClone) settingsPubClone.favicon = '';
if (faviconInputElement) faviconInputElement.value = '';
if (faviconPreview) faviconPreview.src = '/gopher.svg';
}
async function save() {
@@ -72,9 +72,19 @@
throw new Error('ping_interval not valid');
}
// If favicon is empty and no new file is selected, don't send the favicon field at all
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const payload: any = { ...settingsPubClone };
if (
!payload.favicon &&
(!faviconInputElement.files || faviconInputElement.files.length === 0)
) {
delete payload.favicon;
}
await $pocketbase
.collection('settings_public')
.update(settingsPubClone.id, settingsPubClone)
.update(settingsPubClone.id, payload)
.then((res) => {
settingsPub.set(res as SettingsPublic);
})
@@ -95,7 +105,7 @@
.then((res) => {
toast.success(m.toasts_settings_saved());
settingsPriv.set(res as SettingsPrivate);
goto('/');
goto(resolve('/'));
})
.catch((err) => {
toast.error(err.message);
@@ -107,7 +117,13 @@
<PageLoading />
{:else}
<h1 class="mb-8 text-3xl font-bold">{m.settings_page_title()}</h1>
<form on:submit|preventDefault={save}>
<form
onsubmit={(e) => {
e.preventDefault();
save();
}}
class="flex w-full flex-col"
>
<div class="card bg-base-200 mt-6 w-full shadow-sm">
<div class="card-body">
<h2 class="card-title">{m.settings_ping_interval_title()}</h2>
@@ -187,7 +203,7 @@ second (0–59, optional)
class="h-36"
src={$settingsPub.favicon !== ''
? `${backendUrl}api/files/settings_public/${$settingsPub.id}/${$settingsPub.favicon}`
: '/gopher.svg'}
: asset('/gopher.svg')}
alt="Favicon preview"
bind:this={faviconPreview}
/>
@@ -201,8 +217,8 @@ second (0–59, optional)
/>
<button
class="btn btn-error"
on:click={() => resetFavicon()}
on:keydown={() => resetFavicon()}>{m.buttons_reset()}</button
onclick={() => resetFavicon()}
onkeydown={() => resetFavicon()}>{m.buttons_reset()}</button
>
</div>
</div>
+39 -26
View File
@@ -1,6 +1,7 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import { asset, resolve } from '$app/paths';
import { page } from '$app/state';
import PageLoading from '$lib/components/PageLoading.svelte';
import { m } from '$lib/paraglide/messages';
import { pocketbase } from '$lib/stores/pocketbase';
@@ -12,32 +13,34 @@
import Fa from 'svelte-fa';
import toast from 'svelte-french-toast';
let getUsersPromise = getUsers();
let getPermissionsPromise = getPermissions();
let getDevicesPromise = getDevices();
let deleteModal = [] as HTMLDialogElement[];
let getUsersPromise = $state(getUsers());
let getPermissionsPromise = $state(getPermissions());
let getDevicesPromise = $state(getDevices());
let deleteModal = $state([] as HTMLDialogElement[]);
let users = [] as User[];
let permissions = [] as Permission[];
let devices = [] as Device[];
let newUser = {
let users = $state([] as User[]);
let permissions = $state([] as Permission[]);
let devices = $state([] as Device[]);
let newUser = $state({
username: '',
password: '',
passwordConfirm: ''
};
});
$: users.map((user) => {
if (!permissions.find((perm) => perm.user === user.id)) {
permissions = [...permissions, { user: user.id } as Permission];
}
$effect(() => {
users.map((user) => {
if (!permissions.find((perm) => perm.user === user.id)) {
permissions = [...permissions, { user: user.id } as Permission];
}
});
});
onMount(() => {
if (!$pocketbase.authStore.isSuperuser) {
toast(m.toasts_no_permission({ url: $page.url.pathname }), {
toast(m.toasts_no_permission({ url: page.url.pathname }), {
icon: '⛔'
});
goto('/');
goto(resolve('/'));
return;
}
});
@@ -183,13 +186,18 @@
{:then}
<h1 class="mb-8 text-3xl font-bold">{m.users_page_title()}</h1>
{#each users as user, index (user.id)}
<form on:submit|preventDefault={() => save(user)}>
<form
onsubmit={(e) => {
e.preventDefault();
save(user);
}}
>
<div class="card bg-base-200 mt-6 w-full shadow-sm">
<div class="card-body gap-4">
<h2 class="card-title">
<label tabindex="-1" class="avatar" for="avatar{index}">
<div class="w-10 rounded-full" id="avatar{index}">
<img src="/avatars/avatar{user.avatar}.svg" alt="Avatar {user.avatar}" />
<img src={asset(`/avatars/avatar${user.avatar}.svg`)} alt="Avatar {user.avatar}" />
</div>
</label>
{user.username}
@@ -209,7 +217,7 @@
{#if devices.length === 0}
<p>
{m.home_no_devices()}
<a href="/device/new" class="link">{m.users_create_new_device()}</a>
<a href={resolve('/device/new')} class="link">{m.users_create_new_device()}</a>
</p>
{:else}
<div class="grid grid-cols-4 justify-items-center gap-4 md:grid-cols-5">
@@ -255,7 +263,7 @@
<button
class="btn btn-sm md:col-start-2"
type="button"
on:click={() => {
onclick={() => {
toggleAllPermissions(user, 'read');
}}
><span class="hidden md:block">{m.users_toggle()}</span><Fa
@@ -266,7 +274,7 @@
<button
class=" btn btn-sm"
type="button"
on:click={() => {
onclick={() => {
toggleAllPermissions(user, 'update');
}}
><span class="hidden md:block">{m.users_toggle()}</span><Fa
@@ -277,7 +285,7 @@
<button
class=" btn btn-sm"
type="button"
on:click={() => {
onclick={() => {
toggleAllPermissions(user, 'delete');
}}
><span class="hidden md:block">{m.users_toggle()}</span><Fa
@@ -288,7 +296,7 @@
<button
class=" btn btn-sm"
type="button"
on:click={() => {
onclick={() => {
toggleAllPermissions(user, 'power');
}}
><span class="hidden md:block">{m.users_toggle()}</span><Fa
@@ -305,7 +313,7 @@
<button
class="btn btn-error join-item"
type="button"
on:click={() => deleteModal[index].showModal()}
onclick={() => deleteModal[index].showModal()}
><Fa icon={faTrash} />{m.buttons_delete()}</button
>
<button class="btn btn-success join-item" type="submit"
@@ -322,7 +330,7 @@
<div class="modal-action">
<form method="dialog">
<button class="btn">{m.buttons_cancel()}</button>
<button class="btn btn-error" on:click={() => deleteUser(user)}
<button class="btn btn-error" onclick={() => deleteUser(user)}
>{m.buttons_delete()}</button
>
</form>
@@ -333,7 +341,12 @@
<div class="card bg-base-200 mt-6 w-full shadow-sm">
<div class="card-body">
<h2 class="card-title">{m.users_create_new_user()}</h2>
<form on:submit|preventDefault={createUser}>
<form
onsubmit={(e) => {
e.preventDefault();
createUser();
}}
>
<div class="flex flex-row flex-wrap gap-4">
<div class="w-full max-w-xs">
<label class="label" for="username">
+19 -12
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { asset, resolve } from '$app/paths';
import { toggleVisibility } from '$lib/helpers/forms';
import { m } from '$lib/paraglide/messages.js';
import { pocketbase } from '$lib/stores/pocketbase';
@@ -71,23 +72,23 @@
<div class="my-4 flex w-screen max-w-lg flex-col gap-16">
<div class="card bg-base-200 shadow-sm">
{#if stepsCompleted === 0 && $settingsPub?.setup_completed}
<figure class="mx-auto w-72 pt-6"><img src="/gopher.svg" alt="Gopher" /></figure>
<figure class="mx-auto w-72 pt-6"><img src={asset('/gopher.svg')} alt="Gopher" /></figure>
<div class="card-body">
<h2 class="card-title">{m.welcome_not_expected_title()}</h2>
<p>{m.welcome_not_expected_desc()}</p>
<div class="card-actions justify-end">
<button class="btn btn-success" on:click={() => goto('/')}
<button class="btn btn-success" onclick={() => goto(resolve('/'))}
>{m.welcome_not_expected_back()}</button
>
</div>
</div>
{:else if stepsCompleted === 0}
<figure class="mx-auto w-44 pt-6"><img src="/gopher.svg" alt="Gopher" /></figure>
<figure class="mx-auto w-44 pt-6"><img src={asset('/gopher.svg')} alt="Gopher" /></figure>
<div class="card-body">
<h2 class="card-title">{m.welcome_step1_page_title()}</h2>
<p>{m.welcome_step1_setup_desc()}</p>
<div class="card-actions justify-end">
<button class="btn btn-success" on:click={() => (stepsCompleted = 1)}
<button class="btn btn-success" onclick={() => (stepsCompleted = 1)}
>{m.welcome_step1_setup_btn_next()} <Fa icon={faArrowRight} /></button
>
</div>
@@ -95,10 +96,16 @@
{:else if stepsCompleted === 1}
<div class="card-body">
<div class="flex flex-row gap-4">
<figure class="w-16"><img src="/gopher.svg" alt="Gopher" /></figure>
<figure class="w-16"><img src={asset('/gopher.svg')} alt="Gopher" /></figure>
<h2 class="card-title">{m.welcome_step2_page_title()}</h2>
</div>
<form class="w-full" on:submit|preventDefault={register}>
<form
class="w-full"
onsubmit={(e) => {
e.preventDefault();
register();
}}
>
<label class="label" for="email">
<span>{m.welcome_step2_label_email()}</span>
</label>
@@ -111,8 +118,8 @@
<div
class="absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer"
role="none"
on:click={() => toggleVisibility(inputPassword)}
on:keydown={() => toggleVisibility(inputPassword)}
onclick={() => toggleVisibility(inputPassword)}
onkeydown={() => toggleVisibility(inputPassword)}
>
<Fa icon={faEye} />
</div>
@@ -134,8 +141,8 @@
<div
class="absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer"
role="none"
on:click={() => toggleVisibility(inputConfirm)}
on:keydown={() => toggleVisibility(inputConfirm)}
onclick={() => toggleVisibility(inputConfirm)}
onkeydown={() => toggleVisibility(inputConfirm)}
>
<Fa icon={faEye} />
</div>
@@ -158,12 +165,12 @@
</form>
</div>
{:else if stepsCompleted === 2}
<figure class="mx-auto w-72 pt-6"><img src="/gopher.svg" alt="Gopher" /></figure>
<figure class="mx-auto w-72 pt-6"><img src={asset('/gopher.svg')} alt="Gopher" /></figure>
<div class="card-body">
<h2 class="card-title">{m.welcome_step3_page_title()}</h2>
<p>{m.welcome_step3_page_desc()}</p>
<div class="card-actions justify-end">
<button class="btn btn-success" on:click={() => goto('/')}
<button class="btn btn-success" onclick={() => goto(resolve('/'))}
>{m.welcome_step3_btn_done()}</button
>
</div>
-42
View File
@@ -1,42 +0,0 @@
{
"name": "UpSnap",
"short_name": "UpSnap",
"description": "A simple wake on lan web app written with SvelteKit, Go and PocketBase.",
"theme_color": "#55BCD9",
"background_color": "#55BCD9",
"display": "standalone",
"orientation": "any",
"scope": "/",
"start_url": "/",
"icons": [
{
"src": "/icon_192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icon_512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
},
{
"src": "/maskable_192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/maskable_512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/gopher.svg",
"type": "image/svg+xml",
"sizes": "any"
}
]
}
+7 -1
View File
@@ -22,7 +22,13 @@ const config = {
'/device/new',
'/users',
'/settings'
]
],
handleHttpError: ({ path, message }) => {
if (path === '/api/upsnap/manifest.webmanifest') {
return;
}
throw message;
}
}
}
};
+195
View File
@@ -0,0 +1,195 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"account_account_type_admin": "प्रशासक",
"account_account_type_user": "उपयोगकर्ता",
"account_avatar_title": "अवतार",
"account_change_password_body": "पासवर्ड बदलने के बाद आपको फिर से लॉगिन करना होगा।",
"account_change_password_confirm": "पासवर्ड की पुष्टि करें",
"account_change_password_label": "पुराना पासवर्ड",
"account_change_password_new": "नया पासवर्ड",
"account_change_password_title": "पासवर्ड बदलें",
"account_language_title": "भाषा",
"account_page_title": "खाता",
"buttons_add": "जोड़ें",
"buttons_cancel": "रद्द करें",
"buttons_change": "बदलें",
"buttons_confirm": "पुष्टि करें",
"buttons_delete": "हटाएँ",
"buttons_reset": "रीसेट करें",
"buttons_save": "सहेजें",
"device_card_btn_more_edit": "संपादित करें",
"device_card_btn_more_reboot": "रीबूट करें",
"device_card_btn_more_sleep": "स्लीप",
"device_card_btn_more": "अधिक",
"device_card_nic_tooltip_pending": "लंबित",
"device_card_nic_tooltip_power_no_permission": "इस डिवाइस को चालू करने की अनुमति नहीं है",
"device_card_nic_tooltip_power": "चालू करें",
"device_card_nic_tooltip_shutdown_no_cmd": "कोई शटडाउन कमांड सेट नहीं है",
"device_card_nic_tooltip_shutdown_no_permission": "इस डिवाइस को बंद करने की अनुमति नहीं है",
"device_card_nic_tooltip_shutdown": "बंद करें",
"device_card_password": "पासवर्ड",
"device_card_tooltip_last_status_change": "अंतिम स्थिति परिवर्तन",
"device_card_tooltip_shutdown_cron": "शटडाउन क्रोन",
"device_card_tooltip_wake_cron": "वेक क्रोन",
"device_card_tooltip_wake_password": "वेक पासवर्ड",
"device_general_description_placeholder": "डिवाइस का कुछ विवरण",
"device_general_description": "विवरण",
"device_general_ip": "IP",
"device_general_mac": "Mac",
"device_general_name": "नाम",
"device_general_netmask": "नेटमास्क",
"device_general_required_field": "आवश्यक फ़ील्ड",
"device_general": "सामान्य",
"device_groups_desc": "आप डिवाइस को समूह में जोड़ सकते हैं ताकि डैशबोर्ड पर वे समूह अनुसार दिखाई दें।",
"device_groups_placeholder": "उदा. 'तहखाना' या 'कार्यालय'",
"device_groups": "समूह",
"device_link_desc": "आपके डिवाइस का नाम क्लिक करने योग्य लिंक बनाता है, जैसे डैशबोर्ड से लिंक करना।",
"device_link_open_new_tab": "नया टैब",
"device_link_open_no": "नहीं",
"device_link_open_same_tab": "उसी टैब में",
"device_link_open": "लिंक स्वचालित रूप से खोलें",
"device_link": "लिंक",
"device_modal_confirm_shutdown_desc": "कृपया {device} को बंद करने की पुष्टि करें।",
"device_modal_confirm_shutdown_title": "{device} को बंद करें?",
"device_modal_confirm_wake_desc": "कृपया {device} को जगाने की पुष्टि करें।",
"device_modal_confirm_wake_title": "{device} को जगाएँ?",
"device_network_scan_add_all": "सभी डिवाइस जोड़ें",
"device_network_scan_desc": "अपने नेटवर्क को स्वचालित रूप से डिवाइस के लिए स्कैन करें। इसके लिए UpSnap को root/admin के रूप में चलाना होगा और nmap आपके $PATH में इंस्टॉल होना चाहिए (Docker उपयोगकर्ताओं के लिए यह पहले से है, आपको कुछ करने की आवश्यकता नहीं)। स्कैन में कुछ सेकंड लग सकते हैं।",
"device_network_scan_include_unknown": "उन डिवाइसों को शामिल करें जिनका नाम \"Unknown\" है",
"device_network_scan_ip_range": "IP रेंज",
"device_network_scan_ip": "IP:",
"device_network_scan_mac_vendor": "Mac विक्रेता:",
"device_network_scan_mac": "Mac:",
"device_network_scan_netmask": "नेटमास्क:",
"device_network_scan_new_netmask": "नया नेटमास्क",
"device_network_scan_no_range": "कोई स्कैन रेंज नहीं",
"device_network_scan_range_saved": "स्कैन रेंज सहेजा गया",
"device_network_scan_replace_netmask": "सभी डिवाइस के लिए नेटमास्क बदलें?",
"device_network_scan_running": "स्कैन चल रहा है",
"device_network_scan_unsaved_changes": "असहेजे गए परिवर्तन",
"device_network_scan": "स्कैन",
"device_page_title": "नया डिवाइस",
"device_password_desc": "कुछ नेटवर्क कार्ड में मैजिक पैकेट के लिए पासवर्ड सेट करने का विकल्प होता है, जिसे <span class=\"badge\">SecureON</span> कहा जाता है। पासवर्ड केवल 0, 4 या 6 अक्षरों का हो सकता है।",
"device_password": "पासवर्ड",
"device_ping_cmd": "कस्टम पिंग कमांड",
"device_ping_desc": "आप यह देखने के लिए कस्टम शेल कमांड का उपयोग कर सकते हैं कि डिवाइस चालू है या नहीं। यदि कमांड <span class=\"badge\">0</span> एग्ज़िट कोड लौटाता है, तो डिवाइस चालू माना जाएगा, अन्यथा बंद।",
"device_ping": "पिंग",
"device_ports_add_new": "नया पोर्ट जोड़ें",
"device_ports_desc": "UpSnap यह भी जांच सकता है कि दिए गए पोर्ट खुले हैं या नहीं।",
"device_ports_name": "नाम",
"device_ports_number": "संख्या",
"device_ports": "पोर्ट",
"device_require_confirmation": "पुष्टि आवश्यक",
"device_shutdown_cmd": "शटडाउन कमांड",
"device_shutdown_cron_desc": "जैसे डिवाइस को जगाने के लिए क्रोन सेट किया जाता है, वैसे ही आप इसे बंद करने के लिए भी क्रोन शेड्यूल कर सकते हैं।",
"device_shutdown_cron_enable": "शटडाउन क्रोन सक्षम करें",
"device_shutdown_cron": "शटडाउन क्रोन",
"device_shutdown_desc": "यह <strong>शेल कमांड</strong> आपके कंटेनर (यदि आप docker का उपयोग कर रहे हैं) या आपके होस्ट पर चलेगा। यह काम करता है या नहीं, इसकी जाँच आप पहले अपने कंटेनर या होस्ट शेल पर कर सकते हैं। सामान्य कमांड्स हैं <span class=\"badge\">net rpc</span> (Windows के लिए), <span class=\"badge\">sshpass</span> (Linux के लिए), या <span class=\"badge\">curl</span> (वेब रिक्वेस्ट के लिए)।",
"device_shutdown_examples_linux": "दूरस्थ Linux मशीन बंद करें:",
"device_shutdown_examples_windows": "दूरस्थ Windows मशीन बंद करें:",
"device_shutdown_examples": "उदाहरण:",
"device_shutdown_timeout": "शटडाउन समयसीमा (सेकंड)",
"device_shutdown": "शटडाउन",
"device_sol_authorization": "प्रमाणीकरण",
"device_sol_desc1": "आप <a class=\"link\" href=\"https://github.com/SR-G/sleep-on-lan\" target=\"_blank\">Sleep-On-LAN</a> टूल का उपयोग करके कंप्यूटर को स्लीप पर डाल सकते हैं। यह एक बाहरी टूल/डेमन है जो लक्षित पीसी पर चलता है और REST एंडपॉइंट उपलब्ध कराता है। सेटअप के लिए <a href=\"https://github.com/SR-G/sleep-on-lan#usage\" class=\"link\" target=\"_blank\">Usage</a> देखें।",
"device_sol_desc2": "SOL HTTP पर अनुरोध भेजने के लिए कॉन्फ़िगर किया गया है ताकि प्राधिकरण सक्षम हो और अनुरोध अधिक विश्वसनीय हों।",
"device_sol_desc3": "कृपया सुनिश्चित करें कि आपने <span class=\"badge\">HTTP:&lt;YOURPORT&gt;</span> को <span class=\"badge\">Listeners</span> अनुभाग में शामिल किया है।",
"device_sol_enable": "Sleep-On-LAN सक्षम करें",
"device_sol_password": "SOL पासवर्ड",
"device_sol_port": "SOL पोर्ट",
"device_sol_user": "SOL उपयोगकर्ता",
"device_sol": "Sleep-On-LAN",
"device_tabs.0": "मैनुअल",
"device_tabs.1": "नेटवर्क स्कैन",
"device_wake_cmd": "कस्टम वेक कमांड",
"device_wake_cron_enable": "वेक क्रोन सक्षम करें",
"device_wake_cron": "वेक क्रोन",
"device_wake_desc": "आप इस डिवाइस को निर्धारित क्रोन जॉब से चालू कर सकते हैं।",
"device_wake_timeout": "वेक समयसीमा (सेकंड)",
"device_wake": "जगाएँ",
"home_add_first_device": "अपना पहला डिवाइस जोड़ें",
"home_grant_permissions": "कृपया मौजूदा डिवाइस तक पहुँच या नए बनाने की अनुमति के लिए व्यवस्थापक से पूछें।",
"home_no_devices": "यहाँ कोई डिवाइस नहीं है।",
"home_order_groups": "समूह",
"home_order_ip": "IP",
"home_order_name": "नाम",
"home_order_tooltip": "क्रम",
"home_page_title": "होम",
"home_search_placeholder": "डिवाइस खोजें",
"home_wake_group": "समूह जगाएँ",
"login_btn_login": "लॉगिन",
"login_btn_more": "अधिक",
"login_email_label": "ईमेल या उपयोगकर्ता नाम:",
"login_menu_title_auth_providers": "अन्य ऑथ प्रोवाइडर",
"login_password_label": "पासवर्ड:",
"login_welcome": "स्वागत है",
"navbar_edit_account": "खाता संपादित करें",
"navbar_logout": "लॉगआउट",
"navbar_new": "नया",
"navbar_theme": "थीम",
"settings_icon_desc": "एक कस्टम favicon सेट करें। समर्थित फ़ाइल प्रकार हैं:",
"settings_icon_title": "आइकन",
"settings_invalid_cron": "❌ अमान्य क्रोन सिंटैक्स",
"settings_lazy_ping_desc": "जब Lazy Ping चालू होता है, UpSnap केवल तब पिंग करेगा जब कोई सक्रिय उपयोगकर्ता वेबसाइट पर हो। बंद होने पर यह हमेशा पिंग करेगा।",
"settings_lazy_ping_enable": "सक्रिय करें",
"settings_lazy_ping_title": "Lazy पिंग",
"settings_page_title": "सेटिंग्स",
"settings_ping_interval_desc1": "वह अंतराल निर्धारित करता है जिसमें डिवाइस पिंग किए जाते हैं। डिफ़ॉल्ट मान (<span class=\"badge\">*/3 * * * * *</span>) के लिए खाली छोड़ दें।",
"settings_ping_interval_desc2": "क्रोन की सही सिंटैक्स के बारे में अधिक जानने के लिए <a class=\"link\" href=\"https://en.wikipedia.org/wiki/Cron\" target=\"_blank\">Wikipedia</a> या <a class=\"link\" href=\"https://github.com/harrisiirak/cron-parser\" target=\"_blank\">पैकेज दस्तावेज़</a> देखें।",
"settings_ping_interval_title": "पिंग अंतराल",
"settings_upsnap_version": "UpSnap संस्करण",
"settings_website_title_desc": "वेबसाइट का शीर्षक और ब्राउज़र टैब में प्रदर्शित शीर्षक सेट करें।",
"settings_website_title_title": "वेबसाइट शीर्षक",
"toasts_admin_saved": "व्यवस्थापक सहेजा गया",
"toasts_device_created": "{device} बनाया गया",
"toasts_device_deleted": "{device} हटाया गया",
"toasts_device_updated": "{device} अपडेट किया गया",
"toasts_devices_created_multiple": "{count} डिवाइस बनाए गए",
"toasts_group_created": "समूह {group} बनाया गया",
"toasts_group_deleted": "समूह {group} हटाया गया",
"toasts_no_permission": "आपको {url} पर जाने की अनुमति नहीं है",
"toasts_password_changed": "पासवर्ड बदल दिया गया। कृपया फिर से लॉगिन करें।",
"toasts_passwords_missmatch": "पासवर्ड मेल नहीं खाते",
"toasts_permissions_created": "{username} के लिए अनुमतियाँ बनाई गईं",
"toasts_permissions_deleted": "{username} के लिए अनुमतियाँ हटाई गईं",
"toasts_permissions_updated_personal": "आपकी अनुमतियाँ अपडेट की गईं",
"toasts_permissions_updated": "{username} के लिए अनुमतियाँ अपडेट की गईं",
"toasts_settings_saved": "सेटिंग्स सहेजी गईं",
"toasts_user_created": "उपयोगकर्ता {username} बनाया गया",
"toasts_user_deleted": "उपयोगकर्ता {username} हटाया गया",
"toasts_user_saved": "उपयोगकर्ता सहेजा गया",
"users_allow_create_devices": "{username} को नए डिवाइस बनाने और डिवाइस समूह संपादित करने की अनुमति दें",
"users_confirm_delete_desc": "क्या आप वाकई {username} को हटाना चाहते हैं?",
"users_confirm_delete_title": "हटाने की पुष्टि करें",
"users_create_new_device": "नया डिवाइस बनाएँ",
"users_create_new_user": "नया उपयोगकर्ता बनाएँ",
"users_delete": "हटाएँ",
"users_device_permissions": "डिवाइस अनुमतियाँ",
"users_page_title": "उपयोगकर्ता",
"users_password_confirm": "पासवर्ड की पुष्टि करें",
"users_password": "पासवर्ड",
"users_power": "पावर",
"users_read": "रीड",
"users_required_field": "आवश्यक फ़ील्ड",
"users_toggle": "टॉगल",
"users_update": "अपडेट करें",
"users_username": "उपयोगकर्ता नाम",
"welcome_not_expected_back": "मुझे वापस ले चलो",
"welcome_not_expected_desc": "आपने पहले ही सेटअप पूरा कर लिया है! कुछ भी करने की आवश्यकता नहीं।",
"welcome_not_expected_title": "मैंने आपको यहाँ देखने की उम्मीद नहीं की थी! 🧐",
"welcome_progress_step1": "स्वागत है",
"welcome_progress_step2": "खाता बनाएँ",
"welcome_progress_step3": "पूर्ण",
"welcome_step1_page_title": "UpSnap में आपका स्वागत है 🥳",
"welcome_step1_setup_btn_next": "आगे",
"welcome_step1_setup_desc": "कृपया सेटअप पूरा करने के लिए निम्नलिखित चरण पूरे करें।",
"welcome_step2_btn_create": "बनाएँ",
"welcome_step2_label_email": "ईमेल:",
"welcome_step2_label_min_chars": "न्यूनतम 10 अक्षर",
"welcome_step2_label_password_confirm": "पासवर्ड की पुष्टि:",
"welcome_step2_label_password": "पासवर्ड:",
"welcome_step2_page_title": "प्रशासक खाता बनाएँ",
"welcome_step3_btn_done": "चलो शुरू करें!",
"welcome_step3_page_desc": "डैशबोर्ड में कुछ डिवाइस जोड़ें।",
"welcome_step3_page_title": "सब तैयार है! 🎉"
}