tabby-sync-selective 1.1.0

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 (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +48 -0
  3. package/dist/index.js +2 -0
  4. package/dist/index.js.LICENSE.txt +7479 -0
  5. package/dist/src/components/change-logs/change-logs.component.d.ts +8 -0
  6. package/dist/src/components/checkbox.component.d.ts +13 -0
  7. package/dist/src/components/cloud-sync-settings.component.d.ts +317 -0
  8. package/dist/src/components/feeback-form/feeback.component.d.ts +36 -0
  9. package/dist/src/components/master-password/master-password.component.d.ts +8 -0
  10. package/dist/src/components/sub-components/about/about.component.d.ts +17 -0
  11. package/dist/src/components/sub-components/amazon/amazon-settings.component.d.ts +350 -0
  12. package/dist/src/components/sub-components/built-in/builtin-settings.component.d.ts +215 -0
  13. package/dist/src/components/sub-components/check-for-updates/check-for-updates.component.d.ts +26 -0
  14. package/dist/src/components/sub-components/dropbox/dropbox-settings.component.d.ts +348 -0
  15. package/dist/src/components/sub-components/ftp/ftp-settings.component.d.ts +351 -0
  16. package/dist/src/components/sub-components/gist/gist-settings.component.d.ts +352 -0
  17. package/dist/src/components/sub-components/plugin-logs/plugin-logs.component.d.ts +21 -0
  18. package/dist/src/components/sub-components/webdav/webdav-settings.component.d.ts +349 -0
  19. package/dist/src/components/support-us/support-us.component.d.ts +14 -0
  20. package/dist/src/components/sync-sections-dialog/sync-sections-dialog.component.d.ts +131 -0
  21. package/dist/src/components/toggle.component.d.ts +4 -0
  22. package/dist/src/data/lang.d.ts +119 -0
  23. package/dist/src/data/mockdata.json +7 -0
  24. package/dist/src/data/s3-data.d.ts +15 -0
  25. package/dist/src/data/setting-items.d.ts +197 -0
  26. package/dist/src/index.d.ts +15 -0
  27. package/dist/src/interface/index.d.ts +33 -0
  28. package/dist/src/services/dev-constants.d.ts +4 -0
  29. package/dist/src/services/sync-sections-dialog.service.d.ts +9 -0
  30. package/dist/src/services/tabby-sync-upgrade.d.ts +7 -0
  31. package/dist/src/settings.d.ts +7 -0
  32. package/dist/src/utils/CloudSyncSettingsHelper.d.ts +8 -0
  33. package/dist/src/utils/Logger.d.ts +9 -0
  34. package/dist/src/utils/cloud-components/AmazonS3.d.ts +30 -0
  35. package/dist/src/utils/cloud-components/Dropbox.d.ts +17 -0
  36. package/dist/src/utils/cloud-components/FTP.d.ts +15 -0
  37. package/dist/src/utils/cloud-components/WebDav.d.ts +13 -0
  38. package/dist/src/utils/cloud-components/gist.d.ts +12 -0
  39. package/dist/src/utils/cloud-components/gists/gists.d.ts +10 -0
  40. package/dist/src/utils/cloud-components/gists/gitee.d.ts +12 -0
  41. package/dist/src/utils/cloud-components/gists/github.d.ts +12 -0
  42. package/dist/src/utils/cloud-components/gists/gitlab.d.ts +12 -0
  43. package/dist/src/utils/config-merge.d.ts +40 -0
  44. package/dist/src/utils/dev-mock-data.d.ts +6 -0
  45. package/dist/src/utils/settings-helper.d.ts +49 -0
  46. package/package.json +101 -0
@@ -0,0 +1,349 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { ConfigService, PlatformService } from 'terminus-core';
3
+ import { ToastrService } from 'ngx-toastr';
4
+ import { SyncSectionsDialogService } from '../../../services/sync-sections-dialog.service';
5
+ interface formData {
6
+ host: string;
7
+ port: string;
8
+ username: string;
9
+ password: string;
10
+ location: string;
11
+ }
12
+ export declare class CloudSyncWebDavSettingsComponent implements OnInit {
13
+ private config;
14
+ private platform;
15
+ private toast;
16
+ private syncSectionsDialog;
17
+ resetFormMessages: EventEmitter<unknown>;
18
+ setFormMessage: EventEmitter<unknown>;
19
+ translate: {
20
+ lang: {
21
+ common: {
22
+ menu_title: string;
23
+ verifyConfigString: string;
24
+ config_inject_header: string;
25
+ errors: {
26
+ invalidServerConfig: string;
27
+ };
28
+ };
29
+ form: {
30
+ error: {
31
+ required_all: string;
32
+ };
33
+ };
34
+ settings: {
35
+ title: string;
36
+ sub_title: string;
37
+ service_label: string;
38
+ amazon: {
39
+ connected: string;
40
+ save_settings_failed: string;
41
+ save_settings_success: string;
42
+ };
43
+ error_connection_timeout: string;
44
+ };
45
+ sync: {
46
+ loading_config: string;
47
+ sync_confirmation: string;
48
+ setting_valid: string;
49
+ error_setting_save_file: string;
50
+ error_connection: string;
51
+ error_invalid_setting: string;
52
+ error_invalid_setting_2: string;
53
+ error_save_setting: string;
54
+ need_to_save_config: string;
55
+ sync_success: string;
56
+ sync_error: string;
57
+ sync_server_failed: string;
58
+ sync_enabled: string;
59
+ sync_disabled: string;
60
+ confirm_remove_setting: string;
61
+ remove_setting_success: string;
62
+ remove_setting_error: string;
63
+ setting_changes_saved: string;
64
+ sync_sections_saved: string;
65
+ sync_mode_full: string;
66
+ sync_mode_platform_safe: string;
67
+ sync_mode_custom: string;
68
+ sync_mode_selective: string;
69
+ sync_sections_title: string;
70
+ sync_sections_hint: string;
71
+ manual_sync_title: string;
72
+ manual_sync_confirm: string;
73
+ };
74
+ log: {
75
+ invalid_cloud_settings: string;
76
+ read_cloud_settings: string;
77
+ error_upload_settings: string;
78
+ error_test_connection: string;
79
+ };
80
+ s3: {
81
+ title: string;
82
+ title_blackblaze: string;
83
+ app_id_placeholder: string;
84
+ app_secret_placeholder: string;
85
+ blackblaze_key_placeholder: string;
86
+ blackblaze_app_key_placeholder: string;
87
+ bucket_placeholder: string;
88
+ region_placeholder: string;
89
+ blackblaze_bucket_placeholder: string;
90
+ endpoint_placeholder: string;
91
+ location_placeholder: string;
92
+ };
93
+ ftp: {
94
+ title: string;
95
+ host_placeholder: string;
96
+ location_placeholder: string;
97
+ username_placeholder: string;
98
+ password_placeholder: string;
99
+ port_placeholder: string;
100
+ };
101
+ webdav: {
102
+ title: string;
103
+ host_placeholder: string;
104
+ username_placeholder: string;
105
+ password_placeholder: string;
106
+ port_placeholder: string;
107
+ location_placeholder: string;
108
+ };
109
+ gist: {
110
+ title: string;
111
+ name: string;
112
+ id: string;
113
+ token: string;
114
+ invalid_provider: string;
115
+ enter_id: string;
116
+ error_create_gist: string;
117
+ };
118
+ buttons: {
119
+ sync_from_cloud: string;
120
+ sync_from_local: string;
121
+ check_update: string;
122
+ yes: string;
123
+ cancel: string;
124
+ no: string;
125
+ ok: string;
126
+ view: string;
127
+ test_connection: string;
128
+ processing: string;
129
+ save_settings: string;
130
+ upload_settings: string;
131
+ cloud_syncing_progress: string;
132
+ remove_saved_setting: string;
133
+ };
134
+ };
135
+ trans: (key: string) => string;
136
+ };
137
+ presetData: {
138
+ defaultSyncInterval: number;
139
+ tabbySettingsFilename: string;
140
+ storedSettingsFilename: string;
141
+ cloudSettingsFilename: string;
142
+ syncHashFilename: string;
143
+ tabbyLocalEncryptedFile: string;
144
+ values: {
145
+ BUILT_IN: string;
146
+ S3: string;
147
+ WASABI: string;
148
+ DIGITAL_OCEAN: string;
149
+ BLACKBLAZE: string;
150
+ S3_COMPATIBLE: string;
151
+ WEBDAV: string;
152
+ FTP: string;
153
+ GIST: string;
154
+ DROPBOX: string;
155
+ };
156
+ amazonEndpoints: {
157
+ WASABI: string;
158
+ DIGITAL_OCEAN: string;
159
+ BLACKBLAZE: string;
160
+ S3_COMPATIBLE: string;
161
+ };
162
+ serviceProvidersList: {
163
+ name: string;
164
+ value: string;
165
+ }[];
166
+ BuiltinLoginMode: {
167
+ LOGIN: string;
168
+ RESET_PASSWORD: string;
169
+ };
170
+ availablePluginVersions: string[];
171
+ formData: {
172
+ [x: string]: {
173
+ email: string;
174
+ password: string;
175
+ reset_password_email: string;
176
+ appId?: undefined;
177
+ appSecret?: undefined;
178
+ location?: undefined;
179
+ bucket?: undefined;
180
+ region?: undefined;
181
+ endpointUrl?: undefined;
182
+ host?: undefined;
183
+ username?: undefined;
184
+ port?: undefined;
185
+ protocol?: undefined;
186
+ type?: undefined;
187
+ name?: undefined;
188
+ accessToken?: undefined;
189
+ id?: undefined;
190
+ apiKey?: undefined;
191
+ apiSecret?: undefined;
192
+ } | {
193
+ appId: string;
194
+ appSecret: string;
195
+ location: string;
196
+ bucket: string;
197
+ region: string;
198
+ email?: undefined;
199
+ password?: undefined;
200
+ reset_password_email?: undefined;
201
+ endpointUrl?: undefined;
202
+ host?: undefined;
203
+ username?: undefined;
204
+ port?: undefined;
205
+ protocol?: undefined;
206
+ type?: undefined;
207
+ name?: undefined;
208
+ accessToken?: undefined;
209
+ id?: undefined;
210
+ apiKey?: undefined;
211
+ apiSecret?: undefined;
212
+ } | {
213
+ endpointUrl: string;
214
+ appId: string;
215
+ appSecret: string;
216
+ location: string;
217
+ bucket: string;
218
+ region: string;
219
+ email?: undefined;
220
+ password?: undefined;
221
+ reset_password_email?: undefined;
222
+ host?: undefined;
223
+ username?: undefined;
224
+ port?: undefined;
225
+ protocol?: undefined;
226
+ type?: undefined;
227
+ name?: undefined;
228
+ accessToken?: undefined;
229
+ id?: undefined;
230
+ apiKey?: undefined;
231
+ apiSecret?: undefined;
232
+ } | {
233
+ host: string;
234
+ username: string;
235
+ password: string;
236
+ location: string;
237
+ port: string;
238
+ email?: undefined;
239
+ reset_password_email?: undefined;
240
+ appId?: undefined;
241
+ appSecret?: undefined;
242
+ bucket?: undefined;
243
+ region?: undefined;
244
+ endpointUrl?: undefined;
245
+ protocol?: undefined;
246
+ type?: undefined;
247
+ name?: undefined;
248
+ accessToken?: undefined;
249
+ id?: undefined;
250
+ apiKey?: undefined;
251
+ apiSecret?: undefined;
252
+ } | {
253
+ protocol: string;
254
+ host: string;
255
+ username: string;
256
+ password: string;
257
+ location: string;
258
+ port: number;
259
+ email?: undefined;
260
+ reset_password_email?: undefined;
261
+ appId?: undefined;
262
+ appSecret?: undefined;
263
+ bucket?: undefined;
264
+ region?: undefined;
265
+ endpointUrl?: undefined;
266
+ type?: undefined;
267
+ name?: undefined;
268
+ accessToken?: undefined;
269
+ id?: undefined;
270
+ apiKey?: undefined;
271
+ apiSecret?: undefined;
272
+ } | {
273
+ type: string;
274
+ name: string;
275
+ accessToken: string;
276
+ id: string;
277
+ email?: undefined;
278
+ password?: undefined;
279
+ reset_password_email?: undefined;
280
+ appId?: undefined;
281
+ appSecret?: undefined;
282
+ location?: undefined;
283
+ bucket?: undefined;
284
+ region?: undefined;
285
+ endpointUrl?: undefined;
286
+ host?: undefined;
287
+ username?: undefined;
288
+ port?: undefined;
289
+ protocol?: undefined;
290
+ apiKey?: undefined;
291
+ apiSecret?: undefined;
292
+ } | {
293
+ apiKey: string;
294
+ apiSecret: string;
295
+ email?: undefined;
296
+ password?: undefined;
297
+ reset_password_email?: undefined;
298
+ appId?: undefined;
299
+ appSecret?: undefined;
300
+ location?: undefined;
301
+ bucket?: undefined;
302
+ region?: undefined;
303
+ endpointUrl?: undefined;
304
+ host?: undefined;
305
+ username?: undefined;
306
+ port?: undefined;
307
+ protocol?: undefined;
308
+ type?: undefined;
309
+ name?: undefined;
310
+ accessToken?: undefined;
311
+ id?: undefined;
312
+ };
313
+ };
314
+ external_urls: {
315
+ ApiUrl: string;
316
+ BlackBlazeHelp: string;
317
+ checkForUpdateUrl: string;
318
+ };
319
+ isCloudStorageS3Compatibility(provider: string): boolean;
320
+ gistUrls: {
321
+ viewItems: {
322
+ github: string;
323
+ gitee: string;
324
+ gitlab: string;
325
+ };
326
+ github: string;
327
+ gitee: string;
328
+ gitlab: string;
329
+ };
330
+ donationUrl: string;
331
+ pluginUrl: string;
332
+ };
333
+ isPreloadingSavedConfig: boolean;
334
+ isSettingSaved: boolean;
335
+ isCheckLoginSuccess: boolean;
336
+ isFormProcessing: boolean;
337
+ isSyncingProgress: boolean;
338
+ form: formData;
339
+ constructor(config: ConfigService, platform: PlatformService, toast: ToastrService, syncSectionsDialog: SyncSectionsDialogService);
340
+ ngOnInit(): void;
341
+ testConnection(): Promise<void>;
342
+ saveSettings(): Promise<void>;
343
+ uploadLocalSettings(): Promise<void>;
344
+ cancelSaveSettings(): void;
345
+ removeSavedSettings(): Promise<void>;
346
+ manualSyncFromCloud(): Promise<void>;
347
+ manualSyncToCloud(): Promise<void>;
348
+ }
349
+ export {};
@@ -0,0 +1,14 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { PlatformService } from 'terminus-core';
3
+ export declare class SupportUsComponent implements OnInit {
4
+ private platform;
5
+ isSponsorListVisible: boolean;
6
+ isLoadingSponsorList: boolean;
7
+ loadSponsorListError: boolean;
8
+ sponsorList: any[];
9
+ constructor(platform: PlatformService);
10
+ ngOnInit(): void;
11
+ openDonationPage(): void;
12
+ toggleSponsorList(): Promise<void>;
13
+ loadSponsorList(): Promise<void>;
14
+ }
@@ -0,0 +1,131 @@
1
+ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
2
+ import { SyncMode, getFieldsByGroup } from '../../utils/config-merge';
3
+ export declare class SyncSectionsDialogComponent {
4
+ activeModal: NgbActiveModal;
5
+ translate: {
6
+ lang: {
7
+ common: {
8
+ menu_title: string;
9
+ verifyConfigString: string;
10
+ config_inject_header: string;
11
+ errors: {
12
+ invalidServerConfig: string;
13
+ };
14
+ };
15
+ form: {
16
+ error: {
17
+ required_all: string;
18
+ };
19
+ };
20
+ settings: {
21
+ title: string;
22
+ sub_title: string;
23
+ service_label: string;
24
+ amazon: {
25
+ connected: string;
26
+ save_settings_failed: string;
27
+ save_settings_success: string;
28
+ };
29
+ error_connection_timeout: string;
30
+ };
31
+ sync: {
32
+ loading_config: string;
33
+ sync_confirmation: string;
34
+ setting_valid: string;
35
+ error_setting_save_file: string;
36
+ error_connection: string;
37
+ error_invalid_setting: string;
38
+ error_invalid_setting_2: string;
39
+ error_save_setting: string;
40
+ need_to_save_config: string;
41
+ sync_success: string;
42
+ sync_error: string;
43
+ sync_server_failed: string;
44
+ sync_enabled: string;
45
+ sync_disabled: string;
46
+ confirm_remove_setting: string;
47
+ remove_setting_success: string;
48
+ remove_setting_error: string;
49
+ setting_changes_saved: string;
50
+ sync_sections_saved: string;
51
+ sync_mode_full: string;
52
+ sync_mode_platform_safe: string;
53
+ sync_mode_custom: string;
54
+ sync_mode_selective: string;
55
+ sync_sections_title: string;
56
+ sync_sections_hint: string;
57
+ manual_sync_title: string;
58
+ manual_sync_confirm: string;
59
+ };
60
+ log: {
61
+ invalid_cloud_settings: string;
62
+ read_cloud_settings: string;
63
+ error_upload_settings: string;
64
+ error_test_connection: string;
65
+ };
66
+ s3: {
67
+ title: string;
68
+ title_blackblaze: string;
69
+ app_id_placeholder: string;
70
+ app_secret_placeholder: string;
71
+ blackblaze_key_placeholder: string;
72
+ blackblaze_app_key_placeholder: string;
73
+ bucket_placeholder: string;
74
+ region_placeholder: string;
75
+ blackblaze_bucket_placeholder: string;
76
+ endpoint_placeholder: string;
77
+ location_placeholder: string;
78
+ };
79
+ ftp: {
80
+ title: string;
81
+ host_placeholder: string;
82
+ location_placeholder: string;
83
+ username_placeholder: string;
84
+ password_placeholder: string;
85
+ port_placeholder: string;
86
+ };
87
+ webdav: {
88
+ title: string;
89
+ host_placeholder: string;
90
+ username_placeholder: string;
91
+ password_placeholder: string;
92
+ port_placeholder: string;
93
+ location_placeholder: string;
94
+ };
95
+ gist: {
96
+ title: string;
97
+ name: string;
98
+ id: string;
99
+ token: string;
100
+ invalid_provider: string;
101
+ enter_id: string;
102
+ error_create_gist: string;
103
+ };
104
+ buttons: {
105
+ sync_from_cloud: string;
106
+ sync_from_local: string;
107
+ check_update: string;
108
+ yes: string;
109
+ cancel: string;
110
+ no: string;
111
+ ok: string;
112
+ view: string;
113
+ test_connection: string;
114
+ processing: string;
115
+ save_settings: string;
116
+ upload_settings: string;
117
+ cloud_syncing_progress: string;
118
+ remove_saved_setting: string;
119
+ };
120
+ };
121
+ trans: (key: string) => string;
122
+ };
123
+ fieldGroups: import("../../utils/config-merge").SyncFieldGroupDef[];
124
+ getFieldsByGroup: typeof getFieldsByGroup;
125
+ syncMode: SyncMode;
126
+ syncFields: Record<string, boolean>;
127
+ constructor(activeModal: NgbActiveModal);
128
+ onSyncModeChange(mode: SyncMode): void;
129
+ confirm(): void;
130
+ cancel(): void;
131
+ }
@@ -0,0 +1,4 @@
1
+ import { CheckboxComponent } from './checkbox.component';
2
+ /** @hidden */
3
+ export declare class ToggleComponent extends CheckboxComponent {
4
+ }
@@ -0,0 +1,119 @@
1
+ declare const CloudSyncLang: {
2
+ lang: {
3
+ common: {
4
+ menu_title: string;
5
+ verifyConfigString: string;
6
+ config_inject_header: string;
7
+ errors: {
8
+ invalidServerConfig: string;
9
+ };
10
+ };
11
+ form: {
12
+ error: {
13
+ required_all: string;
14
+ };
15
+ };
16
+ settings: {
17
+ title: string;
18
+ sub_title: string;
19
+ service_label: string;
20
+ amazon: {
21
+ connected: string;
22
+ save_settings_failed: string;
23
+ save_settings_success: string;
24
+ };
25
+ error_connection_timeout: string;
26
+ };
27
+ sync: {
28
+ loading_config: string;
29
+ sync_confirmation: string;
30
+ setting_valid: string;
31
+ error_setting_save_file: string;
32
+ error_connection: string;
33
+ error_invalid_setting: string;
34
+ error_invalid_setting_2: string;
35
+ error_save_setting: string;
36
+ need_to_save_config: string;
37
+ sync_success: string;
38
+ sync_error: string;
39
+ sync_server_failed: string;
40
+ sync_enabled: string;
41
+ sync_disabled: string;
42
+ confirm_remove_setting: string;
43
+ remove_setting_success: string;
44
+ remove_setting_error: string;
45
+ setting_changes_saved: string;
46
+ sync_sections_saved: string;
47
+ sync_mode_full: string;
48
+ sync_mode_platform_safe: string;
49
+ sync_mode_custom: string;
50
+ sync_mode_selective: string;
51
+ sync_sections_title: string;
52
+ sync_sections_hint: string;
53
+ manual_sync_title: string;
54
+ manual_sync_confirm: string;
55
+ };
56
+ log: {
57
+ invalid_cloud_settings: string;
58
+ read_cloud_settings: string;
59
+ error_upload_settings: string;
60
+ error_test_connection: string;
61
+ };
62
+ s3: {
63
+ title: string;
64
+ title_blackblaze: string;
65
+ app_id_placeholder: string;
66
+ app_secret_placeholder: string;
67
+ blackblaze_key_placeholder: string;
68
+ blackblaze_app_key_placeholder: string;
69
+ bucket_placeholder: string;
70
+ region_placeholder: string;
71
+ blackblaze_bucket_placeholder: string;
72
+ endpoint_placeholder: string;
73
+ location_placeholder: string;
74
+ };
75
+ ftp: {
76
+ title: string;
77
+ host_placeholder: string;
78
+ location_placeholder: string;
79
+ username_placeholder: string;
80
+ password_placeholder: string;
81
+ port_placeholder: string;
82
+ };
83
+ webdav: {
84
+ title: string;
85
+ host_placeholder: string;
86
+ username_placeholder: string;
87
+ password_placeholder: string;
88
+ port_placeholder: string;
89
+ location_placeholder: string;
90
+ };
91
+ gist: {
92
+ title: string;
93
+ name: string;
94
+ id: string;
95
+ token: string;
96
+ invalid_provider: string;
97
+ enter_id: string;
98
+ error_create_gist: string;
99
+ };
100
+ buttons: {
101
+ sync_from_cloud: string;
102
+ sync_from_local: string;
103
+ check_update: string;
104
+ yes: string;
105
+ cancel: string;
106
+ no: string;
107
+ ok: string;
108
+ view: string;
109
+ test_connection: string;
110
+ processing: string;
111
+ save_settings: string;
112
+ upload_settings: string;
113
+ cloud_syncing_progress: string;
114
+ remove_saved_setting: string;
115
+ };
116
+ };
117
+ trans: (key: string) => string;
118
+ };
119
+ export default CloudSyncLang;
@@ -0,0 +1,7 @@
1
+ {
2
+ "host": "webdav.example.com",
3
+ "username": "user",
4
+ "password": "password",
5
+ "location": "/",
6
+ "port": 443
7
+ }
@@ -0,0 +1,15 @@
1
+ declare const AmazonData: {
2
+ regions: {
3
+ text: string;
4
+ value: string;
5
+ }[];
6
+ wasabi: {
7
+ text: string;
8
+ value: string;
9
+ }[];
10
+ DIGITAL_OCEAN: {
11
+ text: string;
12
+ value: string;
13
+ }[];
14
+ };
15
+ export default AmazonData;