tabby-sync-selective 1.1.1 → 1.1.5

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.
@@ -1,33 +1,82 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { ConfigService, PlatformService, BaseComponent } from 'terminus-core';
3
3
  import { ToastrService } from 'ngx-toastr';
4
- import { ConnectionGroup } from '../interface';
5
- import { SyncMode, getFieldsByGroup } from '../utils/config-merge';
4
+ import { SyncMode } from '../utils/config-merge';
5
+ import { CustomSyncFieldsDialogService } from '../services/custom-sync-fields-dialog.service';
6
6
  /** @hidden */
7
- export declare class CloudSyncSettingsComponent extends BaseComponent implements OnInit {
7
+ export declare class CloudSyncSettingsComponent extends BaseComponent implements OnInit, OnDestroy {
8
8
  config: ConfigService;
9
9
  private toast;
10
10
  private platform;
11
+ private customFieldsDialog;
11
12
  lastVersion: string;
12
13
  translate: {
13
14
  lang: {
14
15
  common: {
15
- menu_title: string;
16
+ menu_title: {
17
+ en: string;
18
+ zh: string;
19
+ };
16
20
  verifyConfigString: string;
17
21
  config_inject_header: string;
18
22
  errors: {
19
- invalidServerConfig: string;
23
+ invalidServerConfig: {
24
+ en: string;
25
+ zh: string;
26
+ };
27
+ };
28
+ };
29
+ tabs: {
30
+ general: {
31
+ en: string;
32
+ zh: string;
33
+ };
34
+ sync_settings: {
35
+ en: string;
36
+ zh: string;
37
+ };
38
+ feedback: {
39
+ en: string;
40
+ zh: string;
41
+ };
42
+ support_us: {
43
+ en: string;
44
+ zh: string;
45
+ };
46
+ change_logs: {
47
+ en: string;
48
+ zh: string;
49
+ };
50
+ check_for_update: {
51
+ en: string;
52
+ zh: string;
53
+ };
54
+ logs: {
55
+ en: string;
56
+ zh: string;
20
57
  };
21
58
  };
22
59
  form: {
23
60
  error: {
24
- required_all: string;
61
+ required_all: {
62
+ en: string;
63
+ zh: string;
64
+ };
25
65
  };
26
66
  };
27
67
  settings: {
28
- title: string;
29
- sub_title: string;
30
- service_label: string;
68
+ title: {
69
+ en: string;
70
+ zh: string;
71
+ };
72
+ sub_title: {
73
+ en: string;
74
+ zh: string;
75
+ };
76
+ service_label: {
77
+ en: string;
78
+ zh: string;
79
+ };
31
80
  amazon: {
32
81
  connected: string;
33
82
  save_settings_failed: string;
@@ -36,11 +85,23 @@ export declare class CloudSyncSettingsComponent extends BaseComponent implements
36
85
  error_connection_timeout: string;
37
86
  };
38
87
  sync: {
39
- loading_config: string;
40
- sync_confirmation: string;
41
- setting_valid: string;
88
+ loading_config: {
89
+ en: string;
90
+ zh: string;
91
+ };
92
+ sync_confirmation: {
93
+ en: string;
94
+ zh: string;
95
+ };
96
+ setting_valid: {
97
+ en: string;
98
+ zh: string;
99
+ };
42
100
  error_setting_save_file: string;
43
- error_connection: string;
101
+ error_connection: {
102
+ en: string;
103
+ zh: string;
104
+ };
44
105
  error_invalid_setting: string;
45
106
  error_invalid_setting_2: string;
46
107
  error_save_setting: string;
@@ -54,15 +115,74 @@ export declare class CloudSyncSettingsComponent extends BaseComponent implements
54
115
  remove_setting_success: string;
55
116
  remove_setting_error: string;
56
117
  setting_changes_saved: string;
57
- sync_sections_saved: string;
58
- sync_mode_full: string;
59
- sync_mode_platform_safe: string;
60
- sync_mode_custom: string;
61
- sync_mode_selective: string;
62
- sync_sections_title: string;
63
- sync_sections_hint: string;
64
- manual_sync_title: string;
65
- manual_sync_confirm: string;
118
+ sync_sections_saved: {
119
+ en: string;
120
+ zh: string;
121
+ };
122
+ sync_mode_full: {
123
+ en: string;
124
+ zh: string;
125
+ };
126
+ sync_mode_full_desc: {
127
+ en: string;
128
+ zh: string;
129
+ };
130
+ sync_mode_platform_safe: {
131
+ en: string;
132
+ zh: string;
133
+ };
134
+ sync_mode_platform_safe_desc: {
135
+ en: string;
136
+ zh: string;
137
+ };
138
+ sync_mode_custom: {
139
+ en: string;
140
+ zh: string;
141
+ };
142
+ sync_mode_custom_desc: {
143
+ en: string;
144
+ zh: string;
145
+ };
146
+ sync_mode_selective: {
147
+ en: string;
148
+ zh: string;
149
+ };
150
+ sync_sections_title: {
151
+ en: string;
152
+ zh: string;
153
+ };
154
+ sync_sections_hint: {
155
+ en: string;
156
+ zh: string;
157
+ };
158
+ manual_sync_title: {
159
+ en: string;
160
+ zh: string;
161
+ };
162
+ manual_sync_confirm: {
163
+ en: string;
164
+ zh: string;
165
+ };
166
+ custom_fields_title: {
167
+ en: string;
168
+ zh: string;
169
+ };
170
+ custom_fields_hint: {
171
+ en: string;
172
+ zh: string;
173
+ };
174
+ configure_custom_items: {
175
+ en: string;
176
+ zh: string;
177
+ };
178
+ custom_fields_summary: {
179
+ en: string;
180
+ zh: string;
181
+ };
182
+ save_sync_settings: {
183
+ en: string;
184
+ zh: string;
185
+ };
66
186
  };
67
187
  log: {
68
188
  invalid_cloud_settings: string;
@@ -113,9 +233,15 @@ export declare class CloudSyncSettingsComponent extends BaseComponent implements
113
233
  sync_from_local: string;
114
234
  check_update: string;
115
235
  yes: string;
116
- cancel: string;
236
+ cancel: {
237
+ en: string;
238
+ zh: string;
239
+ };
117
240
  no: string;
118
- ok: string;
241
+ ok: {
242
+ en: string;
243
+ zh: string;
244
+ };
119
245
  view: string;
120
246
  test_connection: string;
121
247
  processing: string;
@@ -125,7 +251,9 @@ export declare class CloudSyncSettingsComponent extends BaseComponent implements
125
251
  remove_saved_setting: string;
126
252
  };
127
253
  };
128
- trans: (key: string) => string;
254
+ refreshLocale(platform: PlatformService): void;
255
+ isChinese(): boolean;
256
+ trans: (key: string, vars?: Record<string, string | number>) => string;
129
257
  };
130
258
  isUpdateAvailable: boolean;
131
259
  isDebug: boolean;
@@ -146,7 +274,6 @@ export declare class CloudSyncSettingsComponent extends BaseComponent implements
146
274
  value: string;
147
275
  }[];
148
276
  selectedProvider: string;
149
- groups: ConnectionGroup[];
150
277
  form_messages: {
151
278
  errors: any[];
152
279
  success: any[];
@@ -155,157 +282,18 @@ export declare class CloudSyncSettingsComponent extends BaseComponent implements
155
282
  isShowSyncLoader: boolean;
156
283
  intervalSync: number;
157
284
  storedSettingsData: any;
158
- form: {
159
- [x: string]: {
160
- email: string;
161
- password: string;
162
- reset_password_email: string;
163
- appId?: undefined;
164
- appSecret?: undefined;
165
- location?: undefined;
166
- bucket?: undefined;
167
- region?: undefined;
168
- endpointUrl?: undefined;
169
- host?: undefined;
170
- username?: undefined;
171
- port?: undefined;
172
- protocol?: undefined;
173
- type?: undefined;
174
- name?: undefined;
175
- accessToken?: undefined;
176
- id?: undefined;
177
- apiKey?: undefined;
178
- apiSecret?: undefined;
179
- } | {
180
- appId: string;
181
- appSecret: string;
182
- location: string;
183
- bucket: string;
184
- region: string;
185
- email?: undefined;
186
- password?: undefined;
187
- reset_password_email?: undefined;
188
- endpointUrl?: undefined;
189
- host?: undefined;
190
- username?: undefined;
191
- port?: undefined;
192
- protocol?: undefined;
193
- type?: undefined;
194
- name?: undefined;
195
- accessToken?: undefined;
196
- id?: undefined;
197
- apiKey?: undefined;
198
- apiSecret?: undefined;
199
- } | {
200
- endpointUrl: string;
201
- appId: string;
202
- appSecret: string;
203
- location: string;
204
- bucket: string;
205
- region: string;
206
- email?: undefined;
207
- password?: undefined;
208
- reset_password_email?: undefined;
209
- host?: undefined;
210
- username?: undefined;
211
- port?: undefined;
212
- protocol?: undefined;
213
- type?: undefined;
214
- name?: undefined;
215
- accessToken?: undefined;
216
- id?: undefined;
217
- apiKey?: undefined;
218
- apiSecret?: undefined;
219
- } | {
220
- host: string;
221
- username: string;
222
- password: string;
223
- location: string;
224
- port: string;
225
- email?: undefined;
226
- reset_password_email?: undefined;
227
- appId?: undefined;
228
- appSecret?: undefined;
229
- bucket?: undefined;
230
- region?: undefined;
231
- endpointUrl?: undefined;
232
- protocol?: undefined;
233
- type?: undefined;
234
- name?: undefined;
235
- accessToken?: undefined;
236
- id?: undefined;
237
- apiKey?: undefined;
238
- apiSecret?: undefined;
239
- } | {
240
- protocol: string;
241
- host: string;
242
- username: string;
243
- password: string;
244
- location: string;
245
- port: number;
246
- email?: undefined;
247
- reset_password_email?: undefined;
248
- appId?: undefined;
249
- appSecret?: undefined;
250
- bucket?: undefined;
251
- region?: undefined;
252
- endpointUrl?: undefined;
253
- type?: undefined;
254
- name?: undefined;
255
- accessToken?: undefined;
256
- id?: undefined;
257
- apiKey?: undefined;
258
- apiSecret?: undefined;
259
- } | {
260
- type: string;
261
- name: string;
262
- accessToken: string;
263
- id: string;
264
- email?: undefined;
265
- password?: undefined;
266
- reset_password_email?: undefined;
267
- appId?: undefined;
268
- appSecret?: undefined;
269
- location?: undefined;
270
- bucket?: undefined;
271
- region?: undefined;
272
- endpointUrl?: undefined;
273
- host?: undefined;
274
- username?: undefined;
275
- port?: undefined;
276
- protocol?: undefined;
277
- apiKey?: undefined;
278
- apiSecret?: undefined;
279
- } | {
280
- apiKey: string;
281
- apiSecret: string;
282
- email?: undefined;
283
- password?: undefined;
284
- reset_password_email?: undefined;
285
- appId?: undefined;
286
- appSecret?: undefined;
287
- location?: undefined;
288
- bucket?: undefined;
289
- region?: undefined;
290
- endpointUrl?: undefined;
291
- host?: undefined;
292
- username?: undefined;
293
- port?: undefined;
294
- protocol?: undefined;
295
- type?: undefined;
296
- name?: undefined;
297
- accessToken?: undefined;
298
- id?: undefined;
299
- };
300
- };
301
285
  syncMode: SyncMode;
302
286
  syncFields: Record<string, boolean>;
303
- fieldGroups: import("../utils/config-merge").SyncFieldGroupDef[];
304
- allFieldDefs: import("../utils/config-merge").SyncFieldDef[];
305
- getFieldsByGroup: typeof getFieldsByGroup;
287
+ totalSyncFields: number;
288
+ private configSubscription;
306
289
  true: any;
307
- constructor(config: ConfigService, toast: ToastrService, platform: PlatformService);
290
+ constructor(config: ConfigService, toast: ToastrService, platform: PlatformService, customFieldsDialog: CustomSyncFieldsDialogService);
308
291
  ngOnInit(): void;
292
+ ngOnDestroy(): void;
293
+ refreshLocale(): void;
294
+ getCustomFieldsSummary(): string;
295
+ onSyncModeChange(mode: SyncMode): void;
296
+ openCustomFieldsDialog(): Promise<void>;
309
297
  checkForNewVersion(): Promise<void>;
310
298
  onSelectProviderChange(): void;
311
299
  toggleEnableSync(): Promise<void>;
@@ -0,0 +1,262 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
3
+ import { PlatformService } from 'terminus-core';
4
+ import { getFieldsByGroup, getGroupLabel, getFieldLabel } from '../../utils/config-merge';
5
+ export declare class CustomSyncFieldsDialogComponent implements OnInit {
6
+ activeModal: NgbActiveModal;
7
+ platform: PlatformService;
8
+ translate: {
9
+ lang: {
10
+ common: {
11
+ menu_title: {
12
+ en: string;
13
+ zh: string;
14
+ };
15
+ verifyConfigString: string;
16
+ config_inject_header: string;
17
+ errors: {
18
+ invalidServerConfig: {
19
+ en: string;
20
+ zh: string;
21
+ };
22
+ };
23
+ };
24
+ tabs: {
25
+ general: {
26
+ en: string;
27
+ zh: string;
28
+ };
29
+ sync_settings: {
30
+ en: string;
31
+ zh: string;
32
+ };
33
+ feedback: {
34
+ en: string;
35
+ zh: string;
36
+ };
37
+ support_us: {
38
+ en: string;
39
+ zh: string;
40
+ };
41
+ change_logs: {
42
+ en: string;
43
+ zh: string;
44
+ };
45
+ check_for_update: {
46
+ en: string;
47
+ zh: string;
48
+ };
49
+ logs: {
50
+ en: string;
51
+ zh: string;
52
+ };
53
+ };
54
+ form: {
55
+ error: {
56
+ required_all: {
57
+ en: string;
58
+ zh: string;
59
+ };
60
+ };
61
+ };
62
+ settings: {
63
+ title: {
64
+ en: string;
65
+ zh: string;
66
+ };
67
+ sub_title: {
68
+ en: string;
69
+ zh: string;
70
+ };
71
+ service_label: {
72
+ en: string;
73
+ zh: string;
74
+ };
75
+ amazon: {
76
+ connected: string;
77
+ save_settings_failed: string;
78
+ save_settings_success: string;
79
+ };
80
+ error_connection_timeout: string;
81
+ };
82
+ sync: {
83
+ loading_config: {
84
+ en: string;
85
+ zh: string;
86
+ };
87
+ sync_confirmation: {
88
+ en: string;
89
+ zh: string;
90
+ };
91
+ setting_valid: {
92
+ en: string;
93
+ zh: string;
94
+ };
95
+ error_setting_save_file: string;
96
+ error_connection: {
97
+ en: string;
98
+ zh: string;
99
+ };
100
+ error_invalid_setting: string;
101
+ error_invalid_setting_2: string;
102
+ error_save_setting: string;
103
+ need_to_save_config: string;
104
+ sync_success: string;
105
+ sync_error: string;
106
+ sync_server_failed: string;
107
+ sync_enabled: string;
108
+ sync_disabled: string;
109
+ confirm_remove_setting: string;
110
+ remove_setting_success: string;
111
+ remove_setting_error: string;
112
+ setting_changes_saved: string;
113
+ sync_sections_saved: {
114
+ en: string;
115
+ zh: string;
116
+ };
117
+ sync_mode_full: {
118
+ en: string;
119
+ zh: string;
120
+ };
121
+ sync_mode_full_desc: {
122
+ en: string;
123
+ zh: string;
124
+ };
125
+ sync_mode_platform_safe: {
126
+ en: string;
127
+ zh: string;
128
+ };
129
+ sync_mode_platform_safe_desc: {
130
+ en: string;
131
+ zh: string;
132
+ };
133
+ sync_mode_custom: {
134
+ en: string;
135
+ zh: string;
136
+ };
137
+ sync_mode_custom_desc: {
138
+ en: string;
139
+ zh: string;
140
+ };
141
+ sync_mode_selective: {
142
+ en: string;
143
+ zh: string;
144
+ };
145
+ sync_sections_title: {
146
+ en: string;
147
+ zh: string;
148
+ };
149
+ sync_sections_hint: {
150
+ en: string;
151
+ zh: string;
152
+ };
153
+ manual_sync_title: {
154
+ en: string;
155
+ zh: string;
156
+ };
157
+ manual_sync_confirm: {
158
+ en: string;
159
+ zh: string;
160
+ };
161
+ custom_fields_title: {
162
+ en: string;
163
+ zh: string;
164
+ };
165
+ custom_fields_hint: {
166
+ en: string;
167
+ zh: string;
168
+ };
169
+ configure_custom_items: {
170
+ en: string;
171
+ zh: string;
172
+ };
173
+ custom_fields_summary: {
174
+ en: string;
175
+ zh: string;
176
+ };
177
+ save_sync_settings: {
178
+ en: string;
179
+ zh: string;
180
+ };
181
+ };
182
+ log: {
183
+ invalid_cloud_settings: string;
184
+ read_cloud_settings: string;
185
+ error_upload_settings: string;
186
+ error_test_connection: string;
187
+ };
188
+ s3: {
189
+ title: string;
190
+ title_blackblaze: string;
191
+ app_id_placeholder: string;
192
+ app_secret_placeholder: string;
193
+ blackblaze_key_placeholder: string;
194
+ blackblaze_app_key_placeholder: string;
195
+ bucket_placeholder: string;
196
+ region_placeholder: string;
197
+ blackblaze_bucket_placeholder: string;
198
+ endpoint_placeholder: string;
199
+ location_placeholder: string;
200
+ };
201
+ ftp: {
202
+ title: string;
203
+ host_placeholder: string;
204
+ location_placeholder: string;
205
+ username_placeholder: string;
206
+ password_placeholder: string;
207
+ port_placeholder: string;
208
+ };
209
+ webdav: {
210
+ title: string;
211
+ host_placeholder: string;
212
+ username_placeholder: string;
213
+ password_placeholder: string;
214
+ port_placeholder: string;
215
+ location_placeholder: string;
216
+ };
217
+ gist: {
218
+ title: string;
219
+ name: string;
220
+ id: string;
221
+ token: string;
222
+ invalid_provider: string;
223
+ enter_id: string;
224
+ error_create_gist: string;
225
+ };
226
+ buttons: {
227
+ sync_from_cloud: string;
228
+ sync_from_local: string;
229
+ check_update: string;
230
+ yes: string;
231
+ cancel: {
232
+ en: string;
233
+ zh: string;
234
+ };
235
+ no: string;
236
+ ok: {
237
+ en: string;
238
+ zh: string;
239
+ };
240
+ view: string;
241
+ test_connection: string;
242
+ processing: string;
243
+ save_settings: string;
244
+ upload_settings: string;
245
+ cloud_syncing_progress: string;
246
+ remove_saved_setting: string;
247
+ };
248
+ };
249
+ refreshLocale(platform: PlatformService): void;
250
+ isChinese(): boolean;
251
+ trans: (key: string, vars?: Record<string, string | number>) => string;
252
+ };
253
+ fieldGroups: import("../../utils/config-merge").SyncFieldGroupDef[];
254
+ getFieldsByGroup: typeof getFieldsByGroup;
255
+ getGroupLabel: typeof getGroupLabel;
256
+ getFieldLabel: typeof getFieldLabel;
257
+ syncFields: Record<string, boolean>;
258
+ constructor(activeModal: NgbActiveModal, platform: PlatformService);
259
+ ngOnInit(): void;
260
+ confirm(): void;
261
+ cancel(): void;
262
+ }
@@ -2,6 +2,7 @@ import { OnInit } from '@angular/core';
2
2
  import { PlatformService } from 'terminus-core';
3
3
  export declare class CloudSyncAboutComponent implements OnInit {
4
4
  private platform;
5
+ showDonationLink: boolean;
5
6
  info: {
6
7
  author: string;
7
8
  support_url: string;