Fix app links icon upload
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user