ios add settings tab
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
c9423509a9
commit
3eeed39f52
@ -395,7 +395,7 @@ class _AppState extends State<App> {
|
||||
themeMode: MyTheme.currentThemeMode(),
|
||||
home: isDesktop
|
||||
? const DesktopTabPage()
|
||||
: !isAndroid
|
||||
: isWeb
|
||||
? WebHomePage()
|
||||
: HomePage(),
|
||||
localizationsDelegates: const [
|
||||
|
@ -28,7 +28,7 @@ class ConnectionPage extends StatefulWidget implements PageShape {
|
||||
final title = translate("Connection");
|
||||
|
||||
@override
|
||||
final appBarActions = !isAndroid ? <Widget>[const WebMenu()] : <Widget>[];
|
||||
final appBarActions = isWeb ? <Widget>[const WebMenu()] : <Widget>[];
|
||||
|
||||
@override
|
||||
State<ConnectionPage> createState() => _ConnectionPageState();
|
||||
|
@ -424,41 +424,45 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
},
|
||||
)
|
||||
]),
|
||||
SettingsSection(
|
||||
title: Text(translate("Recording")),
|
||||
tiles: [
|
||||
SettingsTile.switchTile(
|
||||
title: Text(translate('Automatically record incoming sessions')),
|
||||
leading: Icon(Icons.videocam),
|
||||
description: FutureBuilder(
|
||||
builder: (ctx, data) => Offstage(
|
||||
offstage: !data.hasData,
|
||||
child: Text("${translate("Directory")}: ${data.data}")),
|
||||
future: bind.mainDefaultVideoSaveDirectory()),
|
||||
initialValue: _autoRecordIncomingSession,
|
||||
onToggle: (v) async {
|
||||
await bind.mainSetOption(
|
||||
key: "allow-auto-record-incoming",
|
||||
value: bool2option("allow-auto-record-incoming", v));
|
||||
final newValue = option2bool(
|
||||
'allow-auto-record-incoming',
|
||||
await bind.mainGetOption(
|
||||
key: 'allow-auto-record-incoming'));
|
||||
setState(() {
|
||||
_autoRecordIncomingSession = newValue;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
SettingsSection(
|
||||
title: Text(translate("Share Screen")),
|
||||
tiles: shareScreenTiles,
|
||||
),
|
||||
SettingsSection(
|
||||
title: Text(translate("Enhancements")),
|
||||
tiles: enhancementsTiles,
|
||||
),
|
||||
if (isAndroid)
|
||||
SettingsSection(
|
||||
title: Text(translate("Recording")),
|
||||
tiles: [
|
||||
SettingsTile.switchTile(
|
||||
title:
|
||||
Text(translate('Automatically record incoming sessions')),
|
||||
leading: Icon(Icons.videocam),
|
||||
description: FutureBuilder(
|
||||
builder: (ctx, data) => Offstage(
|
||||
offstage: !data.hasData,
|
||||
child: Text("${translate("Directory")}: ${data.data}")),
|
||||
future: bind.mainDefaultVideoSaveDirectory()),
|
||||
initialValue: _autoRecordIncomingSession,
|
||||
onToggle: (v) async {
|
||||
await bind.mainSetOption(
|
||||
key: "allow-auto-record-incoming",
|
||||
value: bool2option("allow-auto-record-incoming", v));
|
||||
final newValue = option2bool(
|
||||
'allow-auto-record-incoming',
|
||||
await bind.mainGetOption(
|
||||
key: 'allow-auto-record-incoming'));
|
||||
setState(() {
|
||||
_autoRecordIncomingSession = newValue;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
if (isAndroid)
|
||||
SettingsSection(
|
||||
title: Text(translate("Share Screen")),
|
||||
tiles: shareScreenTiles,
|
||||
),
|
||||
if (isAndroid)
|
||||
SettingsSection(
|
||||
title: Text(translate("Enhancements")),
|
||||
tiles: enhancementsTiles,
|
||||
),
|
||||
SettingsSection(
|
||||
title: Text(translate("About")),
|
||||
tiles: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user