mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-23 10:00:08 +08:00
style: add centered prop to modals and components for improved layout consistency
This commit is contained in:
parent
b80b63e207
commit
47d0a3cc0d
@ -254,6 +254,7 @@ export function WebdavBackupManager({ visible, onClose, webdavConfig, restoreMet
|
||||
open={visible}
|
||||
onCancel={onClose}
|
||||
width={800}
|
||||
centered
|
||||
footer={[
|
||||
<Button key="refresh" icon={<ReloadOutlined />} onClick={fetchBackupFiles} disabled={loading}>
|
||||
{t('settings.data.webdav.backup.manager.refresh')}
|
||||
|
||||
@ -76,7 +76,8 @@ export function WebdavBackupModal({
|
||||
open={isModalVisible}
|
||||
onOk={handleBackup}
|
||||
onCancel={handleCancel}
|
||||
okButtonProps={{ loading: backuping }}>
|
||||
okButtonProps={{ loading: backuping }}
|
||||
centered>
|
||||
<Input
|
||||
value={customFileName}
|
||||
onChange={(e) => setCustomFileName(e.target.value)}
|
||||
@ -206,7 +207,8 @@ export function WebdavRestoreModal({
|
||||
onOk={handleRestore}
|
||||
onCancel={handleCancel}
|
||||
okButtonProps={{ loading: restoring }}
|
||||
width={600}>
|
||||
width={600}
|
||||
centered>
|
||||
<div style={{ position: 'relative' }}>
|
||||
<Select
|
||||
style={{ width: '100%' }}
|
||||
|
||||
@ -179,7 +179,8 @@ const App: FC<Props> = ({ app, onClick, size = 60, isLast }) => {
|
||||
setIsModalVisible(false)
|
||||
setFileList([])
|
||||
}}
|
||||
footer={null}>
|
||||
footer={null}
|
||||
centered>
|
||||
<Form form={form} onFinish={handleAddCustomApp} layout="vertical">
|
||||
<Form.Item
|
||||
name="id"
|
||||
|
||||
@ -162,7 +162,8 @@ const QuickPhrasesButton = ({ ref, setInputValue, resizeTextArea, ToolbarButton,
|
||||
setIsModalOpen(false)
|
||||
setFormData({ title: '', content: '', location: 'global' })
|
||||
}}
|
||||
width={520}>
|
||||
width={520}
|
||||
centered>
|
||||
<Space direction="vertical" style={{ width: '100%' }} size="middle">
|
||||
<div>
|
||||
<Label>{t('settings.quickPhrase.titleLabel')}</Label>
|
||||
|
||||
@ -43,6 +43,7 @@ const Mermaid: React.FC<Props> = ({ chart }) => {
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(renderMermaidBase, 0)
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@ -347,7 +347,7 @@ const MessageMenubar: FC<Props> = (props) => {
|
||||
].filter(Boolean)
|
||||
}
|
||||
],
|
||||
[message, messageContainerRef, onEdit, mainTextContent, onNewBranch, t, topic.name, exportMenuOptions]
|
||||
[message, messageContainerRef, isEditable, onEdit, mainTextContent, onNewBranch, t, topic.name, exportMenuOptions]
|
||||
)
|
||||
|
||||
const onRegenerate = async (e: React.MouseEvent | undefined) => {
|
||||
|
||||
@ -37,8 +37,8 @@ import {
|
||||
setPasteLongTextThreshold,
|
||||
setRenderInputMessageAsMarkdown,
|
||||
setShowInputEstimatedTokens,
|
||||
setShowPrompt,
|
||||
setShowMessageDivider,
|
||||
setShowPrompt,
|
||||
setShowTranslateConfirm,
|
||||
setThoughtAutoCollapse
|
||||
} from '@renderer/store/settings'
|
||||
|
||||
@ -135,7 +135,8 @@ const AssistantRegularPromptsSettings: FC<AssistantRegularPromptsSettingsProps>
|
||||
open={isModalOpen}
|
||||
onOk={handleModalOk}
|
||||
onCancel={() => setIsModalOpen(false)}
|
||||
width={520}>
|
||||
width={520}
|
||||
centered>
|
||||
<Space direction="vertical" style={{ width: '100%' }} size="middle">
|
||||
<div>
|
||||
<Label>{t('assistants.settings.regular_phrases.titleLabel', 'Title')}</Label>
|
||||
|
||||
@ -117,7 +117,8 @@ const QuickPhraseSettings: FC = () => {
|
||||
open={isModalOpen}
|
||||
onOk={handleModalOk}
|
||||
onCancel={() => setIsModalOpen(false)}
|
||||
width={520}>
|
||||
width={520}
|
||||
centered>
|
||||
<Space direction="vertical" style={{ width: '100%' }} size="middle">
|
||||
<div>
|
||||
<Label>{t('settings.quickPhrase.titleLabel')}</Label>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user