Skip to content

Commit

Permalink
fix(ui): use different dialog for node added popup
Browse files Browse the repository at this point in the history
Fixes #3690
  • Loading branch information
robertsLando committed Apr 29, 2024
1 parent 8d75372 commit 2affdce
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@
/>

<Confirm ref="confirm"></Confirm>
<!-- Used for node added only -->
<Confirm ref="confirm2"></Confirm>

<LoaderDialog
v-model="dialogLoader"
Expand Down Expand Up @@ -647,7 +649,7 @@ export default {
},
async onNodeAdded({ node, result }) {
if (!this.nodesManagerDialog) {
await this.confirm(
await this.confirm2(
'Node added',
`<div class="d-flex flex-column align-center col">
<i aria-hidden="true" class="v-icon notranslate material-icons theme--light success--text" style="font-size: 60px;">check_circle</i>
Expand Down Expand Up @@ -694,6 +696,18 @@ export default {
return this.$refs.confirm.open(title, text, options)
},
async confirm2(title, text, level, options) {
options = options || {}
const levelMap = {
warning: 'orange',
alert: 'red',
}
options.color = options.color || levelMap[level] || 'primary'
return this.$refs.confirm2.open(title, text, options)
},
showSnackbar: function (text, color, timeout) {
const message = {
message: text,
Expand Down

0 comments on commit 2affdce

Please sign in to comment.