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