[UI] Settings routes refactor, avatar and misc settings added.

This commit is contained in:
rainydaysavings
2020-07-22 21:58:23 +01:00
committed by Hugo Sales
parent 6dd966bd3f
commit d6320943ce
6 changed files with 116 additions and 68 deletions

View File

@@ -48,12 +48,22 @@ abstract class Main
}
// Settings pages
foreach (['profile', 'avatar'] as $s) {
foreach (['profile', 'avatar', 'misc', 'account'] as $s) {
$r->connect('settings_' . $s, 'settings/' . $s, [C\UserPanel::class, 'profile']);
}
foreach (['account'] as $s) {
$r->connect('settings_' . $s, 'settings/' . $s, [C\UserPanel::class, 'account']);
switch ($s) {
case 'profile':
$r->connect('settings_' . $s, 'settings/' . $s, [C\UserPanel::class, 'profile']);
break;
case 'avatar':
$r->connect('settings_' . $s, 'settings/' . $s, [C\UserPanel::class, 'avatar']);
break;
case 'misc':
$r->connect('settings_' . $s, 'settings/' . $s, [C\UserPanel::class, 'misc']);
break;
case 'account':
$r->connect('settings_' . $s, 'settings/' . $s, [C\UserPanel::class, 'account']);
break;
}
}
}
}