@@ -11,6 +11,7 @@ import dialog from "../../../services/dialog";
1111import { formatDateTime } from "../../../utils/formatters" ;
1212import ActionButton from "../../react/ActionButton" ;
1313import { useTriliumEvent } from "../../react/hooks" ;
14+ import HelpButton from "../../react/HelpButton" ;
1415
1516type RenameTokenCallback = ( tokenId : string , oldName : string ) => Promise < void > ;
1617type DeleteTokenCallback = ( tokenId : string , name : string ) => Promise < void > ;
@@ -48,26 +49,21 @@ export default function EtapiSettings() {
4849 message : t ( "etapi.token_created_message" ) ,
4950 defaultValue : authToken
5051 } ) ;
51- } , [ ] ) ;
52+ } , [ ] ) ;
5253
5354 return (
5455 < OptionsSection title = { t ( "etapi.title" ) } >
5556 < FormText >
56- { t ( "etapi.description" ) } < br />
57- < RawHtml
58- html = { t ( "etapi.see_more" , {
59- link_to_wiki : `<a class="tn-link" href="https://triliumnext.github.io/Docs/Wiki/etapi.html">${ t ( "etapi.wiki" ) } </a>` ,
60- // TODO: We use window.open src/public/app/services/link.ts -> prevents regular click behavior on "a" element here because it's a relative path
61- link_to_openapi_spec : `<a class="tn-link" onclick="window.open('etapi/etapi.openapi.yaml')" href="etapi/etapi.openapi.yaml">${ t ( "etapi.openapi_spec" ) } </a>` ,
62- link_to_swagger_ui : `<a class="tn-link" href="#_help_f3xpgx6H01PW">${ t ( "etapi.swagger_ui" ) } </a>`
63- } ) } />
57+ { t ( "etapi.description" ) }
58+ < HelpButton helpPage = "pgxEVkzLl1OP" />
6459 </ FormText >
6560
6661 < Button
6762 size = "small" icon = "bx bx-plus"
6863 text = { t ( "etapi.create_token" ) }
6964 onClick = { createTokenCallback }
7065 />
66+
7167 < hr />
7268
7369 < h5 > { t ( "etapi.existing_tokens" ) } </ h5 >
@@ -123,7 +119,7 @@ function TokenList({ tokens }: { tokens: EtapiToken[] }) {
123119 text = { t ( "etapi.rename_token" ) }
124120 onClick = { ( ) => renameCallback ( etapiTokenId , name ) }
125121 />
126-
122+
127123 < ActionButton
128124 icon = "bx bx-trash"
129125 text = { t ( "etapi.delete_token" ) }
0 commit comments