mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Update
This commit is contained in:
@@ -26,6 +26,7 @@ class ServerStatus {
|
|||||||
required this.meilisearchEnabled,
|
required this.meilisearchEnabled,
|
||||||
this.meilisearch,
|
this.meilisearch,
|
||||||
required this.noUser,
|
required this.noUser,
|
||||||
|
required this.isDocker,
|
||||||
});
|
});
|
||||||
|
|
||||||
@JsonKey(name: 'ffmpeg_api_enabled')
|
@JsonKey(name: 'ffmpeg_api_enabled')
|
||||||
@@ -37,6 +38,8 @@ class ServerStatus {
|
|||||||
final MeilisearchInfo? meilisearch;
|
final MeilisearchInfo? meilisearch;
|
||||||
@JsonKey(name: 'no_user')
|
@JsonKey(name: 'no_user')
|
||||||
final bool noUser;
|
final bool noUser;
|
||||||
|
@JsonKey(name: 'is_docker')
|
||||||
|
final bool isDocker;
|
||||||
|
|
||||||
factory ServerStatus.fromJson(Map<String, dynamic> json) =>
|
factory ServerStatus.fromJson(Map<String, dynamic> json) =>
|
||||||
_$ServerStatusFromJson(json);
|
_$ServerStatusFromJson(json);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ ServerStatus _$ServerStatusFromJson(Map<String, dynamic> json) => ServerStatus(
|
|||||||
: MeilisearchInfo.fromJson(
|
: MeilisearchInfo.fromJson(
|
||||||
json['meilisearch'] as Map<String, dynamic>),
|
json['meilisearch'] as Map<String, dynamic>),
|
||||||
noUser: json['no_user'] as bool,
|
noUser: json['no_user'] as bool,
|
||||||
|
isDocker: json['is_docker'] as bool,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$ServerStatusToJson(ServerStatus instance) =>
|
Map<String, dynamic> _$ServerStatusToJson(ServerStatus instance) =>
|
||||||
@@ -36,4 +37,5 @@ Map<String, dynamic> _$ServerStatusToJson(ServerStatus instance) =>
|
|||||||
'meilisearch_enabled': instance.meilisearchEnabled,
|
'meilisearch_enabled': instance.meilisearchEnabled,
|
||||||
'meilisearch': instance.meilisearch,
|
'meilisearch': instance.meilisearch,
|
||||||
'no_user': instance.noUser,
|
'no_user': instance.noUser,
|
||||||
|
'is_docker': instance.isDocker,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class AuthInfo {
|
|||||||
bool _isChecking = false;
|
bool _isChecking = false;
|
||||||
bool get isChecking => _isChecking;
|
bool get isChecking => _isChecking;
|
||||||
bool? get isAdmin => _user?.isAdmin;
|
bool? get isAdmin => _user?.isAdmin;
|
||||||
|
bool? get isDocker => _status?.isDocker;
|
||||||
|
|
||||||
void clear() {
|
void clear() {
|
||||||
_user = null;
|
_user = null;
|
||||||
|
|||||||
@@ -387,36 +387,40 @@ class _ServerSettingsPage extends State<ServerSettingsPage>
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
_buildWithVecticalPadding(NumberFormField(
|
auth.isDocker == true
|
||||||
min: 0,
|
? Container()
|
||||||
max: 65535,
|
: _buildWithVecticalPadding(NumberFormField(
|
||||||
initialValue: _now.port ?? _config!.port,
|
min: 0,
|
||||||
decoration: InputDecoration(
|
max: 65535,
|
||||||
border: const OutlineInputBorder(),
|
initialValue: _now.port ?? _config!.port,
|
||||||
labelText: i18n.listeningPort,
|
decoration: InputDecoration(
|
||||||
),
|
border: const OutlineInputBorder(),
|
||||||
onChanged: (s) {
|
labelText: i18n.listeningPort,
|
||||||
if (s != null) {
|
),
|
||||||
setState(() {
|
onChanged: (s) {
|
||||||
_now.port = s;
|
if (s != null) {
|
||||||
_changed = true;
|
setState(() {
|
||||||
});
|
_now.port = s;
|
||||||
}
|
_changed = true;
|
||||||
},
|
});
|
||||||
)),
|
}
|
||||||
_buildWithVecticalPadding(TextFormField(
|
},
|
||||||
initialValue: _now.hostname ?? _config!.hostname,
|
)),
|
||||||
decoration: InputDecoration(
|
auth.isDocker == true
|
||||||
border: const OutlineInputBorder(),
|
? Container()
|
||||||
labelText: i18n.listeningHostname,
|
: _buildWithVecticalPadding(TextFormField(
|
||||||
),
|
initialValue: _now.hostname ?? _config!.hostname,
|
||||||
onChanged: (s) {
|
decoration: InputDecoration(
|
||||||
setState(() {
|
border: const OutlineInputBorder(),
|
||||||
_now.hostname = s;
|
labelText: i18n.listeningHostname,
|
||||||
_changed = true;
|
),
|
||||||
});
|
onChanged: (s) {
|
||||||
},
|
setState(() {
|
||||||
)),
|
_now.hostname = s;
|
||||||
|
_changed = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
)),
|
||||||
_buildWithVecticalPadding(TextFormField(
|
_buildWithVecticalPadding(TextFormField(
|
||||||
initialValue: _now.meiliHost ?? _config!.meiliHost,
|
initialValue: _now.meiliHost ?? _config!.meiliHost,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
|||||||
Reference in New Issue
Block a user