logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/
commit: 7e684ea3ff67803e4dd419f9db561fc52fd9893f
parent 0f2bd39db8feb317f9b9295597bad6566661ad79
Author: Henry Jameson <me@hjkos.com>
Date:   Sun,  6 Oct 2024 03:32:08 +0300

proper exporter

Diffstat:

Msrc/components/settings_modal/tabs/style_tab/style_tab.js23++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/components/settings_modal/tabs/style_tab/style_tab.js b/src/components/settings_modal/tabs/style_tab/style_tab.js @@ -17,12 +17,16 @@ import ContrastRatio from 'src/components/contrast_ratio/contrast_ratio.vue' import { init } from 'src/services/theme_data/theme_data_3.service.js' import { getCssRules } from 'src/services/theme_data/css_utils.js' import { serialize } from 'src/services/theme_data/iss_serializer.js' -import { deserialize } from 'src/services/theme_data/iss_deserializer.js' +// import { deserialize } from 'src/services/theme_data/iss_deserializer.js' import { // rgb2hex, hex2rgb, getContrastRatio } from 'src/services/color_convert/color_convert.js' +import { + // newImporter, + newExporter +} from 'src/services/export_import/export_import.js' import { library } from '@fortawesome/fontawesome-svg-core' import { faFloppyDisk, faFolderOpen, faFile } from '@fortawesome/free-solid-svg-icons' @@ -492,18 +496,19 @@ export default { isShadowTabOpen.value = tab === 'shadow' } - const exportStyle = () => { - console.log('ORIG', toValue(editorFriendlyToOriginal.value)) - console.log('SERI', serialize(editorFriendlyToOriginal.value)) - - const result = [ + const styleExporter = newExporter({ + filename: 'pleroma.palette.json', + getExportedObject: () => exportStyleData + }) + const exportStyleData = computed(() => { + return [ metaOut.value, palettesOut.value, serialize(editorFriendlyToOriginal.value) ].join('\n\n') - - console.log('RESULT', result) - console.log('DESERI', deserialize(result)) + }) + const exportStyle = () => { + styleExporter.exportData() } return {