palette importer/exporter
This commit is contained in:
parent
202d77e0cc
commit
0afe69ce28
|
@ -28,7 +28,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import ColorInput from 'src/components/color_input/color_input.vue'
|
import ColorInput from 'src/components/color_input/color_input.vue'
|
||||||
import {
|
import {
|
||||||
// newImporter,
|
newImporter,
|
||||||
newExporter
|
newExporter
|
||||||
} from 'src/services/export_import/export_import.js'
|
} from 'src/services/export_import/export_import.js'
|
||||||
|
|
||||||
|
@ -46,23 +46,23 @@ library.add(
|
||||||
const props = defineProps(['modelValue'])
|
const props = defineProps(['modelValue'])
|
||||||
const emit = defineEmits(['update:modelValue'])
|
const emit = defineEmits(['update:modelValue'])
|
||||||
const paletteExporter = newExporter({
|
const paletteExporter = newExporter({
|
||||||
filename: 'pleroma.palette.json',
|
filename: 'pleroma',
|
||||||
|
extension: 'palette.json',
|
||||||
getExportedObject: () => props.modelValue
|
getExportedObject: () => props.modelValue
|
||||||
})
|
})
|
||||||
/*
|
const paletteImporter = newImporter({
|
||||||
const themeImporter = newImporter({
|
accept: '.palette.json',
|
||||||
validator: importValidator,
|
onImport (parsed, filename) {
|
||||||
onImport,
|
emit('update:modelValue', parsed)
|
||||||
onImportFailure,
|
}
|
||||||
})
|
})
|
||||||
*/
|
|
||||||
|
|
||||||
const exportPalette = () => {
|
const exportPalette = () => {
|
||||||
paletteExporter.exportData()
|
paletteExporter.exportData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const importPalette = () => {
|
const importPalette = () => {
|
||||||
// TODO
|
paletteImporter.importData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const paletteKeys = [
|
const paletteKeys = [
|
||||||
|
|
Loading…
Reference in a new issue