forked from firka/student-legacy
Merge pull request #18 from CroatianHusky/master
Developer Settings i18n + Notifications toggle color fix
This commit is contained in:
commit
3c0082a786
@ -458,13 +458,13 @@ class _SettingsScreenState extends State<SettingsScreen>
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
SizedBox(
|
||||
height: 30,
|
||||
child: AnimatedContainer(
|
||||
duration: Duration(milliseconds: 200),
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 10, right: 10),
|
||||
@ -482,8 +482,9 @@ class _SettingsScreenState extends State<SettingsScreen>
|
||||
overflow: TextOverflow.ellipsis))),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.of(context).filc.withOpacity(
|
||||
settings.notificationsEnabled ? 1.0 : .5),
|
||||
color: settings.notificationsEnabled
|
||||
? Theme.of(context).colorScheme.secondary
|
||||
: AppColors.of(context).text.withOpacity(.25),
|
||||
borderRadius: BorderRadius.circular(40)),
|
||||
),
|
||||
)
|
||||
@ -912,7 +913,7 @@ class _SettingsScreenState extends State<SettingsScreen>
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 12.0, horizontal: 24.0),
|
||||
child: Panel(
|
||||
title: const Text("Developer Settings"),
|
||||
title: Text("devsettings".i18n),
|
||||
child: Column(
|
||||
children: [
|
||||
Material(
|
||||
@ -921,8 +922,8 @@ class _SettingsScreenState extends State<SettingsScreen>
|
||||
contentPadding: const EdgeInsets.only(left: 12.0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12.0)),
|
||||
title: const Text("Developer Mode",
|
||||
style: TextStyle(fontWeight: FontWeight.w500)),
|
||||
title: Text("devmode".i18n,
|
||||
style: const TextStyle(fontWeight: FontWeight.w500)),
|
||||
onChanged: (v) =>
|
||||
settings.update(developerMode: false),
|
||||
value: settings.developerMode,
|
||||
@ -931,7 +932,7 @@ class _SettingsScreenState extends State<SettingsScreen>
|
||||
),
|
||||
PanelButton(
|
||||
leading: const Icon(FeatherIcons.copy),
|
||||
title: const Text("Copy JWT"),
|
||||
title: Text("copy_jwt".i18n),
|
||||
onPressed: () => Clipboard.setData(ClipboardData(
|
||||
text:
|
||||
Provider.of<KretaClient>(context, listen: false)
|
||||
@ -998,13 +999,13 @@ class _SettingsScreenState extends State<SettingsScreen>
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
content: Text(
|
||||
"You are $devmodeCountdown taps away from Developer Mode."),
|
||||
"devmoretaps".i18n.fill([devmodeCountdown])),
|
||||
));
|
||||
|
||||
setState(() => devmodeCountdown--);
|
||||
} else if (devmodeCountdown == 0) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
||||
content: Text("Developer Mode successfully activated."),
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||
content: Text("devactivated".i18n),
|
||||
));
|
||||
|
||||
settings.update(developerMode: true);
|
||||
|
@ -66,6 +66,11 @@ extension SettingsLocalization on String {
|
||||
"Adaptive Theme": "Adaptive Theme",
|
||||
"presentation": "Presentation mode",
|
||||
"uwufymode": "UwU-fied mode (hungarian)",
|
||||
"devmoretaps": "You are %s taps away from Developer Mode.",
|
||||
"devactivated": "Developer Mode successfully activated.",
|
||||
"devsettings": "Developer Settings",
|
||||
"devmode": "Developer Mode",
|
||||
"copy_jwt": "Copy JWT",
|
||||
},
|
||||
"hu_hu": {
|
||||
"personal_details": "Személyes információk",
|
||||
@ -130,6 +135,11 @@ extension SettingsLocalization on String {
|
||||
"Adaptive Theme": "Adaptív téma",
|
||||
"presentation": "Bemutató mód",
|
||||
"uwufymode": "UwU mód (magyar)",
|
||||
"devmoretaps": "Még %s koppintásra vagy a Fejlesztői módtól.",
|
||||
"devactivated": "Fejlesztői mód sikeresen aktiválva.",
|
||||
"devsettings": "Fejlesztői Beállítások",
|
||||
"devmode": "Fejlesztői mód",
|
||||
"copy_jwt": "JWT másolása",
|
||||
},
|
||||
"de_de": {
|
||||
"personal_details": "Persönliche Angaben",
|
||||
@ -193,6 +203,11 @@ extension SettingsLocalization on String {
|
||||
"Adaptive Theme": "Adaptive Theme",
|
||||
"presentation": "Präsentationsmodus",
|
||||
"uwufymode": "UwU-Modus (ungarisch)",
|
||||
"devmoretaps": "Sie sind %s Taps vom Entwicklermodus entfernt.",
|
||||
"devactivated": "Entwicklermodus erfolgreich aktiviert.",
|
||||
"devsettings": "Entwickleroptionen",
|
||||
"devmode": "Entwicklermodus",
|
||||
"copy_jwt": "JWT kopieren",
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user