lot of things idk

This commit is contained in:
Kima
2024-02-15 19:52:04 +01:00
parent 41a5f7c539
commit a055de9046
8 changed files with 135 additions and 172 deletions

View File

@@ -36,7 +36,7 @@ class MenuNotifications extends StatelessWidget {
],
),
leading: Icon(
FeatherIcons.messageSquare,
FeatherIcons.messageCircle,
size: 22.0,
color: AppColors.of(context).text.withOpacity(0.95),
),

View File

@@ -751,19 +751,6 @@ class SettingsScreenState extends State<SettingsScreen>
],
),
),
// // general things
// Padding(
// padding:
// const EdgeInsets.symmetric(vertical: 12.0, horizontal: 24.0),
// child: Panel(
// title: Text("general".i18n),
// child: Column(
// children: [
// WelcomeMessagePanelButton(settings, user),
// ],
// ),
// ),
// ),
// // icon gallery (debug mode)
if (kDebugMode)
@@ -792,90 +779,6 @@ class SettingsScreenState extends State<SettingsScreen>
),
),
// // appearance things
// Padding(
// padding:
// const EdgeInsets.symmetric(vertical: 12.0, horizontal: 24.0),
// child: Panel(
// title: Text("appearance".i18n),
// child: Column(
// children: [
// // if ios show live activity color option
// if (defaultTargetPlatform == TargetPlatform.iOS)
// PanelButton(
// onPressed: () {
// if (!Provider.of<PremiumProvider>(context,
// listen: false)
// .hasScope(PremiumScopes.liveActivityColor)) {
// PremiumLockedFeatureUpsell.show(
// context: context,
// feature: PremiumFeature.liveActivity);
// return;
// }
// SettingsHelper.liveActivityColor(context);
// setState(() {});
// },
// title: Text("live_activity_color".i18n),
// leading: const Icon(FeatherIcons.activity),
// trailing: Container(
// width: 12.0,
// height: 12.0,
// decoration: BoxDecoration(
// color: settings.liveActivityColor,
// shape: BoxShape.circle,
// ),
// ),
// ),
// ],
// ),
// ),
// ),
// // popup alerts
// Padding(
// padding:
// const EdgeInsets.symmetric(vertical: 12.0, horizontal: 24.0),
// child: Panel(
// title: Text("popups".i18n),
// child: Material(
// type: MaterialType.transparency,
// child: SwitchListTile(
// contentPadding: const EdgeInsets.only(left: 12.0),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(12.0)),
// title: Row(
// children: [
// Icon(
// Icons.newspaper_outlined,
// color: settings.newsEnabled
// ? Theme.of(context).colorScheme.secondary
// : AppColors.of(context).text.withOpacity(.25),
// ),
// const SizedBox(width: 14.0),
// Expanded(
// child: Text(
// "news".i18n,
// style: TextStyle(
// fontWeight: FontWeight.w600,
// fontSize: 16.0,
// color: AppColors.of(context)
// .text
// .withOpacity(settings.newsEnabled ? 1.0 : .5),
// ),
// ),
// ),
// ],
// ),
// onChanged: (v) => settings.update(newsEnabled: v),
// value: settings.newsEnabled,
// activeColor: Theme.of(context).colorScheme.secondary,
// ),
// ),
// ),
// ),
// // extra settings
// Padding(
// padding:
@@ -884,39 +787,6 @@ class SettingsScreenState extends State<SettingsScreen>
// title: Text("extras".i18n),
// child: Column(
// children: [
// Material(
// type: MaterialType.transparency,
// child: SwitchListTile(
// contentPadding: const EdgeInsets.only(left: 12.0),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(12.0)),
// title: Row(
// children: [
// Icon(
// FeatherIcons.gift,
// color: settings.gradeOpeningFun
// ? Theme.of(context).colorScheme.secondary
// : AppColors.of(context).text.withOpacity(.25),
// ),
// const SizedBox(width: 14.0),
// Expanded(
// child: Text(
// "surprise_grades".i18n,
// style: TextStyle(
// fontWeight: FontWeight.w600,
// fontSize: 16.0,
// color: AppColors.of(context).text.withOpacity(
// settings.gradeOpeningFun ? 1.0 : .5),
// ),
// ),
// ),
// ],
// ),
// onChanged: (v) => settings.update(gradeOpeningFun: v),
// value: settings.gradeOpeningFun,
// activeColor: Theme.of(context).colorScheme.secondary,
// ),
// ),
// PremiumCustomAppIconMenu(
// settings: settings,
// ),
@@ -1113,9 +983,7 @@ class SettingsScreenState extends State<SettingsScreen>
),
PanelButton(
title: const Text('pushTimetableToCalendar'),
onPressed: () async {
},
onPressed: () async {},
),
],
),

