;
}
@@ -346,6 +342,20 @@ function ConfirmSheet({icon, title, body, confirmLabel = '确认', confirmDanger
;
}
+// Was a bare `window.confirm()` -- the only one of these four confirmation flows not using this
+// same ConfirmSheet pattern, an inconsistency with cache/history/delete-account below (their own
+// comments describe deliberately moving away from route-per-confirmation dialogs to this in-place
+// sheet). A native confirm() is also environment-dependent: some embedded WebViews/kiosk contexts
+// disable synchronous dialogs outright (confirm() then returns false unconditionally, silently
+// preventing logout with no error shown), which this sheet-based approach doesn't depend on.
+function LogoutConfirm({onLogout, onToast, onClose}) {
+ const confirm = () => {
+ onClose();
+ onLogout ? onLogout() : onToast('当前环境不支持退出登录');
+ };
+ return ;
+}
+
// No backend endpoint clears cache/history -- both are pure client-side operations (confirmed:
// server/main.go's ~74 routes have nothing for either). Cache clearing empties Cache Storage/IDB;
// clearing all history calls the native Tinode delMessagesAll(false) per open conversation, same