@duplicati/ngclient 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +13 -0
- package/.github/workflows/npm-publish.yml +59 -0
- package/.prettierignore +13 -0
- package/.prettierrc +12 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +13 -0
- package/.vscode/settings.json +8 -0
- package/.vscode/tasks.json +24 -0
- package/Dockerfile +38 -0
- package/LICENSE +21 -0
- package/README.md +27 -0
- package/angular.json +98 -0
- package/bun.lockb +0 -0
- package/openapi-ts.config.ts +13 -0
- package/package.json +46 -0
- package/scripts/generate-package-json.ts +15 -0
- package/src/app/about/about.component.html +15 -0
- package/src/app/about/about.component.scss +19 -0
- package/src/app/about/about.component.ts +13 -0
- package/src/app/about/changelog/changelog.component.html +3 -0
- package/src/app/about/changelog/changelog.component.scss +7 -0
- package/src/app/about/changelog/changelog.component.ts +18 -0
- package/src/app/about/general/general.component.html +9 -0
- package/src/app/about/general/general.component.scss +23 -0
- package/src/app/about/general/general.component.ts +30 -0
- package/src/app/about/libraries/libraries.component.html +3 -0
- package/src/app/about/libraries/libraries.component.scss +7 -0
- package/src/app/about/libraries/libraries.component.ts +18 -0
- package/src/app/about/logs/logs.component.html +5 -0
- package/src/app/about/logs/logs.component.scss +7 -0
- package/src/app/about/logs/logs.component.ts +18 -0
- package/src/app/about/system-info/system-info.component.html +3 -0
- package/src/app/about/system-info/system-info.component.scss +7 -0
- package/src/app/about/system-info/system-info.component.ts +17 -0
- package/src/app/add-backup/add-backup.component.html +29 -0
- package/src/app/add-backup/add-backup.component.scss +38 -0
- package/src/app/add-backup/add-backup.component.ts +14 -0
- package/src/app/app.component.ts +35 -0
- package/src/app/app.config.ts +23 -0
- package/src/app/app.routes.ts +121 -0
- package/src/app/core/components/file-tree/file-tree.component.html +87 -0
- package/src/app/core/components/file-tree/file-tree.component.scss +80 -0
- package/src/app/core/components/file-tree/file-tree.component.ts +485 -0
- package/src/app/core/components/logo/logo.component.html +22 -0
- package/src/app/core/components/logo/logo.component.scss +12 -0
- package/src/app/core/components/logo/logo.component.ts +11 -0
- package/src/app/core/components/status-bar/status-bar.component.html +38 -0
- package/src/app/core/components/status-bar/status-bar.component.scss +27 -0
- package/src/app/core/components/status-bar/status-bar.component.ts +33 -0
- package/src/app/core/components/status-bar/status-bar.state.ts +182 -0
- package/src/app/core/components/toggle-card/toggle-card.component.html +11 -0
- package/src/app/core/components/toggle-card/toggle-card.component.scss +49 -0
- package/src/app/core/components/toggle-card/toggle-card.component.ts +28 -0
- package/src/app/core/interceptors/http.interceptor.ts +69 -0
- package/src/app/core/interceptors/websocket.interceptor.ts +66 -0
- package/src/app/core/openapi/core/ApiError.ts +21 -0
- package/src/app/core/openapi/core/ApiRequestOptions.ts +21 -0
- package/src/app/core/openapi/core/ApiResult.ts +7 -0
- package/src/app/core/openapi/core/OpenAPI.ts +55 -0
- package/src/app/core/openapi/core/request.ts +337 -0
- package/src/app/core/openapi/index.ts +6 -0
- package/src/app/core/openapi/schemas.gen.ts +3611 -0
- package/src/app/core/openapi/services.gen.ts +1460 -0
- package/src/app/core/openapi/types.gen.ts +1510 -0
- package/src/app/core/pipes/duration.pipe.ts +27 -0
- package/src/app/core/pipes/relative-time.pipe.ts +14 -0
- package/src/app/core/providers/dayjs.ts +16 -0
- package/src/app/core/services/dict.en.ts +0 -0
- package/src/app/core/services/dictionary.service.ts +12 -0
- package/src/app/core/services/localstorage.token.ts +82 -0
- package/src/app/core/services/password-generator.service.ts +39 -0
- package/src/app/core/services/relay-websocket.service.ts +268 -0
- package/src/app/core/services/timespan-literals.service.ts +25 -0
- package/src/app/core/states/app-auth.state.ts +87 -0
- package/src/app/core/states/backups.state.ts +71 -0
- package/src/app/core/states/relayconfig.state.ts +23 -0
- package/src/app/core/states/sysinfo.state.ts +31 -0
- package/src/app/core/states/tasks.state.ts +34 -0
- package/src/app/core/types/subscribed.ts +7 -0
- package/src/app/core/validators/custom.validators.ts +120 -0
- package/src/app/create-edit-backup/create-edit-backup.component.html +28 -0
- package/src/app/create-edit-backup/create-edit-backup.component.scss +15 -0
- package/src/app/create-edit-backup/create-edit-backup.component.ts +33 -0
- package/src/app/create-edit-backup/create-edit-backup.state.ts +582 -0
- package/src/app/create-edit-backup/destination/destination.component.html +367 -0
- package/src/app/create-edit-backup/destination/destination.component.scss +85 -0
- package/src/app/create-edit-backup/destination/destination.component.ts +249 -0
- package/src/app/create-edit-backup/destination/destination.config.ts +103 -0
- package/src/app/create-edit-backup/destination/destination.mapper.ts +177 -0
- package/src/app/create-edit-backup/general/general.component.html +108 -0
- package/src/app/create-edit-backup/general/general.component.scss +34 -0
- package/src/app/create-edit-backup/general/general.component.ts +136 -0
- package/src/app/create-edit-backup/options/options.component.html +95 -0
- package/src/app/create-edit-backup/options/options.component.scss +42 -0
- package/src/app/create-edit-backup/options/options.component.ts +113 -0
- package/src/app/create-edit-backup/schedule/schedule.component.html +102 -0
- package/src/app/create-edit-backup/schedule/schedule.component.scss +38 -0
- package/src/app/create-edit-backup/schedule/schedule.component.ts +137 -0
- package/src/app/create-edit-backup/source-data/source-data.component.html +93 -0
- package/src/app/create-edit-backup/source-data/source-data.component.scss +41 -0
- package/src/app/create-edit-backup/source-data/source-data.component.ts +114 -0
- package/src/app/home/backup.const.ts +167 -0
- package/src/app/home/home.component.html +98 -0
- package/src/app/home/home.component.scss +88 -0
- package/src/app/home/home.component.ts +54 -0
- package/src/app/layout/layout.component.html +64 -0
- package/src/app/layout/layout.component.scss +24 -0
- package/src/app/layout/layout.component.ts +51 -0
- package/src/app/layout/layout.state.ts +70 -0
- package/src/app/login/login.component.html +12 -0
- package/src/app/login/login.component.scss +25 -0
- package/src/app/login/login.component.ts +34 -0
- package/src/app/logout/logout.component.html +1 -0
- package/src/app/logout/logout.component.scss +3 -0
- package/src/app/logout/logout.component.ts +18 -0
- package/src/app/restore/restore.component.html +56 -0
- package/src/app/restore/restore.component.scss +37 -0
- package/src/app/restore/restore.component.ts +55 -0
- package/src/app/restore-flow/options/options.component.html +57 -0
- package/src/app/restore-flow/options/options.component.scss +16 -0
- package/src/app/restore-flow/options/options.component.ts +58 -0
- package/src/app/restore-flow/restore-flow.component.html +14 -0
- package/src/app/restore-flow/restore-flow.component.scss +15 -0
- package/src/app/restore-flow/restore-flow.component.ts +23 -0
- package/src/app/restore-flow/restore-flow.state.ts +120 -0
- package/src/app/restore-flow/select-files/select-files.component.html +42 -0
- package/src/app/restore-flow/select-files/select-files.component.scss +16 -0
- package/src/app/restore-flow/select-files/select-files.component.ts +129 -0
- package/src/app/settings/settings.component.html +256 -0
- package/src/app/settings/settings.component.scss +106 -0
- package/src/app/settings/settings.component.ts +475 -0
- package/src/assets/duplicati-logo.png +0 -0
- package/src/assets/duplicati-logo.svg +10 -0
- package/src/assets/favicon.ico +0 -0
- package/src/assets/images/backup.png +0 -0
- package/src/assets/images/dark-theme.png +0 -0
- package/src/assets/images/folder.png +0 -0
- package/src/assets/images/light-theme.png +0 -0
- package/src/assets/images/new-backup.png +0 -0
- package/src/assets/images/restore.png +0 -0
- package/src/assets/images/system-theme.png +0 -0
- package/src/assets/spk.css +33 -0
- package/src/assets/spk.woff2 +0 -0
- package/src/environments/environment-token.ts +4 -0
- package/src/environments/environment.prod.ts +6 -0
- package/src/environments/environment.ts +6 -0
- package/src/index.html +15 -0
- package/src/main.ts +6 -0
- package/src/proxy.conf.mjs +6 -0
- package/src/styles.scss +41 -0
- package/tsconfig.app.json +15 -0
- package/tsconfig.json +30 -0
package/.dockerignore
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Build and Deploy Angular Library
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main # Or your main branch name
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-and-deploy:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout Code
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 1 # shallow clone
|
|
17
|
+
|
|
18
|
+
- name: Setup Bun
|
|
19
|
+
uses: oven-sh/setup-bun@v2
|
|
20
|
+
|
|
21
|
+
- name: Deepen Clone
|
|
22
|
+
run: git fetch --unshallow
|
|
23
|
+
|
|
24
|
+
- name: Setup Node.js
|
|
25
|
+
uses: actions/setup-node@v4
|
|
26
|
+
with:
|
|
27
|
+
node-version: '20'
|
|
28
|
+
cache: 'npm'
|
|
29
|
+
|
|
30
|
+
- name: Install Dependencies
|
|
31
|
+
run: npm ci
|
|
32
|
+
|
|
33
|
+
- name: Check if package.json was modified
|
|
34
|
+
id: check_package_json_change
|
|
35
|
+
run: |
|
|
36
|
+
if git rev-list --count HEAD > 1; then
|
|
37
|
+
changed=$(if git diff --name-only HEAD^ HEAD | grep 'package.json' >/dev/null; then echo 'true'; else echo 'false'; fi)
|
|
38
|
+
else
|
|
39
|
+
changed="false"
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# Write the output to the environment file
|
|
43
|
+
echo "changed=$changed" >> $GITHUB_ENV
|
|
44
|
+
|
|
45
|
+
- name: Build Library
|
|
46
|
+
if: env.changed == 'true' && github.ref == 'refs/heads/main'
|
|
47
|
+
run: npm run build:prod
|
|
48
|
+
|
|
49
|
+
- name: Create package.json
|
|
50
|
+
run: npm run gen:package-json
|
|
51
|
+
|
|
52
|
+
- name: Publish (if package.json changed)
|
|
53
|
+
if: env.changed == 'true' && github.ref == 'refs/heads/main'
|
|
54
|
+
working-directory: ./dist/ngclient/browser
|
|
55
|
+
run: |
|
|
56
|
+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
|
57
|
+
npm publish --access public
|
|
58
|
+
env:
|
|
59
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # Your NPM token from secrets
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"configurations": [
|
|
5
|
+
{
|
|
6
|
+
"name": "ng serve",
|
|
7
|
+
"type": "chrome",
|
|
8
|
+
"request": "launch",
|
|
9
|
+
"preLaunchTask": "npm: start",
|
|
10
|
+
"url": "http://localhost:4200/"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"tasks": [
|
|
5
|
+
{
|
|
6
|
+
"type": "npm",
|
|
7
|
+
"script": "start",
|
|
8
|
+
"isBackground": true,
|
|
9
|
+
"problemMatcher": {
|
|
10
|
+
"owner": "typescript",
|
|
11
|
+
"pattern": "$tsc",
|
|
12
|
+
"background": {
|
|
13
|
+
"activeOnStart": true,
|
|
14
|
+
"beginsPattern": {
|
|
15
|
+
"regexp": "(.*?)"
|
|
16
|
+
},
|
|
17
|
+
"endsPattern": {
|
|
18
|
+
"regexp": "bundle generation complete"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
FROM node:20-bullseye-slim as base
|
|
2
|
+
|
|
3
|
+
# Create app directory
|
|
4
|
+
WORKDIR /app
|
|
5
|
+
|
|
6
|
+
RUN apt-get update && \
|
|
7
|
+
apt-get install -y curl unzip && \
|
|
8
|
+
rm -rf /var/lib/apt/lists/*
|
|
9
|
+
|
|
10
|
+
RUN npm install -g @angular/cli@18
|
|
11
|
+
# RUN npm install -g bun@canary
|
|
12
|
+
RUN curl -fsSL https://bun.sh/install | bash
|
|
13
|
+
ENV PATH="/root/.bun/bin:${PATH}"
|
|
14
|
+
|
|
15
|
+
RUN bun --version
|
|
16
|
+
RUN ng version
|
|
17
|
+
|
|
18
|
+
# Copy lock files
|
|
19
|
+
COPY package.json package-lock.json bun.lockb ./
|
|
20
|
+
|
|
21
|
+
# Define the build-time variable with a default value
|
|
22
|
+
ARG BUILD_ENV=dev
|
|
23
|
+
|
|
24
|
+
# Set the build-time variable as an environment variable
|
|
25
|
+
ENV BUILD_ENV=${BUILD_ENV}
|
|
26
|
+
|
|
27
|
+
# Install app dependencies
|
|
28
|
+
RUN bun i
|
|
29
|
+
|
|
30
|
+
# Bundle app source
|
|
31
|
+
COPY . /app
|
|
32
|
+
|
|
33
|
+
# Use the environment variable to conditionally run the build command
|
|
34
|
+
RUN if [ "$BUILD_ENV" = "prod" ]; then \
|
|
35
|
+
bun run build:prod; \
|
|
36
|
+
else \
|
|
37
|
+
bun run build:dev; \
|
|
38
|
+
fi
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Duplicati
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# DuplicatiClient
|
|
2
|
+
|
|
3
|
+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.2.0.
|
|
4
|
+
|
|
5
|
+
## Development server
|
|
6
|
+
|
|
7
|
+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
|
|
8
|
+
|
|
9
|
+
## Code scaffolding
|
|
10
|
+
|
|
11
|
+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
|
12
|
+
|
|
13
|
+
## Build
|
|
14
|
+
|
|
15
|
+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
16
|
+
|
|
17
|
+
## Running unit tests
|
|
18
|
+
|
|
19
|
+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
20
|
+
|
|
21
|
+
## Running end-to-end tests
|
|
22
|
+
|
|
23
|
+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
|
24
|
+
|
|
25
|
+
## Further help
|
|
26
|
+
|
|
27
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
package/angular.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "projects",
|
|
5
|
+
"projects": {
|
|
6
|
+
"ngclient": {
|
|
7
|
+
"projectType": "application",
|
|
8
|
+
"schematics": {
|
|
9
|
+
"@schematics/angular:component": {
|
|
10
|
+
"inlineTemplate": true,
|
|
11
|
+
"inlineStyle": true,
|
|
12
|
+
"style": "scss",
|
|
13
|
+
"skipTests": true
|
|
14
|
+
},
|
|
15
|
+
"@schematics/angular:class": {
|
|
16
|
+
"skipTests": true
|
|
17
|
+
},
|
|
18
|
+
"@schematics/angular:directive": {
|
|
19
|
+
"skipTests": true
|
|
20
|
+
},
|
|
21
|
+
"@schematics/angular:guard": {
|
|
22
|
+
"skipTests": true
|
|
23
|
+
},
|
|
24
|
+
"@schematics/angular:interceptor": {
|
|
25
|
+
"skipTests": true
|
|
26
|
+
},
|
|
27
|
+
"@schematics/angular:pipe": {
|
|
28
|
+
"skipTests": true
|
|
29
|
+
},
|
|
30
|
+
"@schematics/angular:resolver": {
|
|
31
|
+
"skipTests": true
|
|
32
|
+
},
|
|
33
|
+
"@schematics/angular:service": {
|
|
34
|
+
"skipTests": true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"root": "",
|
|
38
|
+
"sourceRoot": "src",
|
|
39
|
+
"prefix": "app",
|
|
40
|
+
"architect": {
|
|
41
|
+
"build": {
|
|
42
|
+
"builder": "@angular-devkit/build-angular:application",
|
|
43
|
+
"options": {
|
|
44
|
+
"outputPath": "dist/ngclient",
|
|
45
|
+
"index": "src/index.html",
|
|
46
|
+
"browser": "src/main.ts",
|
|
47
|
+
"polyfills": [],
|
|
48
|
+
"tsConfig": "tsconfig.app.json",
|
|
49
|
+
"inlineStyleLanguage": "scss",
|
|
50
|
+
"assets": [
|
|
51
|
+
"src/assets",
|
|
52
|
+
{
|
|
53
|
+
"glob": "**/*",
|
|
54
|
+
"input": "./node_modules/@sparkle-ui/core/assets",
|
|
55
|
+
"output": "./sparkle-ui-assets/"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"styles": ["src/styles.scss"],
|
|
59
|
+
"scripts": []
|
|
60
|
+
},
|
|
61
|
+
"configurations": {
|
|
62
|
+
"production": {
|
|
63
|
+
"outputHashing": "all",
|
|
64
|
+
"fileReplacements": [
|
|
65
|
+
{
|
|
66
|
+
"replace": "src/environments/environment.ts",
|
|
67
|
+
"with": "src/environments/environment.prod.ts"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"development": {
|
|
72
|
+
"optimization": false,
|
|
73
|
+
"extractLicenses": false,
|
|
74
|
+
"sourceMap": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"defaultConfiguration": "production"
|
|
78
|
+
},
|
|
79
|
+
"serve": {
|
|
80
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
81
|
+
"configurations": {
|
|
82
|
+
"production": {
|
|
83
|
+
"buildTarget": "ngclient:build:production"
|
|
84
|
+
},
|
|
85
|
+
"development": {
|
|
86
|
+
"buildTarget": "ngclient:build:development",
|
|
87
|
+
"proxyConfig": "src/proxy.conf.mjs"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"defaultConfiguration": "development"
|
|
91
|
+
},
|
|
92
|
+
"extract-i18n": {
|
|
93
|
+
"builder": "@angular-devkit/build-angular:extract-i18n"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
package/bun.lockb
ADDED
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from '@hey-api/openapi-ts';
|
|
2
|
+
|
|
3
|
+
const localFile = false; // && './swagger-orgid-tokens.json';
|
|
4
|
+
const apiInput = 'http://localhost:8200/swagger/v1/swagger.json';
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
client: 'angular',
|
|
7
|
+
input: localFile || apiInput,
|
|
8
|
+
output: 'src/app/core/openapi',
|
|
9
|
+
schemas: true,
|
|
10
|
+
services: {
|
|
11
|
+
asClass: true,
|
|
12
|
+
},
|
|
13
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@duplicati/ngclient",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"contributors": [
|
|
6
|
+
"sp90",
|
|
7
|
+
"kenkendk"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"gen:package-json": "bun scripts/generate-package-json.ts",
|
|
11
|
+
"gen:font": "bunx sparkle-fg --src='./src' --out='./src/assets' --rootPath='/assets/'",
|
|
12
|
+
"watch:font": "bunx sparkle-fg --src='./src' --out='./src/assets' --rootPath='/assets/' --watch",
|
|
13
|
+
"ng": "ng",
|
|
14
|
+
"start": "bun run watch:font & ng serve",
|
|
15
|
+
"build": "bun run gen:font & ng build",
|
|
16
|
+
"build:dev": "bun run gen:font && ng build --configuration development",
|
|
17
|
+
"build:prod": "bun run gen:font & ng build --configuration production",
|
|
18
|
+
"watch": "bun run watch:font & ng build --watch --configuration development",
|
|
19
|
+
"gen:openapi": "openapi-ts"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@angular/animations": "^18.2.0",
|
|
23
|
+
"@angular/cdk": "^18.2.0",
|
|
24
|
+
"@angular/common": "^18.2.0",
|
|
25
|
+
"@angular/compiler": "^18.2.0",
|
|
26
|
+
"@angular/core": "^18.2.0",
|
|
27
|
+
"@angular/forms": "^18.2.0",
|
|
28
|
+
"@angular/material": "^18.2.0",
|
|
29
|
+
"@angular/platform-browser": "^18.2.0",
|
|
30
|
+
"@angular/platform-browser-dynamic": "^18.2.0",
|
|
31
|
+
"@angular/router": "^18.2.0",
|
|
32
|
+
"@sparkle-ui/core": "^0.1.103",
|
|
33
|
+
"dayjs": "^1.11.13",
|
|
34
|
+
"ngxtension": "^4.0.0",
|
|
35
|
+
"rxjs": "~7.8.0",
|
|
36
|
+
"tslib": "^2.3.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@angular-devkit/build-angular": "^18.2.0",
|
|
40
|
+
"@angular/cli": "^18.2.0",
|
|
41
|
+
"@angular/compiler-cli": "^18.2.0",
|
|
42
|
+
"@hey-api/openapi-ts": "^0.52.9",
|
|
43
|
+
"prettier": "^3.3.3",
|
|
44
|
+
"typescript": "~5.5.2"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import packageJson from '../package.json';
|
|
2
|
+
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import { write } from 'bun';
|
|
5
|
+
|
|
6
|
+
const newPackageJson = {
|
|
7
|
+
version: packageJson.version,
|
|
8
|
+
name: packageJson.name,
|
|
9
|
+
license: packageJson.license,
|
|
10
|
+
contributors: packageJson.contributors,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
await write('./dist/ngclient/browser/package.json', JSON.stringify(newPackageJson, null, 2));
|
|
14
|
+
|
|
15
|
+
console.log('package.json generated');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<div class="nav">
|
|
2
|
+
<button spk-button class="raised" routerLink="/about/general" routerLinkActive="primary">General</button>
|
|
3
|
+
|
|
4
|
+
<button spk-button class="raised" routerLink="/about/changelog" routerLinkActive="primary">Changelog</button>
|
|
5
|
+
|
|
6
|
+
<button spk-button class="raised" routerLink="/about/libraries" routerLinkActive="primary">Libraries</button>
|
|
7
|
+
|
|
8
|
+
<button spk-button class="raised" routerLink="/about/system-info" routerLinkActive="primary">System info</button>
|
|
9
|
+
|
|
10
|
+
<button spk-button class="raised" routerLink="/about/logs" routerLinkActive="primary">Logs</button>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<section>
|
|
14
|
+
<router-outlet />
|
|
15
|
+
</section>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use '@sparkle-ui/core/styles/helpers' as *;
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 0;
|
|
7
|
+
padding: p2r(40);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.nav {
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: p2r(8);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
section {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
padding: p2r(32 0);
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
|
|
3
|
+
import { SparkleButtonComponent } from '@sparkle-ui/core';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-about',
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [SparkleButtonComponent, RouterOutlet, RouterLink, RouterLinkActive],
|
|
9
|
+
templateUrl: './about.component.html',
|
|
10
|
+
styleUrl: './about.component.scss',
|
|
11
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
+
})
|
|
13
|
+
export default class AboutComponent {}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JsonPipe } from '@angular/common';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
|
3
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { DuplicatiServerService } from '../../core/openapi';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-changelog',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [JsonPipe],
|
|
10
|
+
templateUrl: './changelog.component.html',
|
|
11
|
+
styleUrl: './changelog.component.scss',
|
|
12
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
+
})
|
|
14
|
+
export default class ChangelogComponent {
|
|
15
|
+
#dupServer = inject(DuplicatiServerService);
|
|
16
|
+
|
|
17
|
+
changelog = toSignal(this.#dupServer.getApiV1Changelog());
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use '@sparkle-ui/core/styles/helpers' as *;
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
position: relative;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
h3 {
|
|
9
|
+
font: var(--title-30);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
section {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: p2r(16);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
spk-progress-bar {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
right: 0;
|
|
23
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { JsonPipe } from '@angular/common';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';
|
|
3
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
5
|
+
import { SparkleProgressBarComponent } from '@sparkle-ui/core';
|
|
6
|
+
import { finalize, map } from 'rxjs';
|
|
7
|
+
import { DuplicatiServerService } from '../../core/openapi';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'app-general',
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [JsonPipe, SparkleProgressBarComponent],
|
|
13
|
+
templateUrl: './general.component.html',
|
|
14
|
+
styleUrl: './general.component.scss',
|
|
15
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
+
})
|
|
17
|
+
export default class GeneralComponent {
|
|
18
|
+
#sanitizer = inject(DomSanitizer);
|
|
19
|
+
#dupServer = inject(DuplicatiServerService);
|
|
20
|
+
|
|
21
|
+
isLoading = signal(true);
|
|
22
|
+
generalInfo = toSignal(
|
|
23
|
+
this.#dupServer.getApiV1Acknowledgements().pipe(
|
|
24
|
+
map((x) =>
|
|
25
|
+
x.Acknowledgements ? this.#sanitizer.bypassSecurityTrustHtml(x.Acknowledgements.replace(/\r/g, '\n')) : ''
|
|
26
|
+
),
|
|
27
|
+
finalize(() => this.isLoading.set(false))
|
|
28
|
+
)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JsonPipe } from '@angular/common';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
|
3
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { DuplicatiServerService } from '../../core/openapi';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-libraries',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [JsonPipe],
|
|
10
|
+
templateUrl: './libraries.component.html',
|
|
11
|
+
styleUrl: './libraries.component.scss',
|
|
12
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
+
})
|
|
14
|
+
export default class LibrariesComponent {
|
|
15
|
+
#dupServer = inject(DuplicatiServerService);
|
|
16
|
+
|
|
17
|
+
licenses = toSignal(this.#dupServer.getApiV1Licenses());
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JsonPipe } from '@angular/common';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
|
3
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { DuplicatiServerService } from '../../core/openapi';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-logs',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [JsonPipe],
|
|
10
|
+
templateUrl: './logs.component.html',
|
|
11
|
+
styleUrl: './logs.component.scss',
|
|
12
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
+
})
|
|
14
|
+
export default class LogsComponent {
|
|
15
|
+
#dupServer = inject(DuplicatiServerService);
|
|
16
|
+
|
|
17
|
+
logs = toSignal(this.#dupServer.getApiV1LogdataLog());
|
|
18
|
+
}
|