Add some warning if server running in docker

This commit is contained in:
2024-02-06 21:44:35 +08:00
parent 4eb43cfbca
commit c2a8355b25
3 changed files with 11 additions and 4 deletions

View File

@@ -142,5 +142,6 @@
"keyIsExists": "Key is exists.",
"redirectToFlutter": "Redirect to Flutter frontend when accessing the root URL.",
"downloadTimeoutCheckInterval": "The interval of checking download timeout",
"downloadTimeoutCheckIntervalHelp": "The smaller the value, the more accurate the timeout detection, but the higher CPU usage."
"downloadTimeoutCheckIntervalHelp": "The smaller the value, the more accurate the timeout detection, but the higher CPU usage.",
"dockerHelper": "The server is running in a Docker container. Unless you know what you are doing, do not change this setting."
}

View File

@@ -142,5 +142,6 @@
"keyIsExists": "键已存在。",
"redirectToFlutter": "访问根 URL 时重定向到 flutter 前端。",
"downloadTimeoutCheckInterval": "下载超时检测间隔",
"downloadTimeoutCheckIntervalHelp": "值越小,检测准确性越高,但是消耗更多的 CPU。"
"downloadTimeoutCheckIntervalHelp": "值越小,检测准确性越高,但是消耗更多的 CPU。",
"dockerHelper": "服务器运行在 Docker 容器中。除非你知道你在做什么,否则不要修改这个设置。"
}

View File

@@ -327,8 +327,9 @@ class _ServerSettingsPage extends State<ServerSettingsPage>
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: i18n.serverDbPath,
helperText:
auth.isDocker == true ? null : i18n.serverDbPathHelp,
helperText: auth.isDocker == true
? i18n.dockerHelper
: i18n.serverDbPathHelp,
),
onChanged: (s) {
setState(() {
@@ -364,6 +365,7 @@ class _ServerSettingsPage extends State<ServerSettingsPage>
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: i18n.downloadLocation,
helperText: auth.isDocker == true ? i18n.dockerHelper : null,
),
onChanged: (s) {
setState(() {
@@ -499,6 +501,7 @@ class _ServerSettingsPage extends State<ServerSettingsPage>
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: i18n.ffmpegPath,
helperText: auth.isDocker == true ? i18n.dockerHelper : null,
),
onChanged: (s) {
setState(() {
@@ -534,6 +537,7 @@ class _ServerSettingsPage extends State<ServerSettingsPage>
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: i18n.thumbnailDir,
helperText: auth.isDocker == true ? i18n.dockerHelper : null,
),
onChanged: (s) {
setState(() {
@@ -616,6 +620,7 @@ class _ServerSettingsPage extends State<ServerSettingsPage>
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: i18n.flutterFrontend,
helperText: auth.isDocker == true ? i18n.dockerHelper : null,
),
onChanged: (s) {
setState(() {