@duplicati/ngclient 0.0.1 → 0.0.6

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.
Files changed (197) hide show
  1. package/chunk-22HCWJS5.js +1 -0
  2. package/chunk-24PLBY6C.js +1 -0
  3. package/chunk-3MM4GLBS.js +1 -0
  4. package/chunk-3MTW6FJP.js +1 -0
  5. package/chunk-4FK75Z4C.js +1 -0
  6. package/chunk-4MMHXTNF.js +1 -0
  7. package/chunk-57M4MADC.js +1 -0
  8. package/chunk-6XUWDRDE.js +1 -0
  9. package/chunk-77NTMJCT.js +1 -0
  10. package/chunk-7X6SBNMU.js +1 -0
  11. package/chunk-A66Z6362.js +1 -0
  12. package/chunk-AC6VDRLC.js +1 -0
  13. package/chunk-BNNZKRIC.js +1 -0
  14. package/chunk-CKPPU3GS.js +2 -0
  15. package/chunk-DYANEO5K.js +1 -0
  16. package/chunk-GJTW7UUU.js +1 -0
  17. package/chunk-GMANGOGH.js +1 -0
  18. package/chunk-I6QIKK6M.js +1 -0
  19. package/chunk-IOWSWUHM.js +1 -0
  20. package/chunk-IQSBPGVL.js +1 -0
  21. package/chunk-L47VTK2X.js +1 -0
  22. package/chunk-LVLU6MPQ.js +1 -0
  23. package/chunk-N5US3SKW.js +1 -0
  24. package/chunk-NIMPOFJV.js +1 -0
  25. package/chunk-ORDBF5MR.js +8 -0
  26. package/chunk-PH6AAOK4.js +1 -0
  27. package/chunk-PY5HJ5U2.js +1 -0
  28. package/chunk-QQDSFTZV.js +1 -0
  29. package/chunk-RANWFSNY.js +1 -0
  30. package/chunk-RLJJFBQ2.js +1 -0
  31. package/chunk-S76TN27U.js +1 -0
  32. package/chunk-UTPCUNNU.js +1 -0
  33. package/chunk-VPEVWKGB.js +1 -0
  34. package/chunk-VVUYO7E4.js +1 -0
  35. package/chunk-WLI4RZYL.js +1 -0
  36. package/chunk-X2NZ4CJ5.js +2 -0
  37. package/chunk-XU7PNEZO.js +1 -0
  38. package/chunk-XYJYUMYL.js +1 -0
  39. package/chunk-YRXI477O.js +1 -0
  40. package/chunk-ZD3JEKWI.js +1 -0
  41. package/index.html +15 -0
  42. package/main-5KJRELCN.js +1 -0
  43. package/package.json +3 -40
  44. package/sparkle-ui-assets/fonts/InterTight-VariableFont_wght.ttf +0 -0
  45. package/sparkle-ui-assets/fonts/InterTight-VariableFont_wght.woff2 +0 -0
  46. package/styles-6W7ZCKNM.css +1 -0
  47. package/.dockerignore +0 -13
  48. package/.github/workflows/npm-publish.yml +0 -59
  49. package/.prettierignore +0 -13
  50. package/.prettierrc +0 -12
  51. package/.vscode/extensions.json +0 -4
  52. package/.vscode/launch.json +0 -13
  53. package/.vscode/settings.json +0 -8
  54. package/.vscode/tasks.json +0 -24
  55. package/Dockerfile +0 -38
  56. package/LICENSE +0 -21
  57. package/README.md +0 -27
  58. package/angular.json +0 -98
  59. package/bun.lockb +0 -0
  60. package/openapi-ts.config.ts +0 -13
  61. package/scripts/generate-package-json.ts +0 -15
  62. package/src/app/about/about.component.html +0 -15
  63. package/src/app/about/about.component.scss +0 -19
  64. package/src/app/about/about.component.ts +0 -13
  65. package/src/app/about/changelog/changelog.component.html +0 -3
  66. package/src/app/about/changelog/changelog.component.scss +0 -7
  67. package/src/app/about/changelog/changelog.component.ts +0 -18
  68. package/src/app/about/general/general.component.html +0 -9
  69. package/src/app/about/general/general.component.scss +0 -23
  70. package/src/app/about/general/general.component.ts +0 -30
  71. package/src/app/about/libraries/libraries.component.html +0 -3
  72. package/src/app/about/libraries/libraries.component.scss +0 -7
  73. package/src/app/about/libraries/libraries.component.ts +0 -18
  74. package/src/app/about/logs/logs.component.html +0 -5
  75. package/src/app/about/logs/logs.component.scss +0 -7
  76. package/src/app/about/logs/logs.component.ts +0 -18
  77. package/src/app/about/system-info/system-info.component.html +0 -3
  78. package/src/app/about/system-info/system-info.component.scss +0 -7
  79. package/src/app/about/system-info/system-info.component.ts +0 -17
  80. package/src/app/add-backup/add-backup.component.html +0 -29
  81. package/src/app/add-backup/add-backup.component.scss +0 -38
  82. package/src/app/add-backup/add-backup.component.ts +0 -14
  83. package/src/app/app.component.ts +0 -35
  84. package/src/app/app.config.ts +0 -23
  85. package/src/app/app.routes.ts +0 -121
  86. package/src/app/core/components/file-tree/file-tree.component.html +0 -87
  87. package/src/app/core/components/file-tree/file-tree.component.scss +0 -80
  88. package/src/app/core/components/file-tree/file-tree.component.ts +0 -485
  89. package/src/app/core/components/logo/logo.component.html +0 -22
  90. package/src/app/core/components/logo/logo.component.scss +0 -12
  91. package/src/app/core/components/logo/logo.component.ts +0 -11
  92. package/src/app/core/components/status-bar/status-bar.component.html +0 -38
  93. package/src/app/core/components/status-bar/status-bar.component.scss +0 -27
  94. package/src/app/core/components/status-bar/status-bar.component.ts +0 -33
  95. package/src/app/core/components/status-bar/status-bar.state.ts +0 -182
  96. package/src/app/core/components/toggle-card/toggle-card.component.html +0 -11
  97. package/src/app/core/components/toggle-card/toggle-card.component.scss +0 -49
  98. package/src/app/core/components/toggle-card/toggle-card.component.ts +0 -28
  99. package/src/app/core/interceptors/http.interceptor.ts +0 -69
  100. package/src/app/core/interceptors/websocket.interceptor.ts +0 -66
  101. package/src/app/core/openapi/core/ApiError.ts +0 -21
  102. package/src/app/core/openapi/core/ApiRequestOptions.ts +0 -21
  103. package/src/app/core/openapi/core/ApiResult.ts +0 -7
  104. package/src/app/core/openapi/core/OpenAPI.ts +0 -55
  105. package/src/app/core/openapi/core/request.ts +0 -337
  106. package/src/app/core/openapi/index.ts +0 -6
  107. package/src/app/core/openapi/schemas.gen.ts +0 -3611
  108. package/src/app/core/openapi/services.gen.ts +0 -1460
  109. package/src/app/core/openapi/types.gen.ts +0 -1510
  110. package/src/app/core/pipes/duration.pipe.ts +0 -27
  111. package/src/app/core/pipes/relative-time.pipe.ts +0 -14
  112. package/src/app/core/providers/dayjs.ts +0 -16
  113. package/src/app/core/services/dict.en.ts +0 -0
  114. package/src/app/core/services/dictionary.service.ts +0 -12
  115. package/src/app/core/services/localstorage.token.ts +0 -82
  116. package/src/app/core/services/password-generator.service.ts +0 -39
  117. package/src/app/core/services/relay-websocket.service.ts +0 -268
  118. package/src/app/core/services/timespan-literals.service.ts +0 -25
  119. package/src/app/core/states/app-auth.state.ts +0 -87
  120. package/src/app/core/states/backups.state.ts +0 -71
  121. package/src/app/core/states/relayconfig.state.ts +0 -23
  122. package/src/app/core/states/sysinfo.state.ts +0 -31
  123. package/src/app/core/states/tasks.state.ts +0 -34
  124. package/src/app/core/types/subscribed.ts +0 -7
  125. package/src/app/core/validators/custom.validators.ts +0 -120
  126. package/src/app/create-edit-backup/create-edit-backup.component.html +0 -28
  127. package/src/app/create-edit-backup/create-edit-backup.component.scss +0 -15
  128. package/src/app/create-edit-backup/create-edit-backup.component.ts +0 -33
  129. package/src/app/create-edit-backup/create-edit-backup.state.ts +0 -582
  130. package/src/app/create-edit-backup/destination/destination.component.html +0 -367
  131. package/src/app/create-edit-backup/destination/destination.component.scss +0 -85
  132. package/src/app/create-edit-backup/destination/destination.component.ts +0 -249
  133. package/src/app/create-edit-backup/destination/destination.config.ts +0 -103
  134. package/src/app/create-edit-backup/destination/destination.mapper.ts +0 -177
  135. package/src/app/create-edit-backup/general/general.component.html +0 -108
  136. package/src/app/create-edit-backup/general/general.component.scss +0 -34
  137. package/src/app/create-edit-backup/general/general.component.ts +0 -136
  138. package/src/app/create-edit-backup/options/options.component.html +0 -95
  139. package/src/app/create-edit-backup/options/options.component.scss +0 -42
  140. package/src/app/create-edit-backup/options/options.component.ts +0 -113
  141. package/src/app/create-edit-backup/schedule/schedule.component.html +0 -102
  142. package/src/app/create-edit-backup/schedule/schedule.component.scss +0 -38
  143. package/src/app/create-edit-backup/schedule/schedule.component.ts +0 -137
  144. package/src/app/create-edit-backup/source-data/source-data.component.html +0 -93
  145. package/src/app/create-edit-backup/source-data/source-data.component.scss +0 -41
  146. package/src/app/create-edit-backup/source-data/source-data.component.ts +0 -114
  147. package/src/app/home/backup.const.ts +0 -167
  148. package/src/app/home/home.component.html +0 -98
  149. package/src/app/home/home.component.scss +0 -88
  150. package/src/app/home/home.component.ts +0 -54
  151. package/src/app/layout/layout.component.html +0 -64
  152. package/src/app/layout/layout.component.scss +0 -24
  153. package/src/app/layout/layout.component.ts +0 -51
  154. package/src/app/layout/layout.state.ts +0 -70
  155. package/src/app/login/login.component.html +0 -12
  156. package/src/app/login/login.component.scss +0 -25
  157. package/src/app/login/login.component.ts +0 -34
  158. package/src/app/logout/logout.component.html +0 -1
  159. package/src/app/logout/logout.component.scss +0 -3
  160. package/src/app/logout/logout.component.ts +0 -18
  161. package/src/app/restore/restore.component.html +0 -56
  162. package/src/app/restore/restore.component.scss +0 -37
  163. package/src/app/restore/restore.component.ts +0 -55
  164. package/src/app/restore-flow/options/options.component.html +0 -57
  165. package/src/app/restore-flow/options/options.component.scss +0 -16
  166. package/src/app/restore-flow/options/options.component.ts +0 -58
  167. package/src/app/restore-flow/restore-flow.component.html +0 -14
  168. package/src/app/restore-flow/restore-flow.component.scss +0 -15
  169. package/src/app/restore-flow/restore-flow.component.ts +0 -23
  170. package/src/app/restore-flow/restore-flow.state.ts +0 -120
  171. package/src/app/restore-flow/select-files/select-files.component.html +0 -42
  172. package/src/app/restore-flow/select-files/select-files.component.scss +0 -16
  173. package/src/app/restore-flow/select-files/select-files.component.ts +0 -129
  174. package/src/app/settings/settings.component.html +0 -256
  175. package/src/app/settings/settings.component.scss +0 -106
  176. package/src/app/settings/settings.component.ts +0 -475
  177. package/src/environments/environment-token.ts +0 -4
  178. package/src/environments/environment.prod.ts +0 -6
  179. package/src/environments/environment.ts +0 -6
  180. package/src/index.html +0 -15
  181. package/src/main.ts +0 -6
  182. package/src/proxy.conf.mjs +0 -6
  183. package/src/styles.scss +0 -41
  184. package/tsconfig.app.json +0 -15
  185. package/tsconfig.json +0 -30
  186. /package/{src/assets → assets}/duplicati-logo.png +0 -0
  187. /package/{src/assets → assets}/duplicati-logo.svg +0 -0
  188. /package/{src/assets → assets}/favicon.ico +0 -0
  189. /package/{src/assets → assets}/images/backup.png +0 -0
  190. /package/{src/assets → assets}/images/dark-theme.png +0 -0
  191. /package/{src/assets → assets}/images/folder.png +0 -0
  192. /package/{src/assets → assets}/images/light-theme.png +0 -0
  193. /package/{src/assets → assets}/images/new-backup.png +0 -0
  194. /package/{src/assets → assets}/images/restore.png +0 -0
  195. /package/{src/assets → assets}/images/system-theme.png +0 -0
  196. /package/{src/assets → assets}/spk.css +0 -0
  197. /package/{src/assets → assets}/spk.woff2 +0 -0
