move some settings to extras

This commit is contained in:
BalazsManus 2025-02-15 13:36:18 +01:00
parent eb0308cbed
commit 8925b3a5f8
6 changed files with 1071 additions and 1275 deletions

View File

@ -1,28 +1,28 @@
<component name="libraryTable"> <component name="libraryTable">
<library name="Dart SDK"> <library name="Dart SDK">
<CLASSES> <CLASSES>
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/async" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/async" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/cli" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/cli" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/collection" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/concurrent" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/concurrent" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/convert" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/core" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/core" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/developer" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/ffi" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/ffi" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/html" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/html" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/indexed_db" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/indexed_db" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/io" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/io" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/isolate" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/js" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/js" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/js_interop" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_interop" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/js_interop_unsafe" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_interop_unsafe" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/js_util" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_util" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/math" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/math" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/mirrors" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/svg" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/svg" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/typed_data" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/typed_data" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/web_audio" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/web_audio" />
<root url="file://$USER_HOME$/3D Objects/dart-sdk/lib/web_gl" /> <root url="file://P:/flutter/bin/cache/dart-sdk/lib/web_gl" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />

View File

@ -92,7 +92,6 @@ class SettingsScreen extends StatefulWidget {
class SettingsScreenState extends State<SettingsScreen> class SettingsScreenState extends State<SettingsScreen>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
int devmodeCountdown = 5; int devmodeCountdown = 5;
bool __ss = false; // secret settings
Future<Map>? futureRelease; Future<Map>? futureRelease;
@ -107,8 +106,7 @@ class SettingsScreenState extends State<SettingsScreen>
late AnimationController _hideContainersController; late AnimationController _hideContainersController;
Future<void> restore() => Future<void> restore() => Future.wait([
Future.wait([
Provider.of<GradeProvider>(context, listen: false).restore(), Provider.of<GradeProvider>(context, listen: false).restore(),
Provider.of<TimetableProvider>(context, listen: false).restoreUser(), Provider.of<TimetableProvider>(context, listen: false).restoreUser(),
Provider.of<ExamProvider>(context, listen: false).restore(), Provider.of<ExamProvider>(context, listen: false).restore(),
@ -153,8 +151,7 @@ class SettingsScreenState extends State<SettingsScreen>
name: _firstName, name: _firstName,
role: account.role, role: account.role,
profilePictureString: account.picture, profilePictureString: account.picture,
backgroundColor: Theme backgroundColor: Theme.of(context)
.of(context)
.colorScheme .colorScheme
.tertiary, //!settings.presentationMode .tertiary, //!settings.presentationMode
//? ColorUtils.stringToColor(account.name) //? ColorUtils.stringToColor(account.name)
@ -168,8 +165,7 @@ class SettingsScreenState extends State<SettingsScreen>
if (err != null) { if (err != null) {
showDialog( showDialog(
context: context, context: context,
builder: (_) => builder: (_) => AlertDialog(
AlertDialog(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)), borderRadius: BorderRadius.circular(12.0)),
title: Text('oopsie'.i18n), title: Text('oopsie'.i18n),
@ -183,26 +179,16 @@ class SettingsScreenState extends State<SettingsScreen>
// delete user // delete user
user.removeUser(userId); user.removeUser(userId);
await Provider await Provider.of<DatabaseProvider>(context,
.of<DatabaseProvider>(context,
listen: false) listen: false)
.store .store
.removeUser(userId); .removeUser(userId);
// if no users, show login, else login with back button // if no users, show login, else login with back button
if (user if (user.getUsers().isNotEmpty) {
.getUsers() user.setUser(user.getUsers().first.id);
.isNotEmpty) {
user.setUser(user
.getUsers()
.first
.id);
restore().then( restore().then(
(_) => (_) => user.setUser(user.getUsers().first.id));
user.setUser(user
.getUsers()
.first
.id));
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.of(context) Navigator.of(context)
@ -213,8 +199,7 @@ class SettingsScreenState extends State<SettingsScreen>
} else { } else {
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.of(context) Navigator.of(context)
.pushNamedAndRemoveUntil( .pushNamedAndRemoveUntil("login", (_) => false);
"login", (_) => false);
} }
}) })
], ],
@ -260,17 +245,14 @@ class SettingsScreenState extends State<SettingsScreen>
]); ]);
} }
void _openDKT(User u) => void _openDKT(User u) => tabs.launchUrl(
tabs.launchUrl(
Uri.parse( Uri.parse(
"https://dkttanulo.e-kreta.hu/sso?id_token=${kretaClient.idToken}"), "https://dkttanulo.e-kreta.hu/sso?id_token=${kretaClient.idToken}"),
customTabsOptions: tabs.CustomTabsOptions( customTabsOptions: tabs.CustomTabsOptions(
showTitle: true, showTitle: true,
colorSchemes: tabs.CustomTabsColorSchemes( colorSchemes: tabs.CustomTabsColorSchemes(
defaultPrams: tabs.CustomTabsColorSchemeParams( defaultPrams: tabs.CustomTabsColorSchemeParams(
toolbarColor: Theme toolbarColor: Theme.of(context).scaffoldBackgroundColor,
.of(context)
.scaffoldBackgroundColor,
), ),
), ),
), ),
@ -336,8 +318,7 @@ class SettingsScreenState extends State<SettingsScreen>
return AnimatedBuilder( return AnimatedBuilder(
animation: _hideContainersController, animation: _hideContainersController,
builder: (context, child) => builder: (context, child) => Opacity(
Opacity(
opacity: 1 - _hideContainersController.value, opacity: 1 - _hideContainersController.value,
child: Column( child: Column(
children: [ children: [
@ -386,10 +367,7 @@ class SettingsScreenState extends State<SettingsScreen>
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
icon: Icon(FeatherIcons.x, icon: Icon(FeatherIcons.x,
color: AppColors color: AppColors.of(context).text.withOpacity(0.8)),
.of(context)
.text
.withOpacity(0.8)),
), ),
const SizedBox( const SizedBox(
width: 5.0, width: 5.0,
@ -410,8 +388,7 @@ class SettingsScreenState extends State<SettingsScreen>
role: user.role, role: user.role,
profilePictureString: user.picture, profilePictureString: user.picture,
gradeStreak: (user.gradeStreak ?? 0) > 1, gradeStreak: (user.gradeStreak ?? 0) > 1,
backgroundColor: Theme backgroundColor: Theme.of(context)
.of(context)
.colorScheme .colorScheme
.tertiary, //!settings.presentationMode .tertiary, //!settings.presentationMode
//? ColorUtils.stringToColor(user.displayName ?? "?") //? ColorUtils.stringToColor(user.displayName ?? "?")
@ -423,7 +400,6 @@ class SettingsScreenState extends State<SettingsScreen>
padding: const EdgeInsets.only(top: 4.0, bottom: 12.0), padding: const EdgeInsets.only(top: 4.0, bottom: 12.0),
child: GestureDetector( child: GestureDetector(
onTap: () => _showBottomSheet(user.getUser(user.id ?? "")), onTap: () => _showBottomSheet(user.getUser(user.id ?? "")),
onDoubleTap: () => setState(() => __ss = true),
child: Text( child: Text(
!settings.presentationMode !settings.presentationMode
? (user.displayName ?? "?") ? (user.displayName ?? "?")
@ -435,9 +411,7 @@ class SettingsScreenState extends State<SettingsScreen>
style: TextStyle( style: TextStyle(
fontSize: 22.0, fontSize: 22.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors color: AppColors.of(context).text),
.of(context)
.text),
), ),
), ),
), ),
@ -458,14 +432,10 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.info, FeatherIcons.info,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
borderRadius: const BorderRadius.vertical( borderRadius: const BorderRadius.vertical(
top: Radius.circular(12.0), top: Radius.circular(12.0), bottom: Radius.circular(4.0)),
bottom: Radius.circular(4.0)),
), ),
// open dcs (digital collaboration space) // open dcs (digital collaboration space)
PanelButton( PanelButton(
@ -474,14 +444,10 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.grid, FeatherIcons.grid,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
borderRadius: const BorderRadius.vertical( borderRadius: const BorderRadius.vertical(
top: Radius.circular(4.0), top: Radius.circular(4.0), bottom: Radius.circular(4.0)),
bottom: Radius.circular(4.0)),
), ),
// edit user // edit user
PanelButton( PanelButton(
@ -491,14 +457,10 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.edit3, FeatherIcons.edit3,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
borderRadius: const BorderRadius.vertical( borderRadius: const BorderRadius.vertical(
top: Radius.circular(4.0), top: Radius.circular(4.0), bottom: Radius.circular(4.0)),
bottom: Radius.circular(4.0)),
), ),
// switch account // switch account
PanelButton( PanelButton(
@ -515,14 +477,10 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.users, FeatherIcons.users,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
borderRadius: const BorderRadius.vertical( borderRadius: const BorderRadius.vertical(
top: Radius.circular(4.0), top: Radius.circular(4.0), bottom: Radius.circular(4.0)),
bottom: Radius.circular(4.0)),
), ),
// log user out // log user out
PanelButton( PanelButton(
@ -532,25 +490,15 @@ class SettingsScreenState extends State<SettingsScreen>
// delete user // delete user
user.removeUser(userId); user.removeUser(userId);
await Provider await Provider.of<DatabaseProvider>(context, listen: false)
.of<DatabaseProvider>(context, listen: false)
.store .store
.removeUser(userId); .removeUser(userId);
// if no users, show login // if no users, show login
if (user if (user.getUsers().isNotEmpty) {
.getUsers() user.setUser(user.getUsers().first.id);
.isNotEmpty) {
user.setUser(user
.getUsers()
.first
.id);
restore() restore()
.then((_) => .then((_) => user.setUser(user.getUsers().first.id));
user.setUser(user
.getUsers()
.first
.id));
} else { } else {
Navigator.of(context) Navigator.of(context)
.pushNamedAndRemoveUntil("login", (_) => false); .pushNamedAndRemoveUntil("login", (_) => false);
@ -559,14 +507,11 @@ class SettingsScreenState extends State<SettingsScreen>
title: Text("log_out".i18n), title: Text("log_out".i18n),
leading: Icon( leading: Icon(
FeatherIcons.logOut, FeatherIcons.logOut,
color: AppColors color: AppColors.of(context).red,
.of(context)
.red,
size: 22.0, size: 22.0,
), ),
borderRadius: const BorderRadius.vertical( borderRadius: const BorderRadius.vertical(
top: Radius.circular(4.0), top: Radius.circular(4.0), bottom: Radius.circular(12.0)),
bottom: Radius.circular(12.0)),
), ),
// SplittedMenuOption( // SplittedMenuOption(
// padding: const EdgeInsets.all(8.0), // padding: const EdgeInsets.all(8.0),
@ -670,10 +615,7 @@ class SettingsScreenState extends State<SettingsScreen>
updateProvider.releases.first.tag, updateProvider.releases.first.tag,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme color: Theme.of(context).colorScheme.secondary,
.of(context)
.colorScheme
.secondary,
), ),
), ),
), ),
@ -697,174 +639,23 @@ class SettingsScreenState extends State<SettingsScreen>
// child: ActiveSponsorCard(), // child: ActiveSponsorCard(),
// ), // ),
// secret settings
if (__ss)
SplittedPanel(
isSeparated: true,
isTransparent: true,
hasShadow: false,
children: [
SplittedPanel(
title: Text("secret".i18n),
cardPadding: const EdgeInsets.all(4.0),
padding: EdgeInsets.zero,
children: [
// good student mode
Material(
type: MaterialType.transparency,
child: SwitchListTile(
contentPadding:
const EdgeInsets.only(left: 12.0, right: 6.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)),
title: Text("goodstudent".i18n,
style:
const TextStyle(fontWeight: FontWeight.w500)),
onChanged: (v) {
if (v) {
showDialog(
context: context,
builder: (context) =>
WillPopScope(
onWillPop: () async => false,
child: AlertDialog(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(12.0)),
title: Text("attention".i18n),
content:
Text("goodstudent_disclaimer".i18n),
actions: [
ActionButton(
label: "understand".i18n,
onTap: () {
Navigator.of(context).pop();
settings.update(
goodStudent: v);
Provider.of<GradeProvider>(
context,
listen: false)
.convertBySettings();
})
],
),
),
);
} else {
settings.update(goodStudent: v);
Provider.of<GradeProvider>(
context, listen: false)
.convertBySettings();
}
},
value: settings.goodStudent,
activeColor: Theme
.of(context)
.colorScheme
.secondary,
),
),
],
),
SplittedPanel(
cardPadding: const EdgeInsets.all(4.0),
padding: EdgeInsets.zero,
children: [
// presentation mode
Material(
type: MaterialType.transparency,
child: SwitchListTile(
contentPadding:
const EdgeInsets.only(left: 12.0, right: 6.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)),
title: Text("presentation".i18n,
style:
const TextStyle(fontWeight: FontWeight.w500)),
onChanged: (v) =>
settings.update(presentationMode: v),
value: settings.presentationMode,
activeColor: Theme
.of(context)
.colorScheme
.secondary,
),
),
// UwU-fied mode (why????)
// Material(
// type: MaterialType.transparency,
// child: SwitchListTile(
// contentPadding: const EdgeInsets.only(left: 12.0),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(12.0)),
// title: Text("uwufymode".i18n,
// style:
// const TextStyle(fontWeight: FontWeight.w500)),
// onChanged: (v) {
// SettingsHelper.uwuMode(context, v);
// setState(() {});
// },
// value: settings.presentationMode,
// activeColor: Theme.of(context).colorScheme.secondary,
// ),
// ),
],
),
// uwu mode
// since it is not working i removed it
/*SplittedPanel(
cardPadding: const EdgeInsets.all(4.0),
padding: EdgeInsets.zero,
children: [
// uwu mode
Material(
type: MaterialType.transparency,
child: SwitchListTile(
contentPadding:
const EdgeInsets.only(left: 12.0, right: 6.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)),
title: Text("uwufymode".i18n,
style:
const TextStyle(fontWeight: FontWeight.w500)),
onChanged: (v) => settings.update(uwuMode: v),
value: settings.uwuMode,
activeColor: Theme.of(context).colorScheme.secondary,
),
),
],
),*/
],
),
if ((user.gradeStreak ?? 0) > 1) if ((user.gradeStreak ?? 0) > 1)
SplittedPanel( SplittedPanel(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
bottom: 12.0, left: 24.0, right: 24.0), bottom: 12.0, left: 24.0, right: 24.0),
children: [ children: [
GestureDetector( ListTile(
onTap: () {
SoonAlert.show(context: context);
},
child: ListTile(
title: Text( title: Text(
"grade_streak".i18n, "grade_streak".i18n,
style: TextStyle( style: TextStyle(
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
), ),
subtitle: Text( subtitle: Text(
"grade_streak_subtitle".i18n, "grade_streak_subtitle".i18n,
style: TextStyle( style: TextStyle(
color: AppColors color: AppColors.of(context).text.withOpacity(0.75),
.of(context)
.text
.withOpacity(0.75),
), ),
), ),
leading: Image.asset( leading: Image.asset(
@ -878,96 +669,26 @@ class SettingsScreenState extends State<SettingsScreen>
trailing: Text( trailing: Text(
"${user.gradeStreak}", "${user.gradeStreak}",
style: TextStyle( style: TextStyle(
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: 18.0, fontSize: 18.0,
), ),
), ),
), ),
),
], ],
), ),
// plus subscribe inline
const PlusSettingsInline(),
// const SizedBox( // const SizedBox(
// height: 16.0, // height: 16.0,
// ), // ),
// Panel(
// hasShadow: false,
// padding: const EdgeInsets.only(left: 24.0, right: 24.0),
// title: Padding(
// padding: const EdgeInsets.only(left: 24.0),
// child: Text('account_link'.i18n),
// ),
// isTransparent: true,
// child: Column(
// children: [
// // QwID account linking
// PanelButton(
// onPressed: () {
// launchUrl(
// Uri.parse(
// 'https://qwid.qwit.dev/oauth2/authorize?client_id=refilc&response_type=code&scope=*'),
// mode: LaunchMode.externalApplication,
// );
// },
// title: Text("QwID fiók-összekapcsolás".i18n),
// leading: Icon(
// FeatherIcons.link,
// size: 22.0,
// color: AppColors.of(context).text.withOpacity(0.95),
// ),
// trailing: GestureDetector(
// onTap: () {
// showDialog(
// context: context,
// builder: (BuildContext context) {
// return AlertDialog(
// title: const Text("QwID?!"),
// content: const Text(
// "A QwID egy olyan fiók, mellyel az összes QwIT szolgáltatásba beléphetsz és minden adatod egy helyen kezelheted. \"Miért jó ez nekem?\" A QwID fiókba való bejelentkezéssel rengeteg új funkcióhoz férhetsz hozzá, ami sajnos korábban lehetetlen volt egy szimpla e-KRÉTA fiókkal. Fiókhoz kötve megoszthatsz bármilyen adatot a barátaiddal, vagy ha szeretnéd nyilvánosságra is hozhatod jegyeid, reFilc témáid, és még rengeteg dolgot. A QwID fiók abban is segít, hogy egyszerűbben kezelhesd előfizetéseid, valamint fiókodnak köszönhetően rengeteg ajándékot kaphatsz reFilc+ előfizetésed mellé egyéb QwIT és reFilc szolgáltatásokban. \"Miért QwID?\" A név a reFilc mögött álló fejlesztői csapat, a QwIT nevéből, valamint az angol Identity szó rövidítéséből ered. \"Egyéb hasznos tudnivalók?\" A QwID fiókodat bármikor törölheted, ha úgy érzed, hogy nem szeretnéd tovább használni. Bővebb információt az adatkezelésről és az általános feltételekről megtalálsz a regisztrációs oldalon. Fiókod kezeléséhez látogass el a qwid.qwit.dev weboldalra.",
// ),
// actions: [
// TextButton(
// onPressed: () {
// Navigator.of(context).pop();
// },
// child: const Text("Szuper!"),
// ),
// ],
// );
// },
// );
// },
// child: Icon(
// FeatherIcons.helpCircle,
// size: 20.0,
// color: AppColors.of(context).text.withOpacity(0.95),
// ),
// ),
// borderRadius: const BorderRadius.vertical(
// top: Radius.circular(12.0),
// bottom: Radius.circular(4.0),
// ),
// ),
// ],
// ),
// ),
// settings submenus // settings submenus
const SizedBox( const SizedBox(
height: 16.0, height: 16.0,
), ),
Panel( Panel(
hasShadow: false, hasShadow: false,
padding: padding: const EdgeInsets.only(bottom: 20.0, left: 24.0, right: 24.0),
const EdgeInsets.only(bottom: 20.0, left: 24.0, right: 24.0),
title: Padding( title: Padding(
padding: const EdgeInsets.only(left: 24.0), padding: const EdgeInsets.only(left: 24.0),
child: Text('settings'.i18n), child: Text('settings'.i18n),
@ -977,13 +698,13 @@ class SettingsScreenState extends State<SettingsScreen>
children: [ children: [
// general settings // general settings
const SplittedPanel( const SplittedPanel(
padding: EdgeInsets.zero, padding: const EdgeInsets.only(top: 8.0),
cardPadding: EdgeInsets.all(4.0), cardPadding: EdgeInsets.all(4.0),
children: [ children: [
MenuGeneralSettings( MenuGeneralSettings(
borderRadius: BorderRadius.vertical( borderRadius: BorderRadius.vertical(
top: Radius.circular(12.0), top: Radius.circular(12.0),
bottom: Radius.circular(12.0), bottom: Radius.circular(4.0),
), ),
), ),
], ],
@ -996,7 +717,7 @@ class SettingsScreenState extends State<SettingsScreen>
children: [ children: [
const MenuPersonalizeSettings( const MenuPersonalizeSettings(
borderRadius: BorderRadius.vertical( borderRadius: BorderRadius.vertical(
top: Radius.circular(12.0), top: Radius.circular(4.0),
bottom: Radius.circular(4.0), bottom: Radius.circular(4.0),
), ),
), ),
@ -1009,10 +730,7 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.sun, FeatherIcons.sun,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
trailing: Text( trailing: Text(
themeModeText, themeModeText,
@ -1020,25 +738,25 @@ class SettingsScreenState extends State<SettingsScreen>
), ),
borderRadius: const BorderRadius.vertical( borderRadius: const BorderRadius.vertical(
top: Radius.circular(4.0), top: Radius.circular(4.0),
bottom: Radius.circular(12.0), bottom: Radius.circular(4.0),
), ),
), ),
], ],
), ),
// notifications // notifications
const SplittedPanel( //const SplittedPanel(
padding: EdgeInsets.only(top: 8.0), // padding: EdgeInsets.only(top: 8.0),
cardPadding: EdgeInsets.all(4.0), // cardPadding: EdgeInsets.all(4.0),
children: [ // children: [
/*MenuNotifications( // /*MenuNotifications(
borderRadius: BorderRadius.vertical( // borderRadius: BorderRadius.vertical(
top: Radius.circular(12.0), // top: Radius.circular(12.0),
bottom: Radius.circular(12.0), // bottom: Radius.circular(12.0),
), // ),
),*/ // ),*/
], // ],
), //),
// extras // extras
const SplittedPanel( const SplittedPanel(
@ -1047,7 +765,7 @@ class SettingsScreenState extends State<SettingsScreen>
children: [ children: [
MenuExtrasSettings( MenuExtrasSettings(
borderRadius: BorderRadius.vertical( borderRadius: BorderRadius.vertical(
top: Radius.circular(12.0), top: Radius.circular(4.0),
bottom: Radius.circular(12.0), bottom: Radius.circular(12.0),
), ),
), ),
@ -1105,10 +823,7 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.mail, FeatherIcons.mail,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
title: Text("news".i18n), title: Text("news".i18n),
onPressed: () => _openNews(context), onPressed: () => _openNews(context),
@ -1121,14 +836,10 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.map, FeatherIcons.map,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
title: Text("stickermap".i18n), title: Text("stickermap".i18n),
onPressed: () => onPressed: () => launchUrl(
launchUrl(
Uri.parse("https://map.qwit.cloud"), Uri.parse("https://map.qwit.cloud"),
mode: LaunchMode.inAppBrowserView, mode: LaunchMode.inAppBrowserView,
), ),
@ -1176,10 +887,7 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.lock, FeatherIcons.lock,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
title: Text("privacy".i18n), title: Text("privacy".i18n),
onPressed: () => _openPrivacy(context), onPressed: () => _openPrivacy(context),
@ -1192,14 +900,11 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.atSign, FeatherIcons.atSign,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
title: const Text("Discord"), title: const Text("Discord"),
onPressed: () => onPressed: () => launchUrl(
launchUrl(Uri.parse("https://discord.gg/6DvjyPAw2T"), Uri.parse("https://discord.gg/6DvjyPAw2T"),
mode: LaunchMode.externalApplication), mode: LaunchMode.externalApplication),
borderRadius: const BorderRadius.vertical( borderRadius: const BorderRadius.vertical(
top: Radius.circular(4.0), top: Radius.circular(4.0),
@ -1224,16 +929,11 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.github, FeatherIcons.github,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
title: const Text("Gitea"), title: const Text("Gitea"),
onPressed: () => onPressed: () => launchUrl(
launchUrl( Uri.parse("https://git.qwit.cloud/refilc/student-legacy"),
Uri.parse(
"https://git.qwit.cloud/refilc/student-legacy"),
mode: LaunchMode.externalApplication), mode: LaunchMode.externalApplication),
borderRadius: const BorderRadius.vertical( borderRadius: const BorderRadius.vertical(
top: Radius.circular(4.0), top: Radius.circular(4.0),
@ -1244,10 +944,7 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.award, FeatherIcons.award,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
title: Text("licenses".i18n), title: Text("licenses".i18n),
onPressed: () => showLicensePage(context: context), onPressed: () => showLicensePage(context: context),
@ -1262,14 +959,9 @@ class SettingsScreenState extends State<SettingsScreen>
margin: const EdgeInsets.all(10.0), margin: const EdgeInsets.all(10.0),
textStyle: TextStyle( textStyle: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: AppColors color: AppColors.of(context).text),
.of(context)
.text),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme color: Theme.of(context).colorScheme.surface,
.of(context)
.colorScheme
.surface,
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
@ -1293,35 +985,24 @@ class SettingsScreenState extends State<SettingsScreen>
FeatherIcons.barChart2, FeatherIcons.barChart2,
size: 22.0, size: 22.0,
color: settings.analyticsEnabled color: settings.analyticsEnabled
? AppColors ? AppColors.of(context).text.withOpacity(0.95)
.of(context) : AppColors.of(context).text.withOpacity(.25),
.text
.withOpacity(0.95)
: AppColors
.of(context)
.text
.withOpacity(.25),
), ),
title: Text( title: Text(
"Analytics".i18n, "Analytics".i18n,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 16.0, fontSize: 16.0,
color: AppColors color: AppColors.of(context).text.withOpacity(
.of(context)
.text
.withOpacity(
settings.analyticsEnabled ? 1.0 : .5), settings.analyticsEnabled ? 1.0 : .5),
), ),
), ),
subtitle: Text( subtitle: Text(
"Anonymous Usage Analytics".i18n, "Anonymous Usage Analytics".i18n,
style: TextStyle( style: TextStyle(
color: AppColors color: AppColors.of(context)
.of(context)
.text .text
.withOpacity( .withOpacity(settings.analyticsEnabled ? .5 : .2),
settings.analyticsEnabled ? .5 : .2),
), ),
), ),
onChanged: (v) { onChanged: (v) {
@ -1336,10 +1017,7 @@ class SettingsScreenState extends State<SettingsScreen>
settings.update(analyticsEnabled: v); settings.update(analyticsEnabled: v);
}, },
value: settings.analyticsEnabled, value: settings.analyticsEnabled,
activeColor: Theme activeColor: Theme.of(context).colorScheme.secondary,
.of(context)
.colorScheme
.secondary,
), ),
), ),
), ),
@ -1347,14 +1025,10 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
Icons.feedback_outlined, Icons.feedback_outlined,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(0.95),
.of(context)
.text
.withOpacity(0.95),
), ),
title: Text("feedback".i18n), title: Text("feedback".i18n),
onPressed: () => onPressed: () => {
{
Shake.setScreenshotIncluded(false), Shake.setScreenshotIncluded(false),
Shake.show(ShakeScreen.newTicket), Shake.show(ShakeScreen.newTicket),
Shake.setScreenshotIncluded(true), Shake.setScreenshotIncluded(true),
@ -1375,8 +1049,7 @@ class SettingsScreenState extends State<SettingsScreen>
PanelButton( PanelButton(
title: const Text('loginToGoogle'), title: const Text('loginToGoogle'),
onPressed: () async { onPressed: () async {
ThirdPartyProvider tpp = Provider.of< ThirdPartyProvider tpp = Provider.of<ThirdPartyProvider>(
ThirdPartyProvider>(
context, context,
listen: false); listen: false);
@ -1414,15 +1087,10 @@ class SettingsScreenState extends State<SettingsScreen>
top: Radius.circular(12.0), top: Radius.circular(12.0),
bottom: Radius.circular(4.0))), bottom: Radius.circular(4.0))),
title: Text("devmode".i18n, title: Text("devmode".i18n,
style: const TextStyle( style: const TextStyle(fontWeight: FontWeight.w500)),
fontWeight: FontWeight.w500)), onChanged: (v) => settings.update(developerMode: false),
onChanged: (v) =>
settings.update(developerMode: false),
value: settings.developerMode, value: settings.developerMode,
activeColor: Theme activeColor: Theme.of(context).colorScheme.secondary,
.of(context)
.colorScheme
.secondary,
), ),
), ),
PanelButton( PanelButton(
@ -1433,22 +1101,17 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
Icons.tune_outlined, Icons.tune_outlined,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(.95),
.of(context)
.text
.withOpacity(.95),
), ),
title: Text("exp_settings".i18n), title: Text("exp_settings".i18n),
onPressed: () => onPressed: () => Clipboard.setData(ClipboardData(
Clipboard.setData(ClipboardData(
text: json.encode(settings.toMap()), text: json.encode(settings.toMap()),
)), )),
), ),
PanelButton( PanelButton(
borderRadius: BorderRadius.vertical( borderRadius: BorderRadius.vertical(
top: const Radius.circular(4.0), top: const Radius.circular(4.0),
bottom: Provider bottom: Provider.of<PlusProvider>(context, listen: false)
.of<PlusProvider>(context, listen: false)
.hasPremium .hasPremium
? const Radius.circular(4.0) ? const Radius.circular(4.0)
: const Radius.circular(12.0), : const Radius.circular(12.0),
@ -1456,20 +1119,14 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.copy, FeatherIcons.copy,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(.95),
.of(context)
.text
.withOpacity(.95),
), ),
title: Text("copy_jwt".i18n), title: Text("copy_jwt".i18n),
onPressed: () => onPressed: () => Clipboard.setData(ClipboardData(
Clipboard.setData(ClipboardData( text: Provider.of<KretaClient>(context, listen: false)
text: Provider
.of<KretaClient>(context, listen: false)
.accessToken!)), .accessToken!)),
), ),
if (Provider if (Provider.of<PlusProvider>(context, listen: false)
.of<PlusProvider>(context, listen: false)
.hasPremium) .hasPremium)
PanelButton( PanelButton(
borderRadius: const BorderRadius.vertical( borderRadius: const BorderRadius.vertical(
@ -1479,10 +1136,7 @@ class SettingsScreenState extends State<SettingsScreen>
leading: Icon( leading: Icon(
FeatherIcons.key, FeatherIcons.key,
size: 22.0, size: 22.0,
color: AppColors color: AppColors.of(context).text.withOpacity(.95),
.of(context)
.text
.withOpacity(.95),
), ),
title: const Text("Remove Premium"), title: const Text("Remove Premium"),
onPressed: () { onPressed: () {
@ -1490,8 +1144,7 @@ class SettingsScreenState extends State<SettingsScreen>
.activate(removePremium: true); .activate(removePremium: true);
settings.update( settings.update(
accentColor: AccentColor.filc, store: true); accentColor: AccentColor.filc, store: true);
Provider.of<ThemeModeObserver>( Provider.of<ThemeModeObserver>(context, listen: false)
context, listen: false)
.changeTheme(settings.theme); .changeTheme(settings.theme);
}, },
), ),
@ -1508,21 +1161,18 @@ class SettingsScreenState extends State<SettingsScreen>
builder: (context, release) { builder: (context, release) {
String versionText; String versionText;
if (release.hasData && release.data != null) { if (release.hasData && release.data != null) {
versionText = "v${release
.data!['version']}, modosítva a Filc csapat által";
} else {
versionText = versionText =
"reFilc, modosítva a Filc csapat által"; "v${release.data!['version']}, modosítva a Filc csapat által";
} else {
versionText = "reFilc, modosítva a Filc csapat által";
} }
return DefaultTextStyle( return DefaultTextStyle(
style: Theme style: Theme.of(context)
.of(context)
.textTheme .textTheme
.titleMedium! .titleMedium!
.copyWith( .copyWith(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors color: AppColors.of(context)
.of(context)
.text .text
.withOpacity(0.65)), .withOpacity(0.65)),
child: Text(versionText), child: Text(versionText),
@ -1553,8 +1203,7 @@ class SettingsScreenState extends State<SettingsScreen>
), ),
], ],
), ),
) ),
,
); );
} }

