mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-06 19:11:11 +08:00
Update settings page
This commit is contained in:
@@ -120,5 +120,11 @@
|
||||
"thumbnailMethod0": "ffmpeg binary",
|
||||
"thumbnailMethod1": "ffmpeg API",
|
||||
"thumbnailDir": "The folder used to store thumbnails",
|
||||
"imgVerifySecret": "The secret of image verify"
|
||||
"imgVerifySecret": "The secret of image verify",
|
||||
"flutterFrontend": "The path of flutter frontend",
|
||||
"fetchTimeout": "Fetch timeout",
|
||||
"downloadTimeout": "Download timeout",
|
||||
"downloadTimeoutHelp": "The download will be terminated when nothing is received within the specified time period.",
|
||||
"millisecond": "millisecond",
|
||||
"ffprobePath": "The path to the ffprobe binary"
|
||||
}
|
||||
|
||||
@@ -120,5 +120,11 @@
|
||||
"thumbnailMethod0": "FFMPEG 二进制",
|
||||
"thumbnailMethod1": "FFMPEG API",
|
||||
"thumbnailDir": "存放缩略图的文件夹",
|
||||
"imgVerifySecret": "用于验证图片 verify 的密钥"
|
||||
"imgVerifySecret": "用于验证图片 verify 的密钥",
|
||||
"flutterFrontend": "flutter 前端路径",
|
||||
"fetchTimeout": "Fetch 超时时间",
|
||||
"downloadTimeout": "下载超时时间",
|
||||
"downloadTimeoutHelp": "当指定时间段内没有任何内容收到时,将会停止下载。",
|
||||
"millisecond": "毫秒",
|
||||
"ffprobePath": "FFPROBE 二进制的位置"
|
||||
}
|
||||
|
||||
@@ -265,7 +265,10 @@ class _ServerSettingsPage extends State<ServerSettingsPage>
|
||||
Widget _buildTextBox(BuildContext context) {
|
||||
final i18n = AppLocalizations.of(context)!;
|
||||
if (kIsWeb) {
|
||||
_uaController.text = _now.ua ?? _config!.ua ?? "";
|
||||
final t = _now.ua ?? _config!.ua ?? "";
|
||||
if (_uaController.text != t) {
|
||||
_uaController.text = t;
|
||||
}
|
||||
}
|
||||
return _buildWithHorizontalPadding(
|
||||
context,
|
||||
@@ -511,6 +514,64 @@ class _ServerSettingsPage extends State<ServerSettingsPage>
|
||||
});
|
||||
},
|
||||
)),
|
||||
_buildWithVecticalPadding(TextFormField(
|
||||
initialValue: _now.flutterFrontend ?? _config!.flutterFrontend,
|
||||
decoration: InputDecoration(
|
||||
border: const OutlineInputBorder(),
|
||||
labelText: i18n.flutterFrontend,
|
||||
),
|
||||
onChanged: (s) {
|
||||
setState(() {
|
||||
_now.flutterFrontend = s;
|
||||
_changed = true;
|
||||
});
|
||||
},
|
||||
)),
|
||||
_buildWithVecticalPadding(NumberFormField(
|
||||
min: 1,
|
||||
initialValue: _now.fetchTimeout ?? _config!.fetchTimeout,
|
||||
decoration: InputDecoration(
|
||||
border: const OutlineInputBorder(),
|
||||
labelText: i18n.fetchTimeout,
|
||||
suffixText: i18n.millisecond,
|
||||
),
|
||||
onChanged: (s) {
|
||||
setState(() {
|
||||
_now.fetchTimeout = s;
|
||||
_changed = true;
|
||||
});
|
||||
},
|
||||
)),
|
||||
_buildWithVecticalPadding(NumberFormField(
|
||||
min: 1,
|
||||
initialValue: _now.downloadTimeout ?? _config!.downloadTimeout,
|
||||
decoration: InputDecoration(
|
||||
border: const OutlineInputBorder(),
|
||||
labelText: i18n.downloadTimeout,
|
||||
suffixText: i18n.millisecond,
|
||||
helperText: i18n.downloadTimeoutHelp,
|
||||
helperMaxLines: 3,
|
||||
),
|
||||
onChanged: (s) {
|
||||
setState(() {
|
||||
_now.downloadTimeout = s;
|
||||
_changed = true;
|
||||
});
|
||||
},
|
||||
)),
|
||||
_buildWithVecticalPadding(TextFormField(
|
||||
initialValue: _now.ffprobePath ?? _config!.ffprobePath,
|
||||
decoration: InputDecoration(
|
||||
border: const OutlineInputBorder(),
|
||||
labelText: i18n.ffprobePath,
|
||||
),
|
||||
onChanged: (s) {
|
||||
setState(() {
|
||||
_now.ffprobePath = s;
|
||||
_changed = true;
|
||||
});
|
||||
},
|
||||
)),
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user