Fix app links icon upload

This commit is contained in:
Girish Ramakrishnan
2025-09-11 16:34:10 +02:00
parent 23012fbb5c
commit f8015c156e
4 changed files with 37 additions and 48 deletions
+1 -16
View File
@@ -5,6 +5,7 @@ import { FormGroup, TextInput, Button, TagInput } from '@cloudron/pankow';
import ImagePicker from '../ImagePicker.vue';
import AppsModel from '../../models/AppsModel.js';
import { API_ORIGIN } from '../../constants.js';
import { getDataURLFromFile } from '../../utils.js';
const props = defineProps([ 'app' ]);
@@ -19,22 +20,6 @@ const label = ref('');
const tags = ref([]);
const iconUrl = ref('');
function getDataURLFromFile(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onload = function(event) {
resolve(event.target.result);
};
reader.onerror = function(event) {
reject(event.target.error);
};
reader.readAsDataURL(file);
});
}
const haveValuesChanged = computed(() => {
return (label.value !== props.app.label) || tags.value.join() !== props.app.tags.join();
});