users: fix avatar handling and various translations

This commit is contained in:
Girish Ramakrishnan
2025-09-16 12:05:47 +02:00
parent 0530a58530
commit 405302e2f0
7 changed files with 106 additions and 54 deletions
+10 -1
View File
@@ -26,9 +26,15 @@ const internalSrc = ref('');
const isChanged = ref(false);
const busy = ref(false);
function reset() {
isChanged.value = false;
internalSrc.value = props.src;
}
defineExpose({ reset });
watchEffect(() => {
internalSrc.value = props.src;
isChanged.value = false;
});
function dataURLtoFile(dataURL, filename) {
@@ -147,6 +153,8 @@ function onChanged(event) {
internalSrc.value = canvas.toDataURL('image/png');
isChanged.value = true;
console.log('internalSrc is now some data url');
emit('changed', file);
};
@@ -180,6 +188,7 @@ function onError() {
<Button @click.stop="onUnset" tool small icon="fa fa-trash" :loading="busy" :disabled="busy" v-if="unsetHandler && internalSrc !== fallbackSrc"/>
</div>
</template>
<!-- Simple mode -->
<template v-else-if="mode === 'simple'">
<div class="image-picker-actions">
<Button @click.stop="onEdit" tool small icon="fa fa-pencil-alt" :disabled="busy"/>