redesign for settings page

This commit is contained in:
Arseni
2026-03-13 23:01:57 +03:00
parent 70bd7a6214
commit d601f245d4
36 changed files with 1151 additions and 262 deletions

View File

@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'package:pweb/models/settings/profile_action_section.dart';
import 'package:pweb/pages/settings/profile/account/locale.dart';
import 'package:pweb/pages/settings/profile/account/password/password.dart';
class ProfileActionsContent extends StatelessWidget {
const ProfileActionsContent({
super.key,
required this.section,
required this.passwordSuccessText,
required this.passwordErrorText,
required this.oldPasswordLabel,
required this.newPasswordLabel,
required this.confirmPasswordLabel,
required this.savePasswordLabel,
});
final ProfileActionSection section;
final String passwordSuccessText;
final String passwordErrorText;
final String oldPasswordLabel;
final String newPasswordLabel;
final String confirmPasswordLabel;
final String savePasswordLabel;
@override
Widget build(BuildContext context) {
switch (section) {
case ProfileActionSection.language:
return const LocalePicker();
case ProfileActionSection.password:
return AccountPassword(
successText: passwordSuccessText,
errorText: passwordErrorText,
oldPasswordLabel: oldPasswordLabel,
newPasswordLabel: newPasswordLabel,
confirmPasswordLabel: confirmPasswordLabel,
savePassword: savePasswordLabel,
);
}
}
}