terminus-cloud-settings-sync
Version:
Cloud Services sync the Tabby config and connections across platform devices.
342 lines (341 loc) • 11.4 kB
TypeScript
import { EventEmitter, OnInit } from '@angular/core';
import { ConfigService, PlatformService } from 'terminus-core';
import { ToastrService } from 'ngx-toastr';
interface formData {
protocol: string;
host: string;
username: string;
password: string;
location: string;
port: string;
}
export declare class CloudSyncFtpSettingsComponent implements OnInit {
private config;
private platform;
private toast;
resetFormMessages: EventEmitter<unknown>;
setFormMessage: EventEmitter<unknown>;
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;
};
presetData: {
defaultSyncInterval: number;
tabbySettingsFilename: string;
storedSettingsFilename: string;
cloudSettingsFilename: string;
tabbyLocalEncryptedFile: string;
values: {
BUILT_IN: string;
S3: string;
WASABI: string;
DIGITAL_OCEAN: string;
BLACKBLAZE: string;
S3_COMPATIBLE: string;
WEBDAV: string;
FTP: string;
GIST: string;
DROPBOX: string;
};
amazonEndpoints: {
WASABI: string;
DIGITAL_OCEAN: string;
BLACKBLAZE: string;
S3_COMPATIBLE: string;
};
serviceProvidersList: {
name: string;
value: string;
}[];
BuiltinLoginMode: {
LOGIN: string;
RESET_PASSWORD: string;
};
availablePluginVersions: string[];
formData: {
[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;
};
};
external_urls: {
ApiUrl: string;
BlackBlazeHelp: string;
checkForUpdateUrl: string;
};
isCloudStorageS3Compatibility(provider: string): boolean;
gistUrls: {
viewItems: {
github: string;
gitee: string;
gitlab: string;
};
github: string;
gitee: string;
gitlab: string;
};
donationUrl: string;
pluginUrl: string;
};
isPreloadingSavedConfig: boolean;
isSettingSaved: boolean;
isCheckLoginSuccess: boolean;
isSyncingProgress: boolean;
isFormProcessing: boolean;
passwordFieldType: string;
protocol: {
value: string;
name: string;
}[];
form: formData;
constructor(config: ConfigService, platform: PlatformService, toast: ToastrService);
ngOnInit(): void;
toggleViewPassword(): void;
testConnection(): Promise<void>;
saveSettings(): Promise<void>;
cancelSaveSettings(): void;
removeSavedSettings(): Promise<void>;
}
export {};