mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
Improve webdav settings
This commit is contained in:
@@ -353,7 +353,11 @@
|
|||||||
"No updates found": "未找到更新",
|
"No updates found": "未找到更新",
|
||||||
"All Comics": "全部漫画",
|
"All Comics": "全部漫画",
|
||||||
"The comic will be marked as no updates as soon as you read it.": "漫画将在您阅读后立即标记为无更新",
|
"The comic will be marked as no updates as soon as you read it.": "漫画将在您阅读后立即标记为无更新",
|
||||||
"Disable": "禁用"
|
"Disable": "禁用",
|
||||||
|
"Once the operation is successful, app will automatically sync data with the server.": "操作成功后, APP将自动与服务器同步数据",
|
||||||
|
"Webdav is enabled." : "已启用Webdav",
|
||||||
|
"Cache cleared": "缓存已清除",
|
||||||
|
"Disabled": "已禁用"
|
||||||
},
|
},
|
||||||
"zh_TW": {
|
"zh_TW": {
|
||||||
"Home": "首頁",
|
"Home": "首頁",
|
||||||
@@ -709,6 +713,10 @@
|
|||||||
"No updates found": "未找到更新",
|
"No updates found": "未找到更新",
|
||||||
"All Comics": "全部漫畫",
|
"All Comics": "全部漫畫",
|
||||||
"The comic will be marked as no updates as soon as you read it.": "漫畫將在您閱讀後立即標記為無更新",
|
"The comic will be marked as no updates as soon as you read it.": "漫畫將在您閱讀後立即標記為無更新",
|
||||||
"Disable": "禁用"
|
"Disable": "禁用",
|
||||||
|
"Once the operation is successful, app will automatically sync data with the server.": "操作成功後, APP將自動與服務器同步數據",
|
||||||
|
"Webdav is enabled." : "已啟用Webdav",
|
||||||
|
"Cache cleared": "緩存已清除",
|
||||||
|
"Disabled": "已禁用"
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -332,8 +332,8 @@ class _WebdavSettingState extends State<_WebdavSetting> {
|
|||||||
String pass = "";
|
String pass = "";
|
||||||
|
|
||||||
bool isTesting = false;
|
bool isTesting = false;
|
||||||
|
|
||||||
bool upload = true;
|
bool upload = true;
|
||||||
|
bool isEnabled = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -348,6 +348,7 @@ class _WebdavSettingState extends State<_WebdavSetting> {
|
|||||||
url = configs[0];
|
url = configs[0];
|
||||||
user = configs[1];
|
user = configs[1];
|
||||||
pass = configs[2];
|
pass = configs[2];
|
||||||
|
isEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -411,6 +412,49 @@ class _WebdavSettingState extends State<_WebdavSetting> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(context).colorScheme.primaryContainer,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.info_outline, size: 20),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Expanded(
|
||||||
|
child: Text("Once the operation is successful, app will automatically sync data with the server.".tl),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (isEnabled)
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(context).colorScheme.primaryContainer,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.sync, size: 20),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Expanded(
|
||||||
|
child: Text("Webdav is enabled.".tl),
|
||||||
|
),
|
||||||
|
Button.text(
|
||||||
|
onPressed: () {
|
||||||
|
appdata.settings['webdav'] = [];
|
||||||
|
appdata.saveData();
|
||||||
|
context.showMessage(message: "Disabled".tl);
|
||||||
|
App.rootPop();
|
||||||
|
},
|
||||||
|
child: Text("Disable".tl),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
).paddingTop(16),
|
||||||
|
const SizedBox(height: 16),
|
||||||
Center(
|
Center(
|
||||||
child: Button.filled(
|
child: Button.filled(
|
||||||
isLoading: isTesting,
|
isLoading: isTesting,
|
||||||
|
Reference in New Issue
Block a user