fix: add disconnect confirmation dialog to both channel pages#1185
fix: add disconnect confirmation dialog to both channel pages#1185jaimax0401 wants to merge 1 commit into
Conversation
lefarcen
left a comment
There was a problem hiding this comment.
Hey @jaimax0401, thanks for carrying the earlier review feedback into this iteration. The locale placement is fixed, the unrelated files are gone, and the desktop confirmation copy now has readable styling. I found one remaining web-flow issue before this lands: the current implementation turns the existing reset confirmation into a second confirmation step instead of replacing it with the disconnect confirmation. See the inline note below — after that is cleaned up, this should be in good shape.
| <button | ||
| type="button" | ||
| onClick={() => | ||
| setDisconnectChannelId(channel.id) |
There was a problem hiding this comment.
P2 This opens a second confirmation from inside the existing reset-confirmation dialog, so users now have to confirm twice and the original reset modal remains underneath until the mutation succeeds. Please make the existing reset dialog be the disconnect confirmation (swap its title/body/button copy and call disconnectMutation.mutate() there), or close showResetConfirm before showing this modal so only one confirmation is visible for the disconnect action.
Issue: nexu-io#1063 Changes: - desktop/cloud-profile-page.tsx: confirmation modal using existing CSS classes - desktop/runtime-page.css: .cloud-profile-modal-desc style - web/channels.tsx: disconnectChannelId state + confirmation modal - i18n/en.ts: channels.confirmDisconnect* keys added inside en object - i18n/zh-CN.ts: Chinese translations
519b942 to
c7ee415
Compare
lefarcen
left a comment
There was a problem hiding this comment.
Hey @jaimax0401, thanks for the quick cleanup. This version reuses the existing web confirmation dialog with the disconnect-specific copy, so the duplicate-confirmation blocker from my last review is resolved. The desktop modal, readable warning text, and locale entries all look consistent from this pass. This clears my previous change request; normal CI/maintainer gates still apply.
Description
Adds a secondary confirmation dialog before disconnecting a channel, as described in issue #1063.
Changes (5 files only)
apps/desktop/src/pages/cloud-profile-page.tsx— confirmation modal using existing CSS classes (cloud-profile-modal-header, cloud-profile-modal-close, cloud-profile-modal-actions)apps/desktop/src/runtime-page.css— .cloud-profile-modal-desc styleapps/web/src/pages/channels.tsx— disconnectChannelId state + standalone confirmation modal following existing reset confirmation patternapps/web/src/i18n/locales/en.ts— channels.confirmDisconnect* keys added inside en object (before closing} as const;)apps/web/src/i18n/locales/zh-CN.ts— Chinese translationsReviewer feedback addressed
disconnectChannelId;expression)Testing
Manual:
Fixes #1063