View File

@ -51,12 +51,8 @@ extension SettingsLocalization on String {
"Analytics": "Analytics", "Analytics": "Analytics",
"Anonymous Usage Analytics": "Anonymous Usage Analytics", "Anonymous Usage Analytics": "Anonymous Usage Analytics",
"graph_class_avg": "Class average on graph", "graph_class_avg": "Class average on graph",
"goodstudent": "Good student mode",
"attention": "Attention!", "attention": "Attention!",
"goodstudent_disclaimer":
"reFilc can not be held liable for the usage of this feature.\n\n(if your mother beats you up because you showed her fake grades, you can only blame yourself for it)",
"understand": "I understand", "understand": "I understand",
"secret": "Secret Settings",
"bell_delay": "Bell Delay", "bell_delay": "Bell Delay",
"delay": "Delay", "delay": "Delay",
"hurry": "Hurry", "hurry": "Hurry",
@ -69,7 +65,7 @@ extension SettingsLocalization on String {
"Background Color": "Background Color", "Background Color": "Background Color",
"Highlight Color": "Highlight Color", "Highlight Color": "Highlight Color",
"Adaptive Theme": "Adaptive Theme", "Adaptive Theme": "Adaptive Theme",
"presentation": "Presentation Mode",
"uwufymode": "UwU-fied Mode", "uwufymode": "UwU-fied Mode",
"devmoretaps": "You are %s taps away from Developer Mode.", "devmoretaps": "You are %s taps away from Developer Mode.",
"devactivated": "Developer Mode successfully activated.", "devactivated": "Developer Mode successfully activated.",
@ -185,12 +181,8 @@ extension SettingsLocalization on String {
"Analytics": "Analitika", "Analytics": "Analitika",
"Anonymous Usage Analytics": "Névtelen használati analitika", "Anonymous Usage Analytics": "Névtelen használati analitika",
"graph_class_avg": "Osztályátlag a grafikonon", "graph_class_avg": "Osztályátlag a grafikonon",
"goodstudent": "Jó tanuló mód",
"attention": "Figyelem!", "attention": "Figyelem!",
"goodstudent_disclaimer":
"A reFilc minden felelősséget elhárít a funkció használatával kapcsolatban.\n\n(Értsd: ha az anyád megver, mert megtévesztő ábrákat mutattál neki, azért csakis magadat hibáztathatod.)",
"understand": "Értem", "understand": "Értem",
"secret": "Titkos Beállítások",
"bell_delay": "Csengő eltolódása", "bell_delay": "Csengő eltolódása",
"delay": "Késleltetés", "delay": "Késleltetés",
"hurry": "Siettetés", "hurry": "Siettetés",
@ -203,7 +195,7 @@ extension SettingsLocalization on String {
"Background Color": "Háttér színe", "Background Color": "Háttér színe",
"Highlight Color": "Panelek színe", "Highlight Color": "Panelek színe",
"Adaptive Theme": "Adaptív téma", "Adaptive Theme": "Adaptív téma",
"presentation": "Bemutató mód",
"uwufymode": "UwU mód", "uwufymode": "UwU mód",
"devmoretaps": "Még %s koppintásra vagy a Fejlesztői módtól.", "devmoretaps": "Még %s koppintásra vagy a Fejlesztői módtól.",
"devactivated": "Fejlesztői mód sikeresen aktiválva.", "devactivated": "Fejlesztői mód sikeresen aktiválva.",
@ -319,12 +311,8 @@ extension SettingsLocalization on String {
"Analytics": "Analytik", "Analytics": "Analytik",
"Anonymous Usage Analytics": "Anonyme Nutzungsanalyse", "Anonymous Usage Analytics": "Anonyme Nutzungsanalyse",
"graph_class_avg": "Klassendurchschnitt in der Grafik", "graph_class_avg": "Klassendurchschnitt in der Grafik",
"goodstudent": "Guter Student Modus",
"attention": "Achtung!", "attention": "Achtung!",
"goodstudent_disclaimer":
"reFilc kann nicht für die Nutzung dieser Funktion haftbar gemacht werden.\n\n(Wenn deine Mutter dich verprügelt, weil du ihr falsche Noten gezeigt hast, kannst du dir nur die Schuld dafür geben)",
"understand": "Ich verstehe", "understand": "Ich verstehe",
"secret": "Geheime Einstellungen",
"bell_delay": "Klingelverzögerung", "bell_delay": "Klingelverzögerung",
"delay": "Verzögern", "delay": "Verzögern",
"hurry": "Eile", "hurry": "Eile",
@ -337,7 +325,7 @@ extension SettingsLocalization on String {
"Background Color": "Background Color", "Background Color": "Background Color",
"Highlight Color": "Highlight Color", "Highlight Color": "Highlight Color",
"Adaptive Theme": "Adaptive Theme", "Adaptive Theme": "Adaptive Theme",
"presentation": "Präsentationsmodus",
"uwufymode": "UwU-Modus", "uwufymode": "UwU-Modus",
"devmoretaps": "Sie sind %s Taps vom Entwicklermodus entfernt.", "devmoretaps": "Sie sind %s Taps vom Entwicklermodus entfernt.",
"devactivated": "Entwicklermodus erfolgreich aktiviert.", "devactivated": "Entwicklermodus erfolgreich aktiviert.",

View File

@ -16,6 +16,10 @@ import 'package:refilc_plus/models/premium_scopes.dart';
import 'package:refilc_plus/providers/plus_provider.dart'; import 'package:refilc_plus/providers/plus_provider.dart';
import 'package:refilc_plus/ui/mobile/plus/upsell.dart'; import 'package:refilc_plus/ui/mobile/plus/upsell.dart';
import 'package:refilc_plus/ui/mobile/settings/welcome_message.dart'; import 'package:refilc_plus/ui/mobile/settings/welcome_message.dart';
import 'package:refilc_kreta_api/providers/grade_provider.dart';
import 'package:refilc_mobile_ui/common/action_button.dart';
// import 'package:provider/provider.dart'; // import 'package:provider/provider.dart';
import 'submenu_screen.i18n.dart'; import 'submenu_screen.i18n.dart';
@ -23,7 +27,7 @@ class MenuExtrasSettings extends StatelessWidget {
const MenuExtrasSettings({ const MenuExtrasSettings({
super.key, super.key,
this.borderRadius = const BorderRadius.vertical( this.borderRadius = const BorderRadius.vertical(
top: Radius.circular(4.0), bottom: Radius.circular(4.0)), top: Radius.circular(4.0), bottom: Radius.circular(12.0)),
}); });
final BorderRadius borderRadius; final BorderRadius borderRadius;
@ -181,6 +185,146 @@ class ExtrasSettingsScreenState extends State<ExtrasSettingsScreen> {
), ),
], ],
), ),
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: () async {
if (!settingsProvider.goodStudent) {
showDialog(
context: context,
builder: (context) => WillPopScope(
onWillPop: () async => false,
child: AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)),
title: Text("attention".i18n),
content: Text("goodstudent_disclaimer".i18n),
actions: [
ActionButton(
label: "understand".i18n,
onTap: () {
Navigator.of(context).pop();
settingsProvider.update(
goodStudent: true);
Provider.of<GradeProvider>(context,
listen: false)
.convertBySettings();
setState(() {});
})
],
),
),
);
} else {
settingsProvider.update(goodStudent: false);
Provider.of<GradeProvider>(context, listen: false)
.convertBySettings();
setState(() {});
}
},
title: Text(
"goodstudent".i18n,
style: TextStyle(
color: AppColors.of(context).text.withValues(
alpha: settingsProvider.goodStudent ? .95 : .25),
),
),
leading: Icon(
FeatherIcons.userCheck,
size: 22.0,
color: AppColors.of(context).text.withValues(
alpha: settingsProvider.goodStudent ? .95 : .25),
),
trailing: Switch(
onChanged: (v) async {
if (v) {
showDialog(
context: context,
builder: (context) => WillPopScope(
onWillPop: () async => false,
child: AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)),
title: Text("attention".i18n),
content: Text("goodstudent_disclaimer".i18n),
actions: [
ActionButton(
label: "understand".i18n,
onTap: () {
Navigator.of(context).pop();
settingsProvider.update(
goodStudent: true);
Provider.of<GradeProvider>(context,
listen: false)
.convertBySettings();
setState(() {});
})
],
),
),
);
} else {
settingsProvider.update(goodStudent: false);
Provider.of<GradeProvider>(context, listen: false)
.convertBySettings();
setState(() {});
}
},
value: settingsProvider.goodStudent,
activeColor: Theme.of(context).colorScheme.secondary,
),
borderRadius: const BorderRadius.vertical(
top: Radius.circular(12.0),
bottom: Radius.circular(12.0),
),
),
],
),
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: () async {
settingsProvider.update(
presentationMode: !settingsProvider.presentationMode);
setState(() {});
},
title: Text(
"presentation".i18n,
style: TextStyle(
color: AppColors.of(context).text.withValues(
alpha:
settingsProvider.presentationMode ? .95 : .25),
),
),
leading: Icon(
FeatherIcons.tv,
size: 22.0,
color: AppColors.of(context).text.withValues(
alpha: settingsProvider.presentationMode ? .95 : .25),
),
trailing: Switch(
onChanged: (v) async {
settingsProvider.update(presentationMode: v);
setState(() {});
},
value: settingsProvider.presentationMode,
activeColor: Theme.of(context).colorScheme.secondary,
),
borderRadius: const BorderRadius.vertical(
top: Radius.circular(12.0),
bottom: Radius.circular(12.0),
),
),
],
),
], ],
), ),
), ),

