feat(profile): rebuild account settings page

This commit is contained in:
kate522 committed 2026-10-05 18:58:49 +08:00
1 parent f00c3faeaa
commit 346146b4fa
14 files changed
+609 -750

No files matched your search

+4 -1
View File
@@ -335,6 +335,7 @@ test('profile save uses AJAX rehydrate and a fixed-id notyf flow without query f
test('settings actions use rehydrated fixed-id notyf flows', () => {
const userCenter = read('assets/js/routes/user-center.js');
const auth = read('assets/js/auth.js');
const settings = read('inc/helpers/user-center-renderers/profile-settings.php');
const context = read('inc/helpers/aksrt-user-center.php');
const page = read('templates/pages/page-profile.php');
@@ -355,6 +356,8 @@ test('settings actions use rehydrated fixed-id notyf flows', () => {
assert.match(userCenter, /aksrtSettingsInitialized/);
assert.match(userCenter, /oauth_action[\s\S]*?notyf\(message, type\)[\s\S]*?history\.replaceState/);
assert.doesNotMatch(userCenter, /oauth_unbound/);
assert.match(auth, /\[data-identity-root\], \[data-aksrt-settings-root\]/);
assert.doesNotMatch(auth, /\.settings-section/);
assert.match(userCenter, /'aksrt-settings-phone-code-toast'/);
assert.match(userCenter, /notyf\('正在发送验证码…', 'load', '', toastId\)/);
@@ -362,7 +365,7 @@ test('settings actions use rehydrated fixed-id notyf flows', () => {
assert.match(userCenter, /notyf\([^;]+?'danger', 5, toastId\)/);
assert.match(userCenter, /\/user\/phone-code/);
assert.match(settings, /require \$dir \. '\/profile-account-modals\.php';/);
assert.match(settings, /require \$dir \. '\/settings-account\.php';/);
assert.doesNotMatch(context, /account_modals_html|'account-modals'/);
assert.doesNotMatch(page, /user-center\/account-modals/);
assert.equal(fs.existsSync(path.join(root, 'templates/parts/user-center/account-modals.php')), false);