users: fix avatar handling and various translations
This commit is contained in:
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user