mirror of
https://github.com/zadam/trilium.git
synced 2025-12-21 15:49:56 +01:00
feat(call_to_action): inform about the layout change
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { useMemo, useState } from "preact/hooks";
|
||||
|
||||
import { t } from "../../services/i18n";
|
||||
import Button from "../react/Button";
|
||||
import Modal from "../react/Modal";
|
||||
import { dismissCallToAction, getCallToActions } from "./call_to_action_definitions";
|
||||
import { t } from "../../services/i18n";
|
||||
|
||||
export default function CallToActionDialog() {
|
||||
const activeCallToActions = useMemo(() => getCallToActions(), []);
|
||||
const activeCallToActions = useMemo(() => getCallToActions(), []);
|
||||
const [ activeIndex, setActiveIndex ] = useState(0);
|
||||
const [ shown, setShown ] = useState(true);
|
||||
const activeItem = activeCallToActions[activeIndex];
|
||||
@@ -36,11 +37,13 @@ export default function CallToActionDialog() {
|
||||
await dismissCallToAction(activeItem.id);
|
||||
await button.onClick();
|
||||
goToNext();
|
||||
}}/>
|
||||
}}/>
|
||||
)}
|
||||
</>}
|
||||
>
|
||||
<p>{activeItem.message}</p>
|
||||
<p style={{
|
||||
whiteSpace: "pre-wrap"
|
||||
}}>{activeItem.message}</p>
|
||||
</Modal>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user