Skip to content

Commit

Permalink
updated JSON template for toolbar button
Browse files Browse the repository at this point in the history
  • Loading branch information
d2phap committed Nov 30, 2024
1 parent 962a0ae commit 4e307da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export type IToolbarButton = {
Image: string,
ImageUrl: string,
OnClick: SingleAction,
Hotkeys: string[],
};

export type IEditApp = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export class ToolbarButtonEditDialogHtmlElement extends HTMLDialogElement {
<span class="create-only" lang-text="FrmSettings.Toolbar._AddNewButton">[Add a custom toolbar button]</span>
<span class="edit-only" lang-text="FrmSettings.Toolbar._EditButton">[Edit toolbar button]</span>
</header>
<div class="dialog-body" style="width: 33rem;">
<div class="dialog-body" style="width: 40rem;">
<div class="mb-3">
<div class="mb-1" lang-text="FrmSettings.Toolbar._ButtonJson">[Button JSON]</div>
<textarea class="w-100" name="_ButtonJson" required rows="16" spellcheck="false"
<textarea class="w-100" name="_ButtonJson" required rows="20" spellcheck="false"
style="font-family: var(--fontCode);"
placeholder='{
"Id": "Btn_OpenWithMSPaint",
Expand All @@ -36,7 +36,8 @@ export class ToolbarButtonEditDialogHtmlElement extends HTMLDialogElement {
"Arguments": ["<file>"],
"NextAction": {
}
}
},
"Hotkeys": []
}'></textarea>
</div>
</div>
Expand Down Expand Up @@ -64,6 +65,7 @@ export class ToolbarButtonEditDialogHtmlElement extends HTMLDialogElement {
Executable: '',
Arguments: ['<file>'],
},
Hotkeys: [],
} as IToolbarButton;
const json = JSON.stringify(defaultBtn, null, 2);

Expand Down

0 comments on commit 4e307da

Please sign in to comment.