fix bad link to project page, fix improper action on invite-add-contact cancel

This commit is contained in:
2024-10-12 20:55:55 -06:00
parent 9c527b27f8
commit 6f880d0df1
12 changed files with 125 additions and 94 deletions

View File

@@ -2,7 +2,8 @@
<template>
<div v-if="visible" class="dialog-overlay">
<div class="dialog">
<h1 class="text-xl font-bold text-center mb-4">Contact Name</h1>
<h1 class="text-xl font-bold text-center mb-4">{{ title }}</h1>
{{ message }}
Note that their name is only stored on this device.
<input
type="text"
@@ -38,23 +39,38 @@ import { Vue, Component } from "vue-facing-decorator";
@Component
export default class ContactNameDialog extends Vue {
callback: (name?: string) => void = () => {};
cancelCallback: () => void = () => {};
saveCallback: (name?: string) => void = () => {};
message = "";
newText = "";
title = "Contact Name";
visible = false;
async open(aCallback?: (name?: string) => void) {
this.callback = aCallback || this.callback;
async open(
title?: string,
message?: string,
saveCallback?: (name: string) => void,
cancelCallback?: () => void,
) {
this.cancelCallback = cancelCallback || this.cancelCallback;
this.saveCallback = saveCallback || this.saveCallback;
this.message = message ?? this.message;
this.title = title ?? this.title;
this.visible = true;
}
async onClickSaveChanges() {
this.visible = false;
this.callback(this.newText);
if (this.saveCallback) {
this.saveCallback(this.newText);
}
}
onClickCancel() {
this.visible = false;
this.callback();
if (this.cancelCallback) {
this.cancelCallback();
}
}
}
</script>