fix: self-deactivation, UI overflow, Open With, archive nav, schedule modal
Settings - Delete Account -> Self Deactivate: - backend: add POST /api/auth/self-deactivate (immediate, no email link) Guards against last-admin and hidden super-admin. Revokes FCM tokens, sends notification email, logs activity - auth.js route: add /self-deactivate route - auth_repository.dart: add requestSelfDeactivation() - auth_provider.dart: add requestSelfDeactivation() (calls logout() after) - settings_screen.dart: 2-step _handleDeactivateAccount: Step 1 confirm, Step 2 type DEACTIVATE. Danger zone card updated to deactivation theme Report screen - compliance filter button label overflow: - Wrap label Text in Flexible to ellipsize instead of clip Settings - Edit Schedule Dates modal button overflow: - Column layout on narrow screens so buttons are never squished Document screen - Open With not working on Windows: - Use openwith.exe (Windows 8+) with fallback to rundll32 OpenAs_RunDLL Windows sidebar - Archive tab: - Move Archives from ACCOUNT group to OVERVIEW group
This commit is contained in:
1 parent
1a20994749
commit
689dbc48e7
9 files changed
+293
-59
No files matched your search
@@ -271,5 +271,22 @@ class AuthRepository {
|
||||
throw Exception(errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
/// Immediately deactivate own account (no email required — 2-step client confirmation)
|
||||
Future<String> requestSelfDeactivation() async {
|
||||
try {
|
||||
final options = await _getAuthOptions();
|
||||
final response = await _dio.post(
|
||||
'/auth/self-deactivate',
|
||||
options: options,
|
||||
);
|
||||
return response.data['message'] as String? ??
|
||||
'Your account has been deactivated.';
|
||||
} on DioException catch (e) {
|
||||
final errorMessage =
|
||||
e.response?.data['message'] ?? 'Failed to deactivate account.';
|
||||
throw Exception(errorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user