mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -99,95 +99,113 @@ class MineController extends GetxController {
|
||||
anonymity = !anonymity;
|
||||
if (anonymity) {
|
||||
SmartDialog.show(
|
||||
clickMaskDismiss: false,
|
||||
usePenetrate: true,
|
||||
displayTime: const Duration(seconds: 2),
|
||||
alignment: Alignment.bottomCenter,
|
||||
builder: (context) {
|
||||
return ColoredBox(
|
||||
color: Theme.of(context).colorScheme.primaryContainer,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(vertical: 15, horizontal: 20),
|
||||
child:
|
||||
Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Icon(
|
||||
MdiIcons.incognito,
|
||||
clickMaskDismiss: false,
|
||||
usePenetrate: true,
|
||||
displayTime: const Duration(seconds: 2),
|
||||
alignment: Alignment.bottomCenter,
|
||||
builder: (context) {
|
||||
return ColoredBox(
|
||||
color: Theme.of(context).colorScheme.primaryContainer,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 15,
|
||||
left: 20,
|
||||
right: 20,
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 15,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Icon(
|
||||
MdiIcons.incognito,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text('已进入无痕模式',
|
||||
style: Theme.of(context).textTheme.titleMedium)
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
'搜索、观看视频/直播不携带身份信息(包含大会员)\n'
|
||||
'不产生查询或播放记录\n'
|
||||
'点赞等其它操作不受影响\n'
|
||||
'(前往隐私设置了解详情)',
|
||||
style: Theme.of(context).textTheme.bodySmall),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
SmartDialog.dismiss();
|
||||
setting.put(SettingBoxKey.anonymity, true);
|
||||
anonymity = true;
|
||||
SmartDialog.showToast('已设为永久无痕模式');
|
||||
},
|
||||
child: Text(
|
||||
'保存为永久',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
)),
|
||||
const SizedBox(width: 10),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
SmartDialog.dismiss();
|
||||
setting.put(SettingBoxKey.anonymity, false);
|
||||
anonymity = true;
|
||||
SmartDialog.showToast('已设为临时无痕模式');
|
||||
},
|
||||
child: Text(
|
||||
'仅本次(默认)',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text('已进入无痕模式',
|
||||
style: Theme.of(context).textTheme.titleMedium)
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
'搜索、观看视频/直播不携带身份信息(包含大会员)\n'
|
||||
'不产生查询或播放记录\n'
|
||||
'点赞等其它操作不受影响\n'
|
||||
'(前往隐私设置了解详情)',
|
||||
style: Theme.of(context).textTheme.bodySmall),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
SmartDialog.dismiss();
|
||||
setting.put(SettingBoxKey.anonymity, true);
|
||||
anonymity = true;
|
||||
SmartDialog.showToast('已设为永久无痕模式');
|
||||
},
|
||||
child: Text(
|
||||
'保存为永久',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
)),
|
||||
const SizedBox(width: 10),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
SmartDialog.dismiss();
|
||||
setting.put(SettingBoxKey.anonymity, false);
|
||||
anonymity = true;
|
||||
SmartDialog.showToast('已设为临时无痕模式');
|
||||
},
|
||||
child: Text(
|
||||
'仅本次(默认)',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
)),
|
||||
]),
|
||||
])),
|
||||
// duration: const Duration(seconds: 2),
|
||||
// showCloseIcon: true,
|
||||
);
|
||||
});
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
// duration: const Duration(seconds: 2),
|
||||
// showCloseIcon: true,
|
||||
);
|
||||
},
|
||||
);
|
||||
} else {
|
||||
setting.put(SettingBoxKey.anonymity, false);
|
||||
SmartDialog.show(
|
||||
clickMaskDismiss: false,
|
||||
usePenetrate: true,
|
||||
displayTime: const Duration(seconds: 1),
|
||||
alignment: Alignment.bottomCenter,
|
||||
builder: (context) {
|
||||
return ColoredBox(
|
||||
color: Theme.of(context).colorScheme.secondaryContainer,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 15, horizontal: 20),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
MdiIcons.incognitoOff,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text('已退出无痕模式',
|
||||
style: Theme.of(context).textTheme.titleMedium),
|
||||
],
|
||||
)));
|
||||
});
|
||||
clickMaskDismiss: false,
|
||||
usePenetrate: true,
|
||||
displayTime: const Duration(seconds: 1),
|
||||
alignment: Alignment.bottomCenter,
|
||||
builder: (context) {
|
||||
return ColoredBox(
|
||||
color: Theme.of(context).colorScheme.secondaryContainer,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 15,
|
||||
left: 20,
|
||||
right: 20,
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 15,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
MdiIcons.incognitoOff,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text('已退出无痕模式',
|
||||
style: Theme.of(context).textTheme.titleMedium),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user