mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-27 21:00:17 +08:00
* opt: danmaku weight
* opt: cache clean
* opt: level img
* opt: play icon
* opt: svg big-vip
* opt: webview ua
* opt: simple dialog
* feat: export vtt
* tweak
* opt: mapIndexed
* feat: more subtitle
* refa: settings page
* feat: codec list options
* drawPath
Signed-off-by: dom <githubaccount56556@proton.me>
* custom dialog option
Signed-off-by: dom <githubaccount56556@proton.me>
* update
Signed-off-by: dom <githubaccount56556@proton.me>
* Revert "drawPath"
This reverts commit e8a4b19f0f.
* opt: _initStreamIndex
* fix: avoid gap
* fix: scale [skip ci]
* fix: hide repost menu not login
* tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
---------
Co-authored-by: dom <githubaccount56556@proton.me>
62 lines
1.8 KiB
Dart
62 lines
1.8 KiB
Dart
import 'package:PiliPlus/models/common/account_type.dart';
|
|
import 'package:PiliPlus/pages/setting/models/model.dart';
|
|
import 'package:PiliPlus/utils/accounts.dart';
|
|
import 'package:PiliPlus/utils/accounts/api_type.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
List<SettingsModel> get privacySettings => [
|
|
NormalModel(
|
|
onTap: (context, setState) {
|
|
if (!Accounts.main.isLogin) {
|
|
SmartDialog.showToast('登录后查看');
|
|
return;
|
|
}
|
|
Get.toNamed('/blackListPage');
|
|
},
|
|
title: '黑名单管理',
|
|
subtitle: '已拉黑用户',
|
|
leading: const Icon(Icons.block),
|
|
),
|
|
NormalModel(
|
|
onTap: (context, setState) {
|
|
showDialog(
|
|
context: context,
|
|
builder: (context) => AlertDialog(
|
|
title: const Text('账号模式详情'),
|
|
content: SingleChildScrollView(child: _getAccountDetail(context)),
|
|
actions: [
|
|
TextButton(
|
|
onPressed: Get.back,
|
|
child: const Text('确认'),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
},
|
|
leading: const Icon(Icons.flag_outlined),
|
|
title: '了解账号模式',
|
|
subtitle: '查看各个账号模式作用的API列表',
|
|
),
|
|
];
|
|
|
|
Widget _getAccountDetail(BuildContext context) {
|
|
final slivers = <Widget>[];
|
|
final theme = TextTheme.of(context);
|
|
for (final i in AccountType.values) {
|
|
final url = ApiType.apiTypeSet[i];
|
|
if (url == null) continue;
|
|
|
|
slivers
|
|
..add(Center(child: Text(i.title, style: theme.titleMedium)))
|
|
..add(SelectableText(url.join('\n')));
|
|
}
|
|
return Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
spacing: 8,
|
|
children: slivers,
|
|
);
|
|
}
|