mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-11-27 12:21:56 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 109f374269 | |||
| a2d09762b3 | |||
| f83babb494 | |||
| 36878ee42b | |||
| c6e8eee77d | |||
| e098b0ba5d | |||
| 46c7870be4 | |||
| a5cf8d718c | |||
| 79c048319d | |||
| 4830f43bab | |||
| 3b6f6abb1c |
+1
-1
@@ -100,7 +100,7 @@ web_modules/
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
#.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
release:
|
||||
draft: true
|
||||
#draft: true
|
||||
prerelease: auto
|
||||
before:
|
||||
hooks:
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ go 1.19
|
||||
require (
|
||||
github.com/labstack/echo/v5 v5.0.0-20230722203903-ec5b858dab61
|
||||
github.com/mdlayher/wol v0.0.0-20220221231636-b763a792253a
|
||||
github.com/pocketbase/dbx v1.10.0
|
||||
github.com/pocketbase/dbx v1.10.1
|
||||
github.com/pocketbase/pocketbase v0.17.5
|
||||
github.com/prometheus-community/pro-bing v0.3.0
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
|
||||
+2
-2
@@ -171,8 +171,8 @@ github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyex
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pocketbase/dbx v1.10.0 h1:58VIT7r6T+BnVbYVosvGBsPjQEic3/VFRYGT823vWSQ=
|
||||
github.com/pocketbase/dbx v1.10.0/go.mod h1:xXRCIAKTHMgUCyCKZm55pUOdvFziJjQfXaWKhu2vhMs=
|
||||
github.com/pocketbase/dbx v1.10.1 h1:cw+vsyfCJD8YObOVeqb93YErnlxwYMkNZ4rwN0G0AaA=
|
||||
github.com/pocketbase/dbx v1.10.1/go.mod h1:xXRCIAKTHMgUCyCKZm55pUOdvFziJjQfXaWKhu2vhMs=
|
||||
github.com/pocketbase/pocketbase v0.17.5 h1:3KwMrlSMt1rcwZK2Z1/wFa5p/rkDHpcyeCRvUDXMb+Y=
|
||||
github.com/pocketbase/pocketbase v0.17.5/go.mod h1:IqsgywiDX5ewaUdeG+0NNckBLWp5mFhJSca1PH9zSp4=
|
||||
github.com/prometheus-community/pro-bing v0.3.0 h1:SFT6gHqXwbItEDJhTkzPWVqU6CLEtqEfNAPp47RUON4=
|
||||
|
||||
+23
-23
@@ -1,25 +1,25 @@
|
||||
version: "3"
|
||||
services:
|
||||
upsnap:
|
||||
container_name: upsnap
|
||||
image: ghcr.io/seriousm4x/upsnap:3
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data:/app/pb_data
|
||||
# environment:
|
||||
# - TZ=Europe/Berlin # Set container timezone for cron schedules
|
||||
# - UPSNAP_INTERVAL=@every 10s # Sets the interval in which the devices are pinged
|
||||
# - UPSNAP_SCAN_RANGE=192.168.1.0/24 # Scan range is used for device discovery on local network
|
||||
# - UPSNAP_WEBSITE_TITLE=Custom name # Custom website title
|
||||
# # dns is used for name resolution during network scan
|
||||
# dns:
|
||||
# - 192.18.0.1
|
||||
# - 192.18.0.2
|
||||
# # you can change the listen ip:port inside the container like this:
|
||||
# entrypoint: /bin/sh -c "./upsnap serve --http 0.0.0.0:5000"
|
||||
# healthcheck:
|
||||
# test: curl -fs "http://localhost:5000/api/health" || exit 1
|
||||
# interval: 10s
|
||||
# # or install custom packages for shutdown
|
||||
# entrypoint: /bin/sh -c "apk update && apk add --no-cache <YOUR_PACKAGE> && rm -rf /var/cache/apk/* && ./upsnap serve --http 0.0.0.0:8090"
|
||||
upsnap:
|
||||
container_name: upsnap
|
||||
image: ghcr.io/seriousm4x/upsnap:4
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data:/app/pb_data
|
||||
# environment:
|
||||
# - TZ=Europe/Berlin # Set container timezone for cron schedules
|
||||
# - UPSNAP_INTERVAL=@every 10s # Sets the interval in which the devices are pinged
|
||||
# - UPSNAP_SCAN_RANGE=192.168.1.0/24 # Scan range is used for device discovery on local network
|
||||
# - UPSNAP_WEBSITE_TITLE=Custom name # Custom website title
|
||||
# # dns is used for name resolution during network scan
|
||||
# dns:
|
||||
# - 192.18.0.1
|
||||
# - 192.18.0.2
|
||||
# # you can change the listen ip:port inside the container like this:
|
||||
# entrypoint: /bin/sh -c "./upsnap serve --http 0.0.0.0:5000"
|
||||
# healthcheck:
|
||||
# test: curl -fs "http://localhost:5000/api/health" || exit 1
|
||||
# interval: 10s
|
||||
# # or install custom packages for shutdown
|
||||
# entrypoint: /bin/sh -c "apk update && apk add --no-cache <YOUR_PACKAGE> && rm -rf /var/cache/apk/* && ./upsnap serve --http 0.0.0.0:8090"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
PUBLIC_VERSION=""
|
||||
@@ -3,7 +3,6 @@ node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/package
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
vite.config.js.timestamp-*
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-svelte": "^2.32.4",
|
||||
"husky": "^8.0.3",
|
||||
"postcss": "^8.4.27",
|
||||
"prettier": "^3.0.1",
|
||||
"postcss": "^8.4.28",
|
||||
"prettier": "^3.0.2",
|
||||
"prettier-plugin-svelte": "^3.0.3",
|
||||
"svelte": "^4.2.0",
|
||||
"svelte-check": "^3.5.0",
|
||||
|
||||
Generated
+46
-46
@@ -39,7 +39,7 @@ devDependencies:
|
||||
version: 6.4.0(eslint@8.47.0)(typescript@5.1.6)
|
||||
autoprefixer:
|
||||
specifier: ^10.4.15
|
||||
version: 10.4.15(postcss@8.4.27)
|
||||
version: 10.4.15(postcss@8.4.28)
|
||||
daisyui:
|
||||
specifier: ^3.5.1
|
||||
version: 3.5.1
|
||||
@@ -56,20 +56,20 @@ devDependencies:
|
||||
specifier: ^8.0.3
|
||||
version: 8.0.3
|
||||
postcss:
|
||||
specifier: ^8.4.27
|
||||
version: 8.4.27
|
||||
specifier: ^8.4.28
|
||||
version: 8.4.28
|
||||
prettier:
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1
|
||||
specifier: ^3.0.2
|
||||
version: 3.0.2
|
||||
prettier-plugin-svelte:
|
||||
specifier: ^3.0.3
|
||||
version: 3.0.3(prettier@3.0.1)(svelte@4.2.0)
|
||||
version: 3.0.3(prettier@3.0.2)(svelte@4.2.0)
|
||||
svelte:
|
||||
specifier: ^4.2.0
|
||||
version: 4.2.0
|
||||
svelte-check:
|
||||
specifier: ^3.5.0
|
||||
version: 3.5.0(postcss@8.4.27)(svelte@4.2.0)
|
||||
version: 3.5.0(postcss@8.4.28)(svelte@4.2.0)
|
||||
tailwindcss:
|
||||
specifier: ^3.3.3
|
||||
version: 3.3.3
|
||||
@@ -928,7 +928,7 @@ packages:
|
||||
engines: { node: '>=8' }
|
||||
dev: true
|
||||
|
||||
/autoprefixer@10.4.15(postcss@8.4.27):
|
||||
/autoprefixer@10.4.15(postcss@8.4.28):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==
|
||||
@@ -943,7 +943,7 @@ packages:
|
||||
fraction.js: 4.2.0
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.0.0
|
||||
postcss: 8.4.27
|
||||
postcss: 8.4.28
|
||||
postcss-value-parser: 4.2.0
|
||||
dev: true
|
||||
|
||||
@@ -1182,8 +1182,8 @@ packages:
|
||||
dependencies:
|
||||
colord: 2.9.3
|
||||
css-selector-tokenizer: 0.8.0
|
||||
postcss: 8.4.27
|
||||
postcss-js: 4.0.1(postcss@8.4.27)
|
||||
postcss: 8.4.28
|
||||
postcss-js: 4.0.1(postcss@8.4.28)
|
||||
tailwindcss: 3.3.3
|
||||
transitivePeerDependencies:
|
||||
- ts-node
|
||||
@@ -1379,9 +1379,9 @@ packages:
|
||||
eslint: 8.47.0
|
||||
esutils: 2.0.3
|
||||
known-css-properties: 0.28.0
|
||||
postcss: 8.4.27
|
||||
postcss-load-config: 3.1.4(postcss@8.4.27)
|
||||
postcss-safe-parser: 6.0.0(postcss@8.4.27)
|
||||
postcss: 8.4.28
|
||||
postcss-load-config: 3.1.4(postcss@8.4.28)
|
||||
postcss-safe-parser: 6.0.0(postcss@8.4.28)
|
||||
postcss-selector-parser: 6.0.13
|
||||
semver: 7.5.4
|
||||
svelte: 4.2.0
|
||||
@@ -2303,7 +2303,7 @@ packages:
|
||||
}
|
||||
dev: false
|
||||
|
||||
/postcss-import@15.1.0(postcss@8.4.27):
|
||||
/postcss-import@15.1.0(postcss@8.4.28):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==
|
||||
@@ -2312,13 +2312,13 @@ packages:
|
||||
peerDependencies:
|
||||
postcss: ^8.0.0
|
||||
dependencies:
|
||||
postcss: 8.4.27
|
||||
postcss: 8.4.28
|
||||
postcss-value-parser: 4.2.0
|
||||
read-cache: 1.0.0
|
||||
resolve: 1.22.4
|
||||
dev: true
|
||||
|
||||
/postcss-js@4.0.1(postcss@8.4.27):
|
||||
/postcss-js@4.0.1(postcss@8.4.28):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==
|
||||
@@ -2328,10 +2328,10 @@ packages:
|
||||
postcss: ^8.4.21
|
||||
dependencies:
|
||||
camelcase-css: 2.0.1
|
||||
postcss: 8.4.27
|
||||
postcss: 8.4.28
|
||||
dev: true
|
||||
|
||||
/postcss-load-config@3.1.4(postcss@8.4.27):
|
||||
/postcss-load-config@3.1.4(postcss@8.4.28):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==
|
||||
@@ -2347,11 +2347,11 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
lilconfig: 2.1.0
|
||||
postcss: 8.4.27
|
||||
postcss: 8.4.28
|
||||
yaml: 1.10.2
|
||||
dev: true
|
||||
|
||||
/postcss-load-config@4.0.1(postcss@8.4.27):
|
||||
/postcss-load-config@4.0.1(postcss@8.4.28):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==
|
||||
@@ -2367,11 +2367,11 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
lilconfig: 2.1.0
|
||||
postcss: 8.4.27
|
||||
postcss: 8.4.28
|
||||
yaml: 2.3.1
|
||||
dev: true
|
||||
|
||||
/postcss-nested@6.0.1(postcss@8.4.27):
|
||||
/postcss-nested@6.0.1(postcss@8.4.28):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==
|
||||
@@ -2380,11 +2380,11 @@ packages:
|
||||
peerDependencies:
|
||||
postcss: ^8.2.14
|
||||
dependencies:
|
||||
postcss: 8.4.27
|
||||
postcss: 8.4.28
|
||||
postcss-selector-parser: 6.0.13
|
||||
dev: true
|
||||
|
||||
/postcss-safe-parser@6.0.0(postcss@8.4.27):
|
||||
/postcss-safe-parser@6.0.0(postcss@8.4.28):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==
|
||||
@@ -2393,10 +2393,10 @@ packages:
|
||||
peerDependencies:
|
||||
postcss: ^8.3.3
|
||||
dependencies:
|
||||
postcss: 8.4.27
|
||||
postcss: 8.4.28
|
||||
dev: true
|
||||
|
||||
/postcss-scss@4.0.6(postcss@8.4.27):
|
||||
/postcss-scss@4.0.6(postcss@8.4.28):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==
|
||||
@@ -2405,7 +2405,7 @@ packages:
|
||||
peerDependencies:
|
||||
postcss: ^8.4.19
|
||||
dependencies:
|
||||
postcss: 8.4.27
|
||||
postcss: 8.4.28
|
||||
dev: true
|
||||
|
||||
/postcss-selector-parser@6.0.13:
|
||||
@@ -2426,10 +2426,10 @@ packages:
|
||||
}
|
||||
dev: true
|
||||
|
||||
/postcss@8.4.27:
|
||||
/postcss@8.4.28:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==
|
||||
integrity: sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==
|
||||
}
|
||||
engines: { node: ^10 || ^12 || >=14 }
|
||||
dependencies:
|
||||
@@ -2446,7 +2446,7 @@ packages:
|
||||
engines: { node: '>= 0.8.0' }
|
||||
dev: true
|
||||
|
||||
/prettier-plugin-svelte@3.0.3(prettier@3.0.1)(svelte@4.2.0):
|
||||
/prettier-plugin-svelte@3.0.3(prettier@3.0.2)(svelte@4.2.0):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-dLhieh4obJEK1hnZ6koxF+tMUrZbV5YGvRpf2+OADyanjya5j0z1Llo8iGwiHmFWZVG/hLEw/AJD5chXd9r3XA==
|
||||
@@ -2455,14 +2455,14 @@ packages:
|
||||
prettier: ^3.0.0
|
||||
svelte: ^3.2.0 || ^4.0.0-next.0
|
||||
dependencies:
|
||||
prettier: 3.0.1
|
||||
prettier: 3.0.2
|
||||
svelte: 4.2.0
|
||||
dev: true
|
||||
|
||||
/prettier@3.0.1:
|
||||
/prettier@3.0.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ==
|
||||
integrity: sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==
|
||||
}
|
||||
engines: { node: '>=14' }
|
||||
hasBin: true
|
||||
@@ -2746,7 +2746,7 @@ packages:
|
||||
engines: { node: '>= 0.4' }
|
||||
dev: true
|
||||
|
||||
/svelte-check@3.5.0(postcss@8.4.27)(svelte@4.2.0):
|
||||
/svelte-check@3.5.0(postcss@8.4.28)(svelte@4.2.0):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-KHujbn4k17xKYLmtCwv0sKKM7uiHTYcQvXnvrCcNU6a7hcszh99zFTIoiu/Sp/ewAw5aJmillJ1Cs8gKLmcX4A==
|
||||
@@ -2762,7 +2762,7 @@ packages:
|
||||
picocolors: 1.0.0
|
||||
sade: 1.8.1
|
||||
svelte: 4.2.0
|
||||
svelte-preprocess: 5.0.4(postcss@8.4.27)(svelte@4.2.0)(typescript@5.1.6)
|
||||
svelte-preprocess: 5.0.4(postcss@8.4.28)(svelte@4.2.0)(typescript@5.1.6)
|
||||
typescript: 5.1.6
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
@@ -2791,8 +2791,8 @@ packages:
|
||||
eslint-scope: 7.2.2
|
||||
eslint-visitor-keys: 3.4.3
|
||||
espree: 9.6.1
|
||||
postcss: 8.4.27
|
||||
postcss-scss: 4.0.6(postcss@8.4.27)
|
||||
postcss: 8.4.28
|
||||
postcss-scss: 4.0.6(postcss@8.4.28)
|
||||
svelte: 4.2.0
|
||||
dev: true
|
||||
|
||||
@@ -2827,7 +2827,7 @@ packages:
|
||||
svelte: 4.2.0
|
||||
dev: true
|
||||
|
||||
/svelte-preprocess@5.0.4(postcss@8.4.27)(svelte@4.2.0)(typescript@5.1.6):
|
||||
/svelte-preprocess@5.0.4(postcss@8.4.28)(svelte@4.2.0)(typescript@5.1.6):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==
|
||||
@@ -2871,7 +2871,7 @@ packages:
|
||||
'@types/pug': 2.0.6
|
||||
detect-indent: 6.1.0
|
||||
magic-string: 0.27.0
|
||||
postcss: 8.4.27
|
||||
postcss: 8.4.28
|
||||
sorcery: 0.11.0
|
||||
strip-indent: 3.0.0
|
||||
svelte: 4.2.0
|
||||
@@ -2932,11 +2932,11 @@ packages:
|
||||
normalize-path: 3.0.0
|
||||
object-hash: 3.0.0
|
||||
picocolors: 1.0.0
|
||||
postcss: 8.4.27
|
||||
postcss-import: 15.1.0(postcss@8.4.27)
|
||||
postcss-js: 4.0.1(postcss@8.4.27)
|
||||
postcss-load-config: 4.0.1(postcss@8.4.27)
|
||||
postcss-nested: 6.0.1(postcss@8.4.27)
|
||||
postcss: 8.4.28
|
||||
postcss-import: 15.1.0(postcss@8.4.28)
|
||||
postcss-js: 4.0.1(postcss@8.4.28)
|
||||
postcss-load-config: 4.0.1(postcss@8.4.28)
|
||||
postcss-nested: 6.0.1(postcss@8.4.28)
|
||||
postcss-selector-parser: 6.0.13
|
||||
resolve: 1.22.4
|
||||
sucrase: 3.34.0
|
||||
@@ -3120,7 +3120,7 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
esbuild: 0.18.20
|
||||
postcss: 8.4.27
|
||||
postcss: 8.4.28
|
||||
rollup: 3.28.0
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.2
|
||||
|
||||
@@ -336,8 +336,8 @@
|
||||
target="_blank">Sleep-On-LAN</a
|
||||
>
|
||||
tool. Sleep-On-LAN (SOL) is an external tool/daemon that operates on the PCs you want to put
|
||||
to sleep, providing a REST endpoint to put the PC to sleep. For instructions on setting up Sleep-On-LAN,
|
||||
please refer to the
|
||||
to sleep, providing a REST endpoint. For instructions on setting up Sleep-On-LAN, please refer
|
||||
to the
|
||||
<a href="https://github.com/SR-G/sleep-on-lan#usage" class="link" target="_blank">Usage</a> section.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<div class="navbar bg-base-100">
|
||||
<div class="justify-start">
|
||||
<div class="dropdown">
|
||||
<label tabindex="-1" class="btn btn-ghost md:hidden" for="mobile-menu">
|
||||
<label tabindex="-1" class="btn btn-ghost lg:hidden" for="mobile-menu">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5"
|
||||
@@ -93,6 +93,11 @@
|
||||
tabindex="-1"
|
||||
class="menu dropdown-content mt-3 z-[1] p-2 gap-1 shadow bg-base-300 rounded-box w-52"
|
||||
>
|
||||
{#if $settingsPub?.website_title}
|
||||
<div class="menu-title">
|
||||
{$settingsPub?.website_title}
|
||||
</div>
|
||||
{/if}
|
||||
<li>
|
||||
<a href="/" class="px-4 py-2" class:active={$page.url.pathname === '/'}
|
||||
><Fa icon={faHome} />Home</a
|
||||
@@ -118,7 +123,7 @@
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<a class="btn btn-ghost normal-case text-xl" href="/">
|
||||
<a class="btn btn-ghost normal-case text-xl px-2" href="/">
|
||||
<img
|
||||
src={$settingsPub?.id && $settingsPub?.favicon
|
||||
? `${backendUrl}api/files/settings_public/${$settingsPub?.id}/${$settingsPub?.favicon}`
|
||||
@@ -126,10 +131,13 @@
|
||||
alt={$settingsPub?.website_title ? $settingsPub?.website_title : 'UpSnap'}
|
||||
width="45"
|
||||
height="45"
|
||||
/>{$settingsPub?.website_title ? $settingsPub?.website_title : ''}
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="hidden md:flex">
|
||||
<div class="hidden lg:flex">
|
||||
{#if $settingsPub?.website_title}
|
||||
<span class="px-2">{$settingsPub?.website_title}</span>
|
||||
{/if}
|
||||
<ul class="menu menu-horizontal px-1 gap-1">
|
||||
<li>
|
||||
<a href="/" class="p-2" class:active={$page.url.pathname === '/'}
|
||||
@@ -205,7 +213,7 @@
|
||||
</label>
|
||||
<ul
|
||||
tabindex="-1"
|
||||
class="menu dropdown-content mt-3 z-[1] p-2 shadow bg-base-300 rounded-box w-40"
|
||||
class="menu dropdown-content mt-3 z-[1] p-2 shadow bg-base-300 rounded-box"
|
||||
>
|
||||
<li class="menu-title">
|
||||
{$isAdmin ? $pocketbase.authStore.model.email : $pocketbase.authStore.model.username}
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
devices: []
|
||||
};
|
||||
let addAllCheckbox = true;
|
||||
let replaceNetmaskCheckbox = false;
|
||||
let replaceNetmask = '';
|
||||
|
||||
onMount(() => {
|
||||
if (!$settingsPriv) {
|
||||
@@ -75,7 +77,11 @@
|
||||
}
|
||||
|
||||
async function createDevice(device: ScannedDevice): Promise<Device> {
|
||||
device.netmask = scanResponse.netmask;
|
||||
if (replaceNetmaskCheckbox) {
|
||||
device.netmask = replaceNetmask;
|
||||
} else {
|
||||
device.netmask = scanResponse.netmask;
|
||||
}
|
||||
return $pocketbase.collection('devices').create(device);
|
||||
}
|
||||
|
||||
@@ -195,12 +201,55 @@
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
<div class="form-control max-w-fit flex flex-row flex-wrap gap-4 mt-4 ms-auto">
|
||||
<h2 class="card-title mt-4">Add all devices</h2>
|
||||
<div class="form-control max-w-fit">
|
||||
<label class="label cursor-pointer">
|
||||
<input type="checkbox" class="checkbox" bind:checked={addAllCheckbox} />
|
||||
<span class="label-text ms-2">Include devices where name is "Unknown"</span>
|
||||
<input type="checkbox" class="checkbox" bind:checked={replaceNetmaskCheckbox} />
|
||||
<span class="label-text ms-2">Replace netmask for all devices?</span>
|
||||
</label>
|
||||
{#if addAllCheckbox}
|
||||
</div>
|
||||
{#if replaceNetmaskCheckbox}
|
||||
<div class="form-control max-w-fit">
|
||||
<label class="label cursor-pointer" for="replaceNetmaskInput">
|
||||
<span class="label-text ms-2">New netmask</span>
|
||||
</label>
|
||||
<input
|
||||
id="replaceNetmaskInput"
|
||||
class="input input-bordered"
|
||||
type="text"
|
||||
placeholder="255.255.0.0"
|
||||
bind:value={replaceNetmask}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{#if scanResponse.devices.find((dev) => dev.name === 'Unknown')}
|
||||
<div class="form-control max-w-fit">
|
||||
<label class="label cursor-pointer">
|
||||
<input type="checkbox" class="checkbox" bind:checked={addAllCheckbox} />
|
||||
<span class="label-text ms-2">Include devices where name is "Unknown"</span>
|
||||
</label>
|
||||
{#if addAllCheckbox}
|
||||
<button
|
||||
class="btn btn-success"
|
||||
on:click={() => addAll()}
|
||||
disabled={scanResponse.devices.length === 0}
|
||||
>
|
||||
<Fa icon={faPlus} /> Add all ({scanResponse.devices.length})
|
||||
</button>
|
||||
{:else}
|
||||
<button
|
||||
class="btn btn-success"
|
||||
on:click={() => addAll()}
|
||||
disabled={scanResponse.devices.filter((dev) => dev.name !== 'Unknown').length === 0}
|
||||
>
|
||||
<Fa icon={faPlus} /> Add all ({scanResponse.devices.filter(
|
||||
(dev) => dev.name !== 'Unknown'
|
||||
).length})
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="form-control max-w-fit">
|
||||
<button
|
||||
class="btn btn-success"
|
||||
on:click={() => addAll()}
|
||||
@@ -208,18 +257,8 @@
|
||||
>
|
||||
<Fa icon={faPlus} /> Add all ({scanResponse.devices.length})
|
||||
</button>
|
||||
{:else}
|
||||
<button
|
||||
class="btn btn-success"
|
||||
on:click={() => addAll()}
|
||||
disabled={scanResponse.devices.filter((dev) => dev.name !== 'Unknown').length === 0}
|
||||
>
|
||||
<Fa icon={faPlus} /> Add all ({scanResponse.devices.filter(
|
||||
(dev) => dev.name !== 'Unknown'
|
||||
).length})
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -185,12 +185,12 @@
|
||||
</div>
|
||||
</form>
|
||||
<div class="container mx-auto text-center mt-6">
|
||||
{#if PUBLIC_VERSION === undefined}
|
||||
{#if PUBLIC_VERSION === ''}
|
||||
UpSnap version: (untracked)
|
||||
{:else}
|
||||
UpSnap version: <a
|
||||
href="https://github.com/seriousm4x/UpSnap/releases/tag/{PUBLIC_VERSION}"
|
||||
class="text-reset">{PUBLIC_VERSION}</a
|
||||
class="link">{PUBLIC_VERSION}</a
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user