terminus-cloud-settings-sync
Version:
Cloud Services sync the Tabby config and connections across platform devices.
302 lines (301 loc) • 9.74 kB
TypeScript
import { OnInit } from '@angular/core';
import { ConfigService, PlatformService, BaseComponent } from 'terminus-core';
import { ToastrService } from 'ngx-toastr';
import { ConnectionGroup } from '../interface';
/** @hidden */
export declare class CloudSyncSettingsComponent extends BaseComponent implements OnInit {
config: ConfigService;
private toast;
private platform;
lastVersion: string;
translate: {
lang: {
common: {
menu_title: string;
verifyConfigString: string;
config_inject_header: string;
errors: {
invalidServerConfig: string;
};
};
form: {
error: {
required_all: string;
};
};
settings: {
title: string;
sub_title: string;
service_label: string;
amazon: {
connected: string;
save_settings_failed: string;
save_settings_success: string;
};
error_connection_timeout: string;
};
sync: {
loading_config: string;
sync_confirmation: string;
setting_valid: string;
error_setting_save_file: string;
error_connection: string;
error_invalid_setting: string;
error_invalid_setting_2: string;
error_save_setting: string;
need_to_save_config: string;
sync_success: string;
sync_error: string;
sync_server_failed: string;
sync_enabled: string;
sync_disabled: string;
confirm_remove_setting: string;
remove_setting_success: string;
remove_setting_error: string;
setting_changes_saved: string;
};
log: {
invalid_cloud_settings: string;
read_cloud_settings: string;
error_upload_settings: string;
error_test_connection: string;
};
s3: {
title: string;
title_blackblaze: string;
app_id_placeholder: string;
app_secret_placeholder: string;
blackblaze_key_placeholder: string;
blackblaze_app_key_placeholder: string;
bucket_placeholder: string;
region_placeholder: string;
blackblaze_bucket_placeholder: string;
endpoint_placeholder: string;
location_placeholder: string;
};
ftp: {
title: string;
host_placeholder: string;
location_placeholder: string;
username_placeholder: string;
password_placeholder: string;
port_placeholder: string;
};
webdav: {
title: string;
host_placeholder: string;
username_placeholder: string;
password_placeholder: string;
port_placeholder: string;
location_placeholder: string;
};
gist: {
title: string;
name: string;
id: string;
token: string;
invalid_provider: string;
enter_id: string;
error_create_gist: string;
};
buttons: {
sync_from_cloud: string;
sync_from_local: string;
check_update: string;
yes: string;
cancel: string;
no: string;
ok: string;
view: string;
test_connection: string;
processing: string;
save_settings: string;
upload_settings: string;
cloud_syncing_progress: string;
remove_saved_setting: string;
};
};
trans: (key: string) => string;
};
isUpdateAvailable: boolean;
isDebug: boolean;
serviceProviderValues: {
BUILT_IN: string;
S3: string;
WASABI: string;
DIGITAL_OCEAN: string;
BLACKBLAZE: string;
S3_COMPATIBLE: string;
WEBDAV: string;
FTP: string;
GIST: string;
DROPBOX: string;
};
serviceProviders: {
name: string;
value: string;
}[];
selectedProvider: string;
groups: ConnectionGroup[];
form_messages: {
errors: any[];
success: any[];
};
syncEnabled: boolean;
isShowSyncLoader: boolean;
intervalSync: number;
storedSettingsData: any;
form: {
[x: string]: {
email: string;
password: string;
reset_password_email: string;
appId?: undefined;
appSecret?: undefined;
location?: undefined;
bucket?: undefined;
region?: undefined;
endpointUrl?: undefined;
host?: undefined;
username?: undefined;
port?: undefined;
protocol?: undefined;
type?: undefined;
name?: undefined;
accessToken?: undefined;
id?: undefined;
apiKey?: undefined;
apiSecret?: undefined;
} | {
appId: string;
appSecret: string;
location: string;
bucket: string;
region: string;
email?: undefined;
password?: undefined;
reset_password_email?: undefined;
endpointUrl?: undefined;
host?: undefined;
username?: undefined;
port?: undefined;
protocol?: undefined;
type?: undefined;
name?: undefined;
accessToken?: undefined;
id?: undefined;
apiKey?: undefined;
apiSecret?: undefined;
} | {
endpointUrl: string;
appId: string;
appSecret: string;
location: string;
bucket: string;
region: string;
email?: undefined;
password?: undefined;
reset_password_email?: undefined;
host?: undefined;
username?: undefined;
port?: undefined;
protocol?: undefined;
type?: undefined;
name?: undefined;
accessToken?: undefined;
id?: undefined;
apiKey?: undefined;
apiSecret?: undefined;
} | {
host: string;
username: string;
password: string;
location: string;
port: string;
email?: undefined;
reset_password_email?: undefined;
appId?: undefined;
appSecret?: undefined;
bucket?: undefined;
region?: undefined;
endpointUrl?: undefined;
protocol?: undefined;
type?: undefined;
name?: undefined;
accessToken?: undefined;
id?: undefined;
apiKey?: undefined;
apiSecret?: undefined;
} | {
protocol: string;
host: string;
username: string;
password: string;
location: string;
port: number;
email?: undefined;
reset_password_email?: undefined;
appId?: undefined;
appSecret?: undefined;
bucket?: undefined;
region?: undefined;
endpointUrl?: undefined;
type?: undefined;
name?: undefined;
accessToken?: undefined;
id?: undefined;
apiKey?: undefined;
apiSecret?: undefined;
} | {
type: string;
name: string;
accessToken: string;
id: string;
email?: undefined;
password?: undefined;
reset_password_email?: undefined;
appId?: undefined;
appSecret?: undefined;
location?: undefined;
bucket?: undefined;
region?: undefined;
endpointUrl?: undefined;
host?: undefined;
username?: undefined;
port?: undefined;
protocol?: undefined;
apiKey?: undefined;
apiSecret?: undefined;
} | {
apiKey: string;
apiSecret: string;
email?: undefined;
password?: undefined;
reset_password_email?: undefined;
appId?: undefined;
appSecret?: undefined;
location?: undefined;
bucket?: undefined;
region?: undefined;
endpointUrl?: undefined;
host?: undefined;
username?: undefined;
port?: undefined;
protocol?: undefined;
type?: undefined;
name?: undefined;
accessToken?: undefined;
id?: undefined;
};
};
true: any;
constructor(config: ConfigService, toast: ToastrService, platform: PlatformService);
ngOnInit(): void;
checkForNewVersion(): Promise<void>;
onSelectProviderChange(): void;
toggleEnableSync(): Promise<void>;
toggleEnableShowLoader(): Promise<void>;
onIntervalSyncChanged(): void;
resetFormMessages(): void;
setFormMessage(params: any): void;
}