mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update save button style (#1542)
This commit is contained in:
@ -25,6 +25,7 @@ const BaseDialog: React.FC<Props> = (props: Props) => {
|
|||||||
const dialogIndex = dialogStore.state.dialogStack.findIndex((item) => item === dialogName);
|
const dialogIndex = dialogStore.state.dialogStack.findIndex((item) => item === dialogName);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
document.body.classList.add("overflow-hidden");
|
||||||
dialogStore.pushDialogStack(dialogName);
|
dialogStore.pushDialogStack(dialogName);
|
||||||
const handleKeyDown = (event: KeyboardEvent) => {
|
const handleKeyDown = (event: KeyboardEvent) => {
|
||||||
if (event.code === "Escape") {
|
if (event.code === "Escape") {
|
||||||
@ -39,6 +40,9 @@ const BaseDialog: React.FC<Props> = (props: Props) => {
|
|||||||
return () => {
|
return () => {
|
||||||
document.body.removeEventListener("keydown", handleKeyDown);
|
document.body.removeEventListener("keydown", handleKeyDown);
|
||||||
dialogStore.removeDialog(dialogName);
|
dialogStore.removeDialog(dialogName);
|
||||||
|
if (dialogStore.state.dialogStack.length === 0) {
|
||||||
|
document.body.classList.remove("overflow-hidden");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ const LocaleSelect: FC<Props> = (props: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Select
|
<Select
|
||||||
className={`!min-w-[12rem] w-auto whitespace-nowrap ${className ?? ""}`}
|
className={`!min-w-[10rem] w-auto whitespace-nowrap ${className ?? ""}`}
|
||||||
startDecorator={<Icon.Globe className="w-4 h-auto" />}
|
startDecorator={<Icon.Globe className="w-4 h-auto" />}
|
||||||
value={value}
|
value={value}
|
||||||
onChange={(_, value) => handleSelectChange(value as Locale)}
|
onChange={(_, value) => handleSelectChange(value as Locale)}
|
||||||
|
@ -137,7 +137,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
> .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-full flex flex-row justify-center items-center shadow cursor-pointer px-4 py-0 leading-8 bg-green-600 text-white text-sm hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-60;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user