1
0
Fork 0

Resolve issues from 'npm run build'.

One of them needed a patch in primevue 4.4.2 which was release only 2 weeks ago.
This commit is contained in:
Brian D 2025-10-19 00:56:36 -04:00
parent 47ed7af853
commit 5b48c5a8c5
4 changed files with 2401 additions and 1492 deletions

3859
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,11 +4,13 @@ import { defineProps } from 'vue';
import { renderSVG } from 'uqr'; import { renderSVG } from 'uqr';
const { content } = defineProps({ const { content } = defineProps({
content: String, content: {
type: String,
required: true,
},
}); });
const svg = renderSVG(content); const svg = renderSVG(content);
</script> </script>
<template> <template>

View file

@ -19,14 +19,18 @@ const route = useRoute();
const next = route.query.next; const next = route.query.next;
function handleLogin({ valid }) { function handleLogin({ valid } : { valid: boolean }) {
if (!valid) { if (!valid) {
console.log('Input is not valid.') console.log('Input is not valid.')
return; return;
} }
sessionStore.login(username.value, password.value).then(() => { sessionStore.login(username.value, password.value).then(() => {
if (typeof route.query.next !== 'string') {
console.error('next is not valid string.')
return;
}
console.log(`go to ${next}`) console.log(`go to ${next}`)
router.push(next); router.push(route.query.next);
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
}); });
@ -36,8 +40,17 @@ const initialValues = reactive({
username: 'joe', username: 'joe',
password: 'password', password: 'password',
}); });
const resolver = ({ values }) => { interface MessageType {
const errors = {}; message: string;
}
// TODO: Get the proper type. Maybe Record<string, any> in primevue/
// forms/forms.
interface FormErrors {
username?: MessageType[];
password?: MessageType[];
}
const resolver = ({ values }: { values: Record<string, any> }) => {
const errors: FormErrors = {};
if (!values.username) { if (!values.username) {
errors.username = [{message: 'Username is required.'}]; errors.username = [{message: 'Username is required.'}];
} }
@ -46,9 +59,8 @@ const resolver = ({ values }) => {
errors.password = [{message: 'Password is required.'}]; errors.password = [{message: 'Password is required.'}];
} }
password.value = values.password; password.value = values.password;
return { errors } return { values, errors }
}; };
</script> </script>
<template> <template>

View file

@ -37,6 +37,10 @@ const second = computed(() => {
}) })
function claimSticker() { function claimSticker() {
if (!sticker.value) {
console.error("No sticker to set owner");
return;
}
stickersStore.setOwner(sticker.value, sessionStore.user as User); stickersStore.setOwner(sticker.value, sessionStore.user as User);
} }