View File

@ -15,7 +15,7 @@ class MenuGeneralSettings extends StatelessWidget {
const MenuGeneralSettings({ const MenuGeneralSettings({
super.key, super.key,
this.borderRadius = const BorderRadius.vertical( this.borderRadius = const BorderRadius.vertical(
top: Radius.circular(4.0), bottom: Radius.circular(4.0)), top: Radius.circular(12.0), bottom: Radius.circular(4.0)),
}); });
final BorderRadius borderRadius; final BorderRadius borderRadius;

View File

@ -34,6 +34,11 @@ extension SettingsLocalization on String {
"theme_share_ratelimit": "You can only share 1 theme per minute.", "theme_share_ratelimit": "You can only share 1 theme per minute.",
// cloud sync // cloud sync
"cloud_sync": "Cloud Sync", "cloud_sync": "Cloud Sync",
"secret": "Secret Settings",
"goodstudent": "Good student mode",
"presentation": "Presentation Mode",
"goodstudent_disclaimer":
"reFilc can not be held liable for the usage of this feature.\n\n(if your mother beats you up because you showed her fake grades, you can only blame yourself for it)",
}, },
"hu_hu": { "hu_hu": {
"general": "Általános", "general": "Általános",
@ -66,6 +71,11 @@ extension SettingsLocalization on String {
"theme_share_ratelimit": "Csak 1 témát oszthatsz meg percenként.", "theme_share_ratelimit": "Csak 1 témát oszthatsz meg percenként.",
// cloud sync // cloud sync
"cloud_sync": "Felhő szinkronizálás", "cloud_sync": "Felhő szinkronizálás",
"secret": "Titkos Beállítások",
"goodstudent": "Jó tanuló mód",
"presentation": "Bemutató mód",
"goodstudent_disclaimer":
"A reFilc minden felelősséget elhárít a funkció használatával kapcsolatban.\n\n(Értsd: ha az anyád megver, mert megtévesztő ábrákat mutattál neki, azért csakis magadat hibáztathatod.)",
}, },
"de_de": { "de_de": {
"general": "Allgemeine", "general": "Allgemeine",
@ -99,6 +109,11 @@ extension SettingsLocalization on String {
"theme_share_ratelimit": "Sie können nur 1 Thema pro Minute teilen.", "theme_share_ratelimit": "Sie können nur 1 Thema pro Minute teilen.",
// cloud sync // cloud sync
"cloud_sync": "Cloud-Synchronisierung", "cloud_sync": "Cloud-Synchronisierung",
"secret": "Geheime Einstellungen",
"presentation": "Präsentationsmodus",
"goodstudent": "Guter Student Modus",
"goodstudent_disclaimer":
"reFilc kann nicht für die Nutzung dieser Funktion haftbar gemacht werden.\n\n(Wenn deine Mutter dich verprügelt, weil du ihr falsche Noten gezeigt hast, kannst du dir nur die Schuld dafür geben)",
}, },
}; };