View File

@@ -305,7 +305,9 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
),
),
leading: Icon(
FeatherIcons.eye,
settingsProvider.showBreaks
? FeatherIcons.eye
: FeatherIcons.eyeOff,
size: 22.0,
color: AppColors.of(context)
.text
@@ -323,6 +325,43 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
),
],
),
SplittedPanel(
padding: const EdgeInsets.only(top: 9.0),
cardPadding: const EdgeInsets.all(4.0),
isSeparated: true,
children: [
PanelButton(
padding: const EdgeInsets.only(left: 14.0, right: 6.0),
onPressed: () {
settingsProvider.update(
newsEnabled: !settingsProvider.newsEnabled);
setState(() {});
},
title: Text(
"news".i18n,
style: TextStyle(
color: AppColors.of(context).text.withOpacity(
settingsProvider.newsEnabled ? .95 : .25),
),
),
leading: Icon(
Icons.newspaper_outlined,
size: 22.0,
color: AppColors.of(context).text.withOpacity(
settingsProvider.newsEnabled ? .95 : .25),
),
trailing: Switch(
onChanged: (v) => settingsProvider.update(newsEnabled: v),
value: settingsProvider.newsEnabled,
activeColor: Theme.of(context).colorScheme.secondary,
),
borderRadius: const BorderRadius.vertical(
top: Radius.circular(12.0),
bottom: Radius.circular(12.0),
),
),
],
),
],
),
),

View File

@@ -20,6 +20,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
import 'package:provider/provider.dart';
import 'package:filcnaplo_mobile_ui/screens/settings/settings_screen.i18n.dart';
import 'package:refilc_plus/models/premium_scopes.dart';
import 'package:refilc_plus/providers/premium_provider.dart';
import 'package:refilc_plus/ui/mobile/premium/upsell.dart';
class MenuPersonalizeSettings extends StatelessWidget {
const MenuPersonalizeSettings({
@@ -39,7 +42,7 @@ class MenuPersonalizeSettings extends StatelessWidget {
),
title: Text("personalization".i18n),
leading: Icon(
FeatherIcons.droplet,
Icons.palette_outlined,
size: 22.0,
color: AppColors.of(context).text.withOpacity(0.95),
),
@@ -440,7 +443,7 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
),
),
leading: Icon(
FeatherIcons.penTool,
Icons.school_outlined,
size: 22.0,
color: AppColors.of(context).text.withOpacity(
settingsProvider.renamedSubjectsEnabled
@@ -531,6 +534,54 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
),
],
),
// live activity color
SplittedPanel(
padding: const EdgeInsets.only(top: 9.0),
cardPadding: const EdgeInsets.all(4.0),
isSeparated: true,
children: [
PanelButton(
onPressed: () {
if (!Provider.of<PremiumProvider>(context,
listen: false)
.hasScope(PremiumScopes.liveActivityColor)) {
PremiumLockedFeatureUpsell.show(
context: context,
feature: PremiumFeature.liveActivity,
);
return;
}
SettingsHelper.liveActivityColor(context);
setState(() {});
},
title: Text(
"live_activity_color".i18n,
style: TextStyle(
color: AppColors.of(context).text.withOpacity(.95),
),
),
leading: Icon(
FeatherIcons.activity,
size: 22.0,
color: AppColors.of(context).text.withOpacity(.95),
),
trailing: Container(
margin: const EdgeInsets.only(left: 2.0),
width: 12.0,
height: 12.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: settingsProvider.liveActivityColor,
),
),
borderRadius: const BorderRadius.vertical(
top: Radius.circular(12.0),
bottom: Radius.circular(12.0),
),
),
],
),
// SplittedPanel(
// padding: const EdgeInsets.only(top: 9.0),