Skip to content

Commit

Permalink
fix button labels in dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
lexoyo committed Aug 16, 2023
1 parent be45c78 commit 9a38cfe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/view/SymbolsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ export function confirmDialog({
editor,
content: main,
title,
primaryLabel,
secondaryLabel = 'Cancel',
cbk,
lsKey,
}: {
editor: SymbolEditor,
content: string,
title: string,
primaryLabel: string,
secondaryLabel?: string,
cbk: () => void,
lsKey: string,
}) {
Expand Down Expand Up @@ -56,12 +60,12 @@ export function confirmDialog({
margin-left: auto;
background: transparent;
margin-right: 10px;
">Cancel</button>
">${secondaryLabel}</button>
<button class="gjs-btn-prim" @click=${() => {
cbk()
localStorage.setItem(lsKey, remember)
editor.Modal.close()
}}>Delete</button>
}}>${primaryLabel}</button>
</div>
</footer>`, content)
}
Expand Down Expand Up @@ -182,6 +186,7 @@ export default class extends Backbone.View {
<p>Are you sure you want to delete this symbol?</p>
<p>Deleting this symbol <em>will not</em> delete its instances, just disconnects them. Confirm to proceed or cancel to maintain the current link.</p>
`,
primaryLabel: 'Delete',
cbk: () => {
this.onRemoveConfirm(deleteButton as HTMLElement)
},
Expand Down
1 change: 1 addition & 0 deletions src/view/traits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default function (editor: SymbolEditor, options: SymbolOptions) {
<p>Are you sure you want to unlink this component from the symbol? This is a <em>definitive action<em></p>
<p>Unlinking this component <em>will not</em> delete the symbol, just disconnects it. Confirm to proceed or cancel to maintain the current link.</p>
`,
primaryLabel: 'Unlink',
cbk: () => {
editor.runCommand(cmdUnlink, { component })
},
Expand Down

0 comments on commit 9a38cfe

Please sign in to comment.