mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
fix: make dialog autofocus configurable
This commit is contained in:
@@ -607,7 +607,7 @@ export function showImportDialog() {
|
||||
));
|
||||
}
|
||||
|
||||
export function showMultifactorDialog(primaryMethod = undefined) {
|
||||
export function showMultifactorDialog(primaryMethod = "") {
|
||||
return showDialog((Dialogs, perform) => (
|
||||
<Dialogs.MultifactorDialog
|
||||
onClose={(res) => perform(res)}
|
||||
|
||||
@@ -133,7 +133,7 @@ function Dialog(props) {
|
||||
{...props.positiveButton.props}
|
||||
variant="dialog"
|
||||
data-test-id="dialog-yes"
|
||||
autoFocus
|
||||
autoFocus={props.positiveButton.autoFocus}
|
||||
disabled={props.positiveButton.disabled || false}
|
||||
onClick={
|
||||
!props.positiveButton.disabled
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import "notes-core/types";
|
||||
import { EVENTS } from "@notesnook/desktop/events";
|
||||
import { render } from "react-dom";
|
||||
import { AppEventManager } from "./common/app-events";
|
||||
|
||||
@@ -36,11 +36,10 @@ class Default {
|
||||
filter: "brightness(98%)",
|
||||
},
|
||||
outline: "none",
|
||||
":focus:not(:active), :focus-within:not(:active), :focus-visible:not(:active)":
|
||||
{
|
||||
filter: "brightness(90%)",
|
||||
bg: "bgSecondary",
|
||||
},
|
||||
":focus-visible:not(:active)": {
|
||||
filter: "brightness(90%)",
|
||||
bg: "bgSecondary",
|
||||
},
|
||||
":disabled": {
|
||||
opacity: 0.5,
|
||||
cursor: "not-allowed",
|
||||
|
||||
@@ -169,7 +169,7 @@ function Auth(props: AuthProps) {
|
||||
alignSelf: "end",
|
||||
alignItems: "center",
|
||||
}}
|
||||
onClick={() => db.user.logout()}
|
||||
onClick={() => db.user?.logout()}
|
||||
color="error"
|
||||
>
|
||||
<Logout size={16} sx={{ mr: 1 }} color="error" /> Logout
|
||||
|
||||
Reference in New Issue
Block a user