mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-10 18:04:06 +02:00
feat: add Cloud Save settings page (UI only)
- Add cloud upload settings to settings model (provider, URL, credentials, path) - Create CloudSettingsPage with WebDAV and SFTP provider options - Add Cloud Save menu item in main settings - Add localization strings for cloud settings - Actual upload implementation will come in v3.4.0 Settings fields added: - cloudUploadEnabled: toggle auto-upload - cloudProvider: 'webdav', 'sftp', or 'none' - cloudServerUrl: server URL - cloudUsername/cloudPassword: credentials - cloudRemotePath: destination folder path
This commit is contained in:
1 parent
5e19178bc0
commit
8c201b5b4a
21 files changed
+2793
-3040
No files matched your search
@@ -250,6 +250,56 @@ void setUseAllFilesAccess(bool enabled) {
|
||||
state = state.copyWith(downloadNetworkMode: mode);
|
||||
_saveSettings();
|
||||
}
|
||||
|
||||
// Cloud Upload Settings
|
||||
void setCloudUploadEnabled(bool enabled) {
|
||||
state = state.copyWith(cloudUploadEnabled: enabled);
|
||||
_saveSettings();
|
||||
}
|
||||
|
||||
void setCloudProvider(String provider) {
|
||||
state = state.copyWith(cloudProvider: provider);
|
||||
_saveSettings();
|
||||
}
|
||||
|
||||
void setCloudServerUrl(String url) {
|
||||
state = state.copyWith(cloudServerUrl: url);
|
||||
_saveSettings();
|
||||
}
|
||||
|
||||
void setCloudUsername(String username) {
|
||||
state = state.copyWith(cloudUsername: username);
|
||||
_saveSettings();
|
||||
}
|
||||
|
||||
void setCloudPassword(String password) {
|
||||
state = state.copyWith(cloudPassword: password);
|
||||
_saveSettings();
|
||||
}
|
||||
|
||||
void setCloudRemotePath(String path) {
|
||||
state = state.copyWith(cloudRemotePath: path);
|
||||
_saveSettings();
|
||||
}
|
||||
|
||||
void setCloudSettings({
|
||||
bool? enabled,
|
||||
String? provider,
|
||||
String? serverUrl,
|
||||
String? username,
|
||||
String? password,
|
||||
String? remotePath,
|
||||
}) {
|
||||
state = state.copyWith(
|
||||
cloudUploadEnabled: enabled ?? state.cloudUploadEnabled,
|
||||
cloudProvider: provider ?? state.cloudProvider,
|
||||
cloudServerUrl: serverUrl ?? state.cloudServerUrl,
|
||||
cloudUsername: username ?? state.cloudUsername,
|
||||
cloudPassword: password ?? state.cloudPassword,
|
||||
cloudRemotePath: remotePath ?? state.cloudRemotePath,
|
||||
);
|
||||
_saveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
final settingsProvider = NotifierProvider<SettingsNotifier, AppSettings>(
|
||||
|
||||
Reference in new issue
Block a user