forked from jsnbuchanan/crowd-funder-for-time-pwa
fix: resolve ContactInputForm v-model binding and lint errors
Fix ContactInputForm v-model binding issue that was causing "no contact info" error when adding contacts. The component was using incorrect prop name for v-model. **Changes:** - Update ContactInputForm to use standard `modelValue` prop instead of `input` - Fix v-model binding by using `update:modelValue` event emission - Remove unused `Model` import from vue-facing-decorator - Replace `@ts-ignore` with `@ts-expect-error` in ShareMyContactInfoView **Fixes:** - Contact input field now properly updates parent component state - Eliminates "There was no contact info to add" error when DID is entered - Resolves Vue 3 v-model compatibility issues - Clears remaining lint errors **Testing:** - Contact form should now accept DID input and process it correctly - v-model binding works as expected between ContactInputForm and ContactsView
This commit is contained in:
57
.gitignore
vendored
57
.gitignore
vendored
@@ -56,4 +56,59 @@ icons
|
|||||||
|
|
||||||
*.log
|
*.log
|
||||||
android/app/src/main/res/
|
android/app/src/main/res/
|
||||||
sql-wasm.wasm
|
sql-wasm.wasm
|
||||||
|
|
||||||
|
# Temporary and generated files
|
||||||
|
temp.*
|
||||||
|
*.tmp
|
||||||
|
*.temp
|
||||||
|
*.bak
|
||||||
|
*.cache
|
||||||
|
git.diff.*
|
||||||
|
*.har
|
||||||
|
|
||||||
|
# Development artifacts
|
||||||
|
dev-dist/
|
||||||
|
*.map
|
||||||
|
|
||||||
|
# OS generated files
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
# Capacitor build outputs and generated files
|
||||||
|
android/app/build/
|
||||||
|
android/capacitor-cordova-android-plugins/build/
|
||||||
|
ios/App/App/public/assets/
|
||||||
|
ios/App/App/build/
|
||||||
|
ios/App/build/
|
||||||
|
|
||||||
|
# Capacitor generated configs (keep source configs)
|
||||||
|
android/app/build/intermediates/assets/debug/mergeDebugAssets/capacitor.*.json
|
||||||
|
android/app/build/intermediates/compressed_assets/debug/compressDebugAssets/out/assets/capacitor.*.json.jar
|
||||||
|
android/app/build/intermediates/merged_java_res/debug/mergeDebugJavaResource/feature-capacitor-cordova-android-plugins.jar
|
||||||
|
android/app/build/outputs/aar/capacitor-cordova-android-plugins-debug.aar
|
||||||
|
|
||||||
|
# Keep these Capacitor files in version control:
|
||||||
|
# - capacitor.config.json (root, electron, ios)
|
||||||
|
# - src/main.capacitor.ts
|
||||||
|
# - vite.config.capacitor.mts
|
||||||
|
# - android/capacitor.settings.gradle
|
||||||
|
# - android/app/capacitor.build.gradle
|
||||||
|
# - android/app/src/main/assets/capacitor.plugins.json
|
||||||
|
|
||||||
|
# Electron build outputs and generated files
|
||||||
|
electron/build/
|
||||||
|
electron/app/
|
||||||
|
electron/dist/
|
||||||
|
electron/out/
|
||||||
|
|
||||||
|
# Keep these Electron files in version control:
|
||||||
|
# - electron/src/preload.ts (source)
|
||||||
|
# - electron/src/index.ts (source)
|
||||||
|
# - electron/src/setup.ts (source)
|
||||||
|
# - electron/package.json
|
||||||
|
# - electron/electron-builder.config.json
|
||||||
|
# - electron/build-packages.sh
|
||||||
|
# - electron/live-runner.js
|
||||||
|
# - electron/resources/electron-publisher-custom.js
|
||||||
@@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
|||||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||||
}, {
|
}, {
|
||||||
"url": "index.html",
|
"url": "index.html",
|
||||||
"revision": "0.ejnjchn8vfg"
|
"revision": "0.5ufvvsiqllo"
|
||||||
}], {});
|
}], {});
|
||||||
workbox.cleanupOutdatedCaches();
|
workbox.cleanupOutdatedCaches();
|
||||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -64,7 +64,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Vue, Prop, Model } from "vue-facing-decorator";
|
import { Component, Vue, Prop } from "vue-facing-decorator";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ContactInputForm - Contact input form component
|
* ContactInputForm - Contact input form component
|
||||||
@@ -76,23 +76,29 @@ import { Component, Vue, Prop, Model } from "vue-facing-decorator";
|
|||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
name: "ContactInputForm",
|
name: "ContactInputForm",
|
||||||
|
emits: [
|
||||||
|
"submit",
|
||||||
|
"show-onboard-meeting",
|
||||||
|
"registration-required",
|
||||||
|
"navigate-onboard-meeting",
|
||||||
|
"qr-scan",
|
||||||
|
"update:modelValue",
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export default class ContactInputForm extends Vue {
|
export default class ContactInputForm extends Vue {
|
||||||
@Prop({ required: true }) isRegistered!: boolean;
|
@Prop({ required: true }) isRegistered!: boolean;
|
||||||
|
|
||||||
@Model("input", { type: String, default: "" })
|
@Prop({ type: String, default: "" }) modelValue!: string;
|
||||||
inputValue!: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the input value and emit change event
|
* Computed property for v-model binding
|
||||||
*/
|
*/
|
||||||
set input(value: string) {
|
get inputValue(): string {
|
||||||
this.inputValue = value;
|
return this.modelValue;
|
||||||
this.$emit("input", value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get input(): string {
|
set inputValue(value: string) {
|
||||||
return this.inputValue;
|
this.$emit("update:modelValue", value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -77,9 +77,9 @@ export default class ShareMyContactInfoView extends Vue {
|
|||||||
async mounted() {
|
async mounted() {
|
||||||
// Debug logging for test diagnosis
|
// Debug logging for test diagnosis
|
||||||
const settings = await this.$settings();
|
const settings = await this.$settings();
|
||||||
// @ts-ignore
|
|
||||||
const activeDid = settings?.activeDid;
|
const activeDid = settings?.activeDid;
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
window.__SHARE_CONTACT_DEBUG__ = { settings, activeDid };
|
window.__SHARE_CONTACT_DEBUG__ = { settings, activeDid };
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log("[ShareMyContactInfoView] mounted", { settings, activeDid });
|
console.log("[ShareMyContactInfoView] mounted", { settings, activeDid });
|
||||||
|
|||||||
Reference in New Issue
Block a user