Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace native dialog with vue modal #1781

Merged
merged 1 commit into from Nov 29, 2023
Merged

Conversation

azmy60
Copy link
Contributor

@azmy60 azmy60 commented Nov 13, 2023

closes #1755

@azmy60 azmy60 requested a review from rathboma November 17, 2023 07:31
Copy link
Collaborator

@rathboma rathboma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, merge away. Add comments at some point on the architecture, and point to the other file with appropriate code in it.

export default Vue.extend({
data() {
return {
name: Vue.prototype.$confirmModalId,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment that we need to get this from the prototype because we need it to call the modal function?

},
methods: {
beforeOpen(event: any) {
this.onConfirm = event.params.onConfirm;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't super like this, but I guess it's fine for the confirm dialog.

@@ -196,7 +196,7 @@ import QueryRenameForm from '@/components/common/form/QueryRenameForm.vue'
this.$root.$emit('favoriteClick', item)
},
async remove(favorite) {
if (window.confirm("Really delete?")) {
if (await this.$confirm("Really delete?")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work adapting the API for this!

@rathboma rathboma merged commit 202709d into master Nov 29, 2023
4 checks passed
@rathboma rathboma deleted the fix/unuse-native-modals branch November 29, 2023 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants