|
|
@@ -13,6 +13,7 @@ import 'package:nomo/app/widgets/click_opacity.dart';
|
|
|
import 'package:nomo/app/widgets/ix_image.dart';
|
|
|
import 'package:nomo/config/theme/theme_extensions/theme_extension.dart';
|
|
|
import 'package:nomo/utils/device_manager.dart';
|
|
|
+import 'package:nomo/utils/misc.dart';
|
|
|
|
|
|
import '../../../constants/enums.dart';
|
|
|
import '../../../data/sp/ix_sp.dart';
|
|
|
@@ -54,7 +55,11 @@ class SettingView extends BaseView<SettingController> {
|
|
|
// _buildSecuritySection(),
|
|
|
|
|
|
// 底部间距
|
|
|
- SliverSafeArea(sliver: SliverToBoxAdapter(child: 0.verticalSpace)),
|
|
|
+ SliverSafeArea(
|
|
|
+ sliver: SliverToBoxAdapter(
|
|
|
+ child: isDesktop ? 14.verticalSpace : 0.verticalSpace,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
],
|
|
|
);
|
|
|
}
|
|
|
@@ -161,6 +166,7 @@ class SettingView extends BaseView<SettingController> {
|
|
|
title:
|
|
|
'UID ${DeviceManager.getCacheDeviceId().length > 12 ? '${DeviceManager.getCacheDeviceId().substring(0, 6)}***${DeviceManager.getCacheDeviceId().substring(DeviceManager.getCacheDeviceId().length - 6)}' : DeviceManager.getCacheDeviceId()}',
|
|
|
showInfo: true,
|
|
|
+ disableFeedback: true,
|
|
|
trailing: ClickOpacity(
|
|
|
onTap: () {
|
|
|
Clipboard.setData(
|
|
|
@@ -177,7 +183,6 @@ class SettingView extends BaseView<SettingController> {
|
|
|
color: Get.reactiveTheme.hintColor,
|
|
|
),
|
|
|
),
|
|
|
- onTap: () {},
|
|
|
onInfoTap: () {
|
|
|
AllDialog.showUidInfo();
|
|
|
},
|
|
|
@@ -214,6 +219,7 @@ class SettingView extends BaseView<SettingController> {
|
|
|
// ),
|
|
|
// _buildDivider(),
|
|
|
_buildSettingItem(
|
|
|
+ disableFeedback: true,
|
|
|
icon: IconFont.icon30,
|
|
|
iconColor: Get.reactiveTheme.shadowColor,
|
|
|
title: Strings.validTerm.tr,
|
|
|
@@ -515,35 +521,38 @@ class SettingView extends BaseView<SettingController> {
|
|
|
SystemHelper.openTermsOfService();
|
|
|
},
|
|
|
),
|
|
|
- _buildDivider(),
|
|
|
- _buildSettingItem(
|
|
|
- svgPath: Assets.pushNotifications,
|
|
|
- iconColor: DarkThemeColors.settingAppLinearGradientStartColor,
|
|
|
- iconGradient: LinearGradient(
|
|
|
- colors: [
|
|
|
- DarkThemeColors.settingAppLinearGradientStartColor,
|
|
|
- DarkThemeColors.settingAppLinearGradientEndColor,
|
|
|
- ],
|
|
|
- begin: Alignment.topCenter,
|
|
|
- end: Alignment.bottomCenter,
|
|
|
- ),
|
|
|
- title: Strings.pushNotifications.tr,
|
|
|
- trailing: Obx(
|
|
|
- () => CupertinoSwitch(
|
|
|
- value: controller.pushNotifications,
|
|
|
- onChanged: (value) {
|
|
|
- controller.showNotificationConfigPage();
|
|
|
- },
|
|
|
- activeTrackColor: Get.reactiveTheme.shadowColor,
|
|
|
- thumbColor: Colors.white,
|
|
|
- inactiveThumbColor: Colors.white,
|
|
|
- inactiveTrackColor: Colors.grey,
|
|
|
+ // 桌面版本不显示通知
|
|
|
+ if (!isDesktop) ...[
|
|
|
+ _buildDivider(),
|
|
|
+ _buildSettingItem(
|
|
|
+ svgPath: Assets.pushNotifications,
|
|
|
+ iconColor: DarkThemeColors.settingAppLinearGradientStartColor,
|
|
|
+ iconGradient: LinearGradient(
|
|
|
+ colors: [
|
|
|
+ DarkThemeColors.settingAppLinearGradientStartColor,
|
|
|
+ DarkThemeColors.settingAppLinearGradientEndColor,
|
|
|
+ ],
|
|
|
+ begin: Alignment.topCenter,
|
|
|
+ end: Alignment.bottomCenter,
|
|
|
+ ),
|
|
|
+ title: Strings.pushNotifications.tr,
|
|
|
+ trailing: Obx(
|
|
|
+ () => CupertinoSwitch(
|
|
|
+ value: controller.pushNotifications,
|
|
|
+ onChanged: (value) {
|
|
|
+ controller.showNotificationConfigPage();
|
|
|
+ },
|
|
|
+ activeTrackColor: Get.reactiveTheme.shadowColor,
|
|
|
+ thumbColor: Colors.white,
|
|
|
+ inactiveThumbColor: Colors.white,
|
|
|
+ inactiveTrackColor: Colors.grey,
|
|
|
+ ),
|
|
|
),
|
|
|
+ onTap: () {
|
|
|
+ controller.showNotificationConfigPage();
|
|
|
+ },
|
|
|
),
|
|
|
- onTap: () {
|
|
|
- controller.showNotificationConfigPage();
|
|
|
- },
|
|
|
- ),
|
|
|
+ ],
|
|
|
_buildDivider(),
|
|
|
_buildSettingItem(
|
|
|
icon: IconFont.icon39,
|
|
|
@@ -681,6 +690,7 @@ class SettingView extends BaseView<SettingController> {
|
|
|
Widget? trailing,
|
|
|
VoidCallback? onTap,
|
|
|
VoidCallback? onInfoTap,
|
|
|
+ bool disableFeedback = false,
|
|
|
}) {
|
|
|
// 确保至少提供了 icon 或 svgPath 之一
|
|
|
assert(
|
|
|
@@ -690,6 +700,7 @@ class SettingView extends BaseView<SettingController> {
|
|
|
|
|
|
return ClickOpacity(
|
|
|
onTap: onTap,
|
|
|
+ disableFeedback: disableFeedback,
|
|
|
child: Container(
|
|
|
height: 56.w,
|
|
|
padding: EdgeInsets.symmetric(horizontal: 14.w),
|