Don't send the "valid" flag in ProofHintFlags
This commit is contained in:
parent
9eadfbaed6
commit
7e87aceec7
2 changed files with 3 additions and 9 deletions
|
|
@ -46,18 +46,16 @@ const props = defineProps<{
|
||||||
|
|
||||||
const infoText: Ref<string | undefined> = ref(undefined);
|
const infoText: Ref<string | undefined> = ref(undefined);
|
||||||
const creationDate: Ref<string | undefined> = ref(undefined);
|
const creationDate: Ref<string | undefined> = ref(undefined);
|
||||||
const valid: Ref<boolean> = ref(false);
|
|
||||||
|
|
||||||
const hasC2PA = computed(() => {
|
const hasC2PA = computed(() => {
|
||||||
return props.proof?.integrity?.c2pa !== undefined;
|
return props.proof?.integrity?.c2pa !== undefined;
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
props,
|
props,
|
||||||
() => {
|
() => {
|
||||||
infoText.value = undefined;
|
infoText.value = undefined;
|
||||||
creationDate.value = undefined;
|
creationDate.value = undefined;
|
||||||
valid.value = false;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (props.flags) {
|
if (props.flags) {
|
||||||
|
|
@ -88,8 +86,6 @@ watch(
|
||||||
|
|
||||||
infoText.value = result === "" ? undefined : result;
|
infoText.value = result === "" ? undefined : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
valid.value = props.flags?.valid ?? false;
|
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ export type ProofHintFlagsEdit = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProofHintFlags = {
|
export type ProofHintFlags = {
|
||||||
valid: boolean;
|
|
||||||
device?: string;
|
device?: string;
|
||||||
creationDate?: Date;
|
creationDate?: Date;
|
||||||
generator?: ProofHintFlagsGenerator;
|
generator?: ProofHintFlagsGenerator;
|
||||||
|
|
@ -304,7 +303,6 @@ export const extractProofHintFlags = (proof?: Proof): ProofHintFlags | undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const flags: ProofHintFlags = {
|
const flags: ProofHintFlags = {
|
||||||
valid: valid,
|
|
||||||
device: source && source.length == 1 ? source[0].value : undefined,
|
device: source && source.length == 1 ? source[0].value : undefined,
|
||||||
creationDate: date,
|
creationDate: date,
|
||||||
generator: generator,
|
generator: generator,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue