mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
提示调整
This commit is contained in:
@@ -114,7 +114,7 @@ class VideoPopupMenu extends StatelessWidget {
|
|||||||
// ),
|
// ),
|
||||||
PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
MineController.onChangeAnonymity();
|
MineController.onChangeAnonymity(context);
|
||||||
},
|
},
|
||||||
value: 'anonymous',
|
value: 'anonymous',
|
||||||
height: menuItemHeight,
|
height: menuItemHeight,
|
||||||
|
|||||||
@@ -89,16 +89,40 @@ class MineController extends GetxController {
|
|||||||
anonymity = false;
|
anonymity = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static onChangeAnonymity() {
|
static onChangeAnonymity(BuildContext context) {
|
||||||
anonymity = !anonymity;
|
anonymity = !anonymity;
|
||||||
SmartDialog.showToast(anonymity
|
if (anonymity) {
|
||||||
? '\n【已进入无痕模式】\n\n'
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
'搜索、观看视频或直播均不携带Cookie与CSRF\n'
|
SnackBar(
|
||||||
'不产生查询或播放记录\n'
|
content: const Text('\n已进入无痕模式\n\n'
|
||||||
'点赞等其它操作不受影响\n\n'
|
'* 搜索、观看视频或直播均不携带Cookie与CSRF,'
|
||||||
'仅本次启动有效,可随时退出\n\n'
|
'不产生查询或播放记录\n'
|
||||||
'*可在隐私设置了解更多\n'
|
'点赞等其它操作不受影响\n\n'
|
||||||
: '【已退出无痕模式】');
|
'仅本次启动有效,可随时退出\n\n'
|
||||||
|
'*可在隐私设置了解更多'),
|
||||||
|
duration: const Duration(seconds: 1),
|
||||||
|
action: SnackBarAction(
|
||||||
|
label: '设为永久',
|
||||||
|
onPressed: () {
|
||||||
|
SmartDialog.showToast('暂不支持');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
showCloseIcon: true,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(
|
||||||
|
content: Text('【已退出无痕模式】'),
|
||||||
|
duration: Duration(seconds: 1),
|
||||||
|
// action: SnackBarAction(
|
||||||
|
// label: '确认',
|
||||||
|
// onPressed: () {},
|
||||||
|
// ),
|
||||||
|
showCloseIcon: true,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeTheme() {
|
onChangeTheme() {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class _MinePageState extends State<MinePage> {
|
|||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
MineController.onChangeAnonymity();
|
MineController.onChangeAnonymity(context);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
Reference in New Issue
Block a user