mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update cancel edit button style (#472)
This commit is contained in:
@ -415,14 +415,6 @@ const MemoEditor = () => {
|
|||||||
onFocus={handleEditorFocus}
|
onFocus={handleEditorFocus}
|
||||||
onBlur={handleEditorBlur}
|
onBlur={handleEditorBlur}
|
||||||
>
|
>
|
||||||
<div className="editor-header-container">
|
|
||||||
<div className={`editing-container ${isEditing ? "" : "!hidden"}`}>
|
|
||||||
<span className="tip-text">{t("editor.editing")}</span>
|
|
||||||
<button className="cancel-btn" onClick={handleCancelEdit}>
|
|
||||||
{t("common.cancel")}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Editor ref={editorRef} {...editorConfig} />
|
<Editor ref={editorRef} {...editorConfig} />
|
||||||
<div className="common-tools-wrapper">
|
<div className="common-tools-wrapper">
|
||||||
<div className="common-tools-container">
|
<div className="common-tools-container">
|
||||||
@ -488,6 +480,9 @@ const MemoEditor = () => {
|
|||||||
handleValueChanged={handleMemoVisibilityOptionChanged}
|
handleValueChanged={handleMemoVisibilityOptionChanged}
|
||||||
/>
|
/>
|
||||||
<div className="buttons-container">
|
<div className="buttons-container">
|
||||||
|
<button className={`action-btn cancel-btn ${isEditing ? "" : "!hidden"}`} onClick={handleCancelEdit}>
|
||||||
|
{t("editor.cancel-edit")}
|
||||||
|
</button>
|
||||||
<button className="action-btn confirm-btn" disabled={!allowSave || state.isUploadingResource} onClick={handleSaveBtnClick}>
|
<button className="action-btn confirm-btn" disabled={!allowSave || state.isUploadingResource} onClick={handleSaveBtnClick}>
|
||||||
{t("editor.save")}
|
{t("editor.save")}
|
||||||
<img className="icon-img w-4 h-auto" src="/logo.webp" />
|
<img className="icon-img w-4 h-auto" src="/logo.webp" />
|
||||||
|
@ -28,24 +28,8 @@
|
|||||||
@apply border-blue-500;
|
@apply border-blue-500;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .editor-header-container {
|
|
||||||
@apply w-full flex flex-row justify-between items-center mt-3 mb-1;
|
|
||||||
|
|
||||||
> .editing-container {
|
|
||||||
@apply flex flex-row justify-start items-center text-xs;
|
|
||||||
|
|
||||||
> .tip-text {
|
|
||||||
@apply text-gray-400 mr-2;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .cancel-btn {
|
|
||||||
@apply px-2 border rounded-full leading-5 text-blue-600 hover:border-blue-600;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
> .memo-editor {
|
> .memo-editor {
|
||||||
@apply flex flex-col justify-start items-start relative w-full h-auto bg-white;
|
@apply mt-4 flex flex-col justify-start items-start relative w-full h-auto bg-white;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .common-tools-wrapper {
|
> .common-tools-wrapper {
|
||||||
@ -136,6 +120,10 @@
|
|||||||
> .buttons-container {
|
> .buttons-container {
|
||||||
@apply grow-0 shrink-0 flex flex-row justify-end items-center;
|
@apply grow-0 shrink-0 flex flex-row justify-end items-center;
|
||||||
|
|
||||||
|
> .cancel-btn {
|
||||||
|
@apply mr-4 text-sm text-gray-600 hover:opacity-80;
|
||||||
|
}
|
||||||
|
|
||||||
> .confirm-btn {
|
> .confirm-btn {
|
||||||
@apply border-none select-none rounded flex flex-row justify-center items-center shadow cursor-pointer px-3 py-0 leading-8 bg-green-600 text-white text-sm hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-60;
|
@apply border-none select-none rounded flex flex-row justify-center items-center shadow cursor-pointer px-3 py-0 leading-8 bg-green-600 text-white text-sm hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-60;
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
},
|
},
|
||||||
"editor": {
|
"editor": {
|
||||||
"editing": "Editing...",
|
"editing": "Editing...",
|
||||||
|
"cancel-edit": "Cancel Edit",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"placeholder": "Any thoughts...",
|
"placeholder": "Any thoughts...",
|
||||||
"only-image-supported": "Only image file supported.",
|
"only-image-supported": "Only image file supported.",
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
},
|
},
|
||||||
"editor": {
|
"editor": {
|
||||||
"editing": "Đang chỉnh sửa...",
|
"editing": "Đang chỉnh sửa...",
|
||||||
|
"cancel-edit": "Cancel Edit",
|
||||||
"save": "Lưu",
|
"save": "Lưu",
|
||||||
"placeholder": "Bất cứ gì bạn đang nghĩ...",
|
"placeholder": "Bất cứ gì bạn đang nghĩ...",
|
||||||
"only-image-supported": "Chỉ hỗ trợ hình ảnh.",
|
"only-image-supported": "Chỉ hỗ trợ hình ảnh.",
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
},
|
},
|
||||||
"editor": {
|
"editor": {
|
||||||
"editing": "编辑中...",
|
"editing": "编辑中...",
|
||||||
|
"cancel-edit": "退出编辑",
|
||||||
"save": "记下",
|
"save": "记下",
|
||||||
"placeholder": "现在的想法是...",
|
"placeholder": "现在的想法是...",
|
||||||
"only-image-supported": "仅支持图片文件。",
|
"only-image-supported": "仅支持图片文件。",
|
||||||
|
Reference in New Issue
Block a user