@@ -1,475 +0,0 @@
1
- import { JsonPipe } from '@angular/common';
2
- import { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';
3
- import { toSignal } from '@angular/core/rxjs-interop';
4
- import { FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- import {
6
- SparkleButtonComponent,
7
- SparkleButtonGroupComponent,
8
- SparkleFormFieldComponent,
9
- SparkleIconComponent,
10
- SparkleRadioComponent,
11
- SparkleSelectComponent,
12
- } from '@sparkle-ui/core';
13
- import { derivedFrom } from 'ngxtension/derived-from';
14
- import { map, pipe, startWith } from 'rxjs';
15
- import StatusBarComponent from '../core/components/status-bar/status-bar.component';
16
- import { DuplicatiServerService, RemoteControlStatusOutput } from '../core/openapi';
17
- import { SysinfoState } from '../core/states/sysinfo.state';
18
- import { LayoutState } from '../layout/layout.state';
19
-
20
- const fb = new FormBuilder();
21
-
22
- type UpdateChannel = '' | 'stable' | 'beta' | 'experimental' | 'canary';
23
- // type TimeTypes = 'Hours' | 'Minutes' | 'Seconds';
24
-
25
- // const TimeTypeMap: { [key: string]: TimeTypes } = {
26
- // h: 'Hours',
27
- // m: 'Minutes',
28
- // s: 'Seconds',
29
- // };
30
-
31
- const TIME_OPTIONS = [
32
- {
33
- value: 's',
34
- label: 'Seconds',
35
- },
36
- {
37
- value: 'm',
38
- label: 'Minutes',
39
- },
40
- {
41
- value: 'h',
42
- label: 'Hours',
43
- },
44
- ] as const;
45
-
46
- type TimeTypes = (typeof TIME_OPTIONS)[number]['value'];
47
-
48
- const LANGUAGES = [
49
- {
50
- value: 'en',
51
- label: 'English',
52
- },
53
- {
54
- value: 'fr',
55
- label: 'French',
56
- },
57
- {
58
- value: 'de',
59
- label: 'German',
60
- },
61
- {
62
- value: 'es',
63
- label: 'Spanish',
64
- },
65
- {
66
- value: 'it',
67
- label: 'Italian',
68
- },
69
- ];
70
-
71
- type LangType = (typeof LANGUAGES)[number];
72
-
73
- const USAGE_STATISTICS_OPTIONS = [
74
- {
75
- value: '',
76
- label: 'System default (information)',
77
- },
78
- {
79
- value: 'information',
80
- label: 'Usage statistics, warnings, errors, and crashes',
81
- },
82
- {
83
- value: 'warning',
84
- label: 'Warnings, errors and crashes',
85
- },
86
- {
87
- value: 'error',
88
- label: 'Errors and crashes',
89
- },
90
- {
91
- value: 'crash',
92
- label: 'Crashes only',
93
- },
94
- {
95
- value: 'none',
96
- label: 'None / disabled',
97
- },
98
- ];
99
-
100
- type UsageStatisticsType = (typeof USAGE_STATISTICS_OPTIONS)[number];
101
- type RemoteControlState =
102
- | 'connected'
103
- | 'registered'
104
- | 'registering'
105
- | 'registeringfaulted'
106
- | 'enabled'
107
- | 'disabled'
108
- | 'inactive'
109
- | 'unknown';
110
-
111
- type Timeout = ReturnType<typeof setTimeout>;
112
-
113
- @Component({
114
- selector: 'app-settings',
115
- standalone: true,
116
- imports: [
117
- FormsModule,
118
- ReactiveFormsModule,
119
-
120
- StatusBarComponent,
121
- SparkleButtonComponent,
122
- SparkleIconComponent,
123
- SparkleRadioComponent,
124
- SparkleFormFieldComponent,
125
- SparkleButtonGroupComponent,
126
- SparkleSelectComponent,
127
-
128
- JsonPipe,
129
- ],
130
- templateUrl: './settings.component.html',
131
- styleUrl: './settings.component.scss',
132
- changeDetection: ChangeDetectionStrategy.OnPush,
133
- })
134
- export default class SettingsComponent {
135
- #layoutState = inject(LayoutState);
136
- #sysinfo = inject(SysinfoState);
137
- #dupServer = inject(DuplicatiServerService);
138
-
139
- sysinfo = this.#sysinfo.systemInfo;
140
-
141
- isDarkMode = this.#layoutState.isDarkMode;
142
- editAs = signal<'list' | 'text'>('list');
143
- settingsForm = fb.group({
144
- pauseSettings: fb.group({
145
- time: fb.control<number>(0),
146
- timeType: fb.control<TimeTypes>('s'),
147
- }),
148
- language: fb.control<string>('en'),
149
- usageStatistics: fb.control<UsageStatisticsType['value']>(''),
150
- updateChannel: fb.control<UpdateChannel>(''),
151
- remoteControlRegisterUrl: fb.control<string>(''),
152
- });
153
- remoteControlState = signal<RemoteControlState>('unknown');
154
- remoteControlClaimUrl = signal<string | null>(null);
155
- // remoteControlRegisterUrl = signal<string>('');
156
-
157
- sysInfoEffect = effect(
158
- () => {
159
- this.settingsForm.controls.remoteControlRegisterUrl.patchValue(
160
- this.sysinfo()?.RemoteControlRegistrationUrl ?? ''
161
- );
162
- },
163
- {
164
- allowSignalWrites: true,
165
- }
166
- );
167
-
168
- get pauseSettings() {
169
- return this.settingsForm.controls.pauseSettings;
170
- }
171
-
172
- langSignal = toSignal(this.settingsForm.controls.language.valueChanges);
173
- timeTypeOptions = signal(TIME_OPTIONS);
174
- timeOptions = derivedFrom(
175
- [
176
- this.pauseSettings.controls.timeType.valueChanges.pipe(startWith('s')),
177
- this.pauseSettings.controls.time.valueChanges.pipe(startWith(null)),
178
- ],
179
- pipe(
180
- map(([timeType, time]) => {
181
- const timeOptions = this.#createTimeOptions(timeType as TimeTypes);
182
-
183
- return time !== null ? timeOptions.filter((x) => x.toString().includes(time.toString())) : timeOptions;
184
- }),
185
- startWith([])
186
- )
187
- );
188
-
189
- languageOptions = computed(() =>
190
- this.langSignal() ? LANGUAGES.filter((x) => x.value === this.langSignal()) : LANGUAGES
191
- );
192
-
193
- usageStatisticsOptions = signal(USAGE_STATISTICS_OPTIONS);
194
-
195
- ngOnInit() {
196
- this.refreshRemoteControlStatus();
197
- this.getServerSettings();
198
- }
199
-
200
- submit() {
201
- // var patchdata = {
202
- // 'server-passphrase': $scope.changeServerPassword ? $scope.remotePassword : '',
203
- // 'allowed-hostnames': $scope.remoteHostnames,
204
- // 'server-listen-interface': $scope.allowRemoteAccess ? 'any' : 'loopback',
205
- // 'startup-delay': $scope.startupDelayDurationValue + '' + $scope.startupDelayDurationMultiplier,
206
- // 'update-channel': $scope.updateChannel,
207
- // 'usage-reporter-level': $scope.usageReporterLevel,
208
- // 'disable-tray-icon-login': $scope.disableTrayIconLogin
209
- // };
210
-
211
- const startupDelay = `${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;
212
-
213
- this.#dupServer
214
- .patchApiV1Serversettings({
215
- requestBody: {
216
- 'usage-reporter-level': this.settingsForm.controls.usageStatistics.value,
217
- 'startup-delay': startupDelay === '0s' ? '' : startupDelay,
218
- 'update-channel': this.settingsForm.controls.updateChannel.value,
219
- },
220
- })
221
- .subscribe({
222
- next: (res) => {
223
- console.log('res', res);
224
- },
225
- error: (err) => {
226
- console.error('err', err);
227
- },
228
- });
229
- }
230
-
231
- getServerSettings() {
232
- return this.#dupServer.getApiV1Serversettings().subscribe({
233
- next: (res) => {
234
- const startupDelay = res['startup-delay'] as string;
235
-
236
- this.settingsForm.patchValue({
237
- pauseSettings: {
238
- time: parseInt(
239
- startupDelay.substring(0, startupDelay.length - 1) == ''
240
- ? '0'
241
- : startupDelay.substring(0, startupDelay.length - 1)
242
- ),
243
- timeType:
244
- startupDelay.substring(-1) === '' ? ('s' as TimeTypes) : (startupDelay.substring(-1) as TimeTypes),
245
- },
246
- usageStatistics: res['usage-reporter-level'],
247
- updateChannel: res['update-channel'] as UpdateChannel,
248
- });
249
- },
250
- });
251
- }
252
-
253
- languageDisplay(x: LangType['value'] | null) {
254
- if (!x) return null;
255
- return LANGUAGES.find((y) => y.value === x)?.label ?? null;
256
- }
257
-
258
- typeDisplay(x: TimeTypes | null | undefined) {
259
- if (x === null || x === undefined) return null;
260
-
261
- return TIME_OPTIONS.find((y) => y.value === x)?.label ?? null;
262
- }
263
-
264
- usageDisplay(x: UsageStatisticsType['value'] | null) {
265
- if (typeof x !== 'string') return null;
266
- return USAGE_STATISTICS_OPTIONS.find((y) => y.value === x)?.label ?? null;
267
- }
268
-
269
- setDarkMode() {
270
- this.#layoutState.setDarkMode();
271
- }
272
-
273
- setLightMode() {
274
- this.#layoutState.setLightMode();
275
- }
276
-
277
- #createTimeOptions(type: TimeTypes) {
278
- const typeLen = type === 'h' ? 25 : 61;
279
-
280
- return new Array(typeLen).fill(0).map((_, i) => i);
281
- }
282
-
283
- repeatRegisterTimer: Timeout | null = null;
284
-
285
- #mapRemoteControlStatus(data: RemoteControlStatusOutput) {
286
- // remoteControlEnabled = data.IsEnabled;
287
- // remoteControlCanEnable = data.CanEnable;
288
- // remoteControlConnected = data.IsConnected;
289
- // remoteControlIsRegistering = data.IsRegistering;
290
- // remoteControlIsRegisteringFaulted = data.IsRegisteringFaulted;
291
- // remoteControlIsRegisteringCompleted = data.IsRegisteringCompleted;
292
-
293
- data.RegistrationUrl && this.remoteControlClaimUrl.set(data.RegistrationUrl);
294
-
295
- console.log(data);
296
-
297
- if (data.IsConnected) {
298
- this.remoteControlState.set('connected');
299
- } else if (data.IsEnabled) {
300
- this.remoteControlState.set('enabled');
301
- } else if (data.CanEnable) {
302
- this.remoteControlState.set('disabled');
303
- } else if (data.IsRegisteringFaulted) {
304
- this.remoteControlState.set('registeringfaulted');
305
- } else if (data.IsRegistering) {
306
- if (data.RegistrationUrl != null && data.RegistrationUrl.trim().length > 0) {
307
- this.remoteControlState.set('registered');
308
- } else {
309
- this.remoteControlState.set('registering');
310
- }
311
- } else {
312
- this.remoteControlState.set('inactive');
313
- }
314
-
315
- const currentRemoteControlState = this.remoteControlState();
316
-
317
- console.log(currentRemoteControlState);
318
-
319
- // Stop any existing timer
320
- if (this.repeatRegisterTimer !== null) {
321
- clearTimeout(this.repeatRegisterTimer);
322
- this.repeatRegisterTimer = null;
323
- }
324
-
325
- // If we are registering, we need to keep checking until the registration is claimed
326
- if (currentRemoteControlState === 'registering') {
327
- this.repeatRegisterTimer = setTimeout(() => {
328
- this.#dupServer.postApiV1RemotecontrolRegister({ requestBody: { RegistrationUrl: '' } }).subscribe({
329
- next: (res) => {
330
- this.#mapRemoteControlStatus(res);
331
- },
332
- error: (err) => {
333
- this.#mapRemoteControlError(err);
334
- },
335
- });
336
-
337
- // AppService.post('/remotecontrol/register', { RegistrationUrl: '' }).then(
338
- // function (data) {
339
- // this.#mapRemoteControlStatus(data.data);
340
- // },
341
- // () => {
342
- // AppService.get('/remotecontrol/status').then(
343
- // function (data) {
344
- // this.#mapRemoteControlStatus(data.data);
345
- // },
346
- // () => {}
347
- // );
348
- // }
349
- // );
350
- }, 5000);
351
- }
352
-
353
- // If we are enabled, poll to see if we become connected
354
- // If we are registered, poll to see if we become disabled
355
- if (currentRemoteControlState === 'enabled' || currentRemoteControlState === 'registered') {
356
- this.repeatRegisterTimer = setTimeout(() => {
357
- this.#dupServer.getApiV1RemotecontrolStatus().subscribe({
358
- next: (res) => {
359
- this.#mapRemoteControlStatus(res);
360
- },
361
- error: (err) => {
362
- this.#mapRemoteControlError(err);
363
- },
364
- });
365
- }, 5000);
366
- }
367
-
368
- // If we can enable and are registering, there must be a lingering registration
369
- if (data.IsRegistering && data.CanEnable) {
370
- this.#dupServer.deleteApiV1RemotecontrolRegister().subscribe({
371
- next: (res) => {
372
- this.#mapRemoteControlStatus(res);
373
- },
374
- });
375
- }
376
- }
377
-
378
- #mapRemoteControlError(data: any) {
379
- // AppUtils.connectionError(data);
380
-
381
- this.#dupServer.getApiV1RemotecontrolStatus().subscribe({
382
- next: (res) => {
383
- this.#mapRemoteControlStatus(res);
384
- },
385
- });
386
- }
387
-
388
- refreshRemoteControlStatus() {
389
- this.#dupServer.getApiV1RemotecontrolStatus().subscribe({
390
- next: (res) => {
391
- this.#mapRemoteControlStatus(res);
392
- },
393
- error: (err) => {
394
- this.#mapRemoteControlError(err);
395
- },
396
- });
397
- }
398
-
399
- beginRemoteRegistration() {
400
- this.remoteControlState.set('registering');
401
-
402
- const registrationUrl = this.settingsForm.controls.remoteControlRegisterUrl.value;
403
-
404
- this.#dupServer.postApiV1RemotecontrolRegister({ requestBody: { RegistrationUrl: registrationUrl } }).subscribe({
405
- next: (res) => {
406
- this.#mapRemoteControlStatus(res);
407
- },
408
- error: (err) => {
409
- this.#mapRemoteControlError(err);
410
- },
411
- });
412
- }
413
-
414
- cancelRemoteRegistration() {
415
- this.#dupServer.deleteApiV1RemotecontrolRegister().subscribe({
416
- next: (res) => {
417
- this.#mapRemoteControlStatus(res);
418
- },
419
- error: (err) => {
420
- this.#mapRemoteControlError(err);
421
- },
422
- });
423
- }
424
-
425
- enableRemoteControl() {
426
- this.#dupServer.postApiV1RemotecontrolEnable().subscribe({
427
- next: (res) => {
428
- this.#mapRemoteControlStatus(res);
429
- },
430
- error: (err) => {
431
- this.#mapRemoteControlError(err);
432
- },
433
- });
434
- }
435
-
436
- disableRemoteControl() {
437
- this.#dupServer.postApiV1RemotecontrolDisable().subscribe({
438
- next: (res) => {
439
- this.#mapRemoteControlStatus(res);
440
- },
441
- error: (err) => {
442
- this.#mapRemoteControlError(err);
443
- },
444
- });
445
- }
446
-
447
- deleteRemoteControl() {
448
- const _self = this;
449
-
450
- if (confirm('Are you sure you want to delete the remote control registration?')) {
451
- _self.#dupServer.deleteApiV1RemotecontrolRegistration().subscribe({
452
- next: (res) => {
453
- _self.#mapRemoteControlStatus(res);
454
- },
455
- error: (err) => {
456
- _self.#mapRemoteControlError(err);
457
- },
458
- });
459
- }
460
- }
461
-
462
- getRemoteControlStatusText() {
463
- const remoteControlState = this.remoteControlState();
464
-
465
- if (remoteControlState === 'enabled') return 'Remote control is enabled but not connected';
466
- if (remoteControlState === 'connected') return 'Remote control is connected';
467
- if (remoteControlState === 'registering') return 'Registering machine...';
468
- if (remoteControlState === 'registeringfaulted') return 'Registration failed';
469
- if (remoteControlState === 'registered') return 'Registered, waiting for accept';
470
- if (remoteControlState === 'disabled') return 'Remote control is configured but not enabled';
471
- if (remoteControlState === 'unknown') return '...loading...';
472
-
473
- return 'Remote control is not set up';
474
- }
475
- }
@@ -1,4 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { environment } from './environment';
3
-
4
- export const ENVIRONMENT_TOKEN = new InjectionToken<typeof environment>('ENVIRONMENT');
@@ -1,6 +0,0 @@
1
- export const environment = {
2
- production: true,
3
- baseUrl: 'http://localhost:8200',
4
- machineServerUrl: 'wss://gateway.api.duplicati.com/portal',
5
- defaultTimeout: 30000,
6
- };
@@ -1,6 +0,0 @@
1
- export const environment = {
2
- production: false,
3
- baseUrl: '/api',
4
- machineServerUrl: 'wss://gateway.api.duplicati.com/portal',
5
- defaultTimeout: 30000,
6
- };
package/src/index.html DELETED
@@ -1,15 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <title>Duplicati Client</title>
6
- <base href="/" />
7
- <meta name="viewport" content="width=device-width, initial-scale=1" />
8
- <!-- <link rel="icon" type="image/x-icon" href="favicon.ico" /> -->
9
- <link rel="icon" href="/assets/duplicati-logo.png" />
10
- <link rel="stylesheet" href="/assets/spk.css" />
11
- </head>
12
- <body>
13
- <app-root></app-root>
14
- </body>
15
- </html>
package/src/main.ts DELETED
@@ -1,6 +0,0 @@
1
- import { bootstrapApplication } from '@angular/platform-browser';
2
- import { appConfig } from './app/app.config';
3
- import { AppComponent } from './app/app.component';
4
-
5
- bootstrapApplication(AppComponent, appConfig)
6
- .catch((err) => console.error(err));
@@ -1,6 +0,0 @@
1
- export default {
2
- '/api': {
3
- target: 'http://localhost:8200',
4
- secure: false,
5
- },
6
- };
package/src/styles.scss DELETED
@@ -1,41 +0,0 @@
1
- @use '@sparkle-ui/core/styles' as * with (
2
- $initMaterial: false,
3
- $sparkleButton: true,
4
- $sparkleToggle: true,
5
- $sparkleProgressBar: true,
6
- $sparkleCheckbox: true,
7
- $sparkleAlert: true,
8
- $sparkleMenu: true,
9
- $sparkleDivider: true,
10
- $sparkleIcon: true,
11
- $sparkleChip: true,
12
- $sparkleFormField: true,
13
- $sparkleRadio: true,
14
- $sparkleList: true,
15
- $sparkleSidenav: true,
16
- $sparkleButtonGroup: true,
17
- $sparkleRangeSlider: true,
18
- $sparkleTooltip: true,
19
- $sparkleSelect: true,
20
- $sparkleCard: true,
21
- $sparkleStepper: true,
22
- // $sparkleTabs: true,
23
- // $sparkleDialog: true,
24
- // $sparkleDatepicker: true
25
- );
26
-
27
- body {
28
- .spacer {
29
- flex: 1 0;
30
- }
31
-
32
- h2 {
33
- font: var(--title-30);
34
- margin: 0;
35
- }
36
-
37
- h3 {
38
- font: var(--paragraph-20);
39
- margin: 0;
40
- }
41
- }
package/tsconfig.app.json DELETED
@@ -1,15 +0,0 @@
1
- /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
- /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
- {
4
- "extends": "./tsconfig.json",
5
- "compilerOptions": {
6
- "outDir": "./out-tsc/app",
7
- "types": []
8
- },
9
- "files": [
10
- "src/main.ts"
11
- ],
12
- "include": [
13
- "src/**/*.d.ts"
14
- ]
15
- }
package/tsconfig.json DELETED
@@ -1,30 +0,0 @@
1
- /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
2
- {
3
- "compileOnSave": false,
4
- "compilerOptions": {
5
- "outDir": "./dist/out-tsc",
6
- "strict": true,
7
- "noImplicitOverride": true,
8
- "noPropertyAccessFromIndexSignature": true,
9
- "noImplicitReturns": true,
10
- "noFallthroughCasesInSwitch": true,
11
- "skipLibCheck": true,
12
- "isolatedModules": true,
13
- "esModuleInterop": true,
14
- "sourceMap": true,
15
- "declaration": false,
16
- "experimentalDecorators": true,
17
- "moduleResolution": "bundler",
18
- "importHelpers": true,
19
- "target": "ESNext",
20
- "module": "ESNext",
21
- "lib": ["ESNext", "dom"],
22
- "typeRoots": ["node_modules/@types", "node_modules/ngxtension"]
23
- },
24
- "angularCompilerOptions": {
25
- "enableI18nLegacyMessageIdFormat": false,
26
- "strictInjectionParameters": true,
27
- "strictInputAccessModifiers": true,
28
- "strictTemplates": true
29
- }
30
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes