no more piss

This commit is contained in:
Henry Jameson 2024-12-30 03:18:45 +02:00
parent 34f2a30688
commit 5bb9ceaf94
5 changed files with 8 additions and 8 deletions

View file

@ -43,7 +43,7 @@ const AppearanceTab = {
bundledPalettes: [],
compilationCache: {},
fileImporter: newImporter({
accept: '.json, .piss',
accept: '.json, .iss',
validator: this.importValidator,
onImport: this.onImport,
parser: this.importParser,
@ -305,14 +305,14 @@ const AppearanceTab = {
importParser (file, filename) {
if (filename.endsWith('.json')) {
return JSON.parse(file)
} else if (filename.endsWith('.piss')) {
} else if (filename.endsWith('.iss')) {
return deserialize(file)
}
},
onImport (parsed, filename) {
if (filename.endsWith('.json')) {
this.$store.dispatch('setThemeCustom', parsed.source || parsed.theme)
} else if (filename.endsWith('.piss')) {
} else if (filename.endsWith('.iss')) {
this.$store.dispatch('setStyleCustom', parsed)
}
},
@ -324,7 +324,7 @@ const AppearanceTab = {
if (filename.endsWith('.json')) {
const version = parsed._pleroma_theme_version
return version >= 1 || version <= 2
} else if (filename.endsWith('.piss')) {
} else if (filename.endsWith('.iss')) {
if (!Array.isArray(parsed)) return false
if (parsed.length < 1) return false
if (parsed.find(x => x.component === '@meta') == null) return false

View file

@ -604,7 +604,7 @@ export default {
const styleExporter = newExporter({
filename: () => exports.name.value ?? 'pleroma_theme',
mime: 'text/plain',
extension: 'piss',
extension: 'iss',
getExportedObject: () => exportStyleData.value
})
@ -636,7 +636,7 @@ export default {
}
const styleImporter = newImporter({
accept: '.piss',
accept: '.iss',
parser (string) { return deserialize(string) },
onImportFailure (result) {
console.error('Failure importing style:', result)

View file

@ -1,4 +1,4 @@
{
"RedmondDX": "/static/styles/Redmond DX.piss",
"BreezyDX": "/static/styles/Breezy DX.piss"
"RedmondDX": "/static/styles/Redmond DX.iss",
"BreezyDX": "/static/styles/Breezy DX.iss"
}