vk fixes and new changelog system

This commit is contained in:
wukko
2022-09-11 21:04:06 +06:00
parent fbb2f2d200
commit c6d1761b11
18 changed files with 179 additions and 45 deletions

View File

@@ -0,0 +1,24 @@
import { replaceBase } from "../../localization/manager.js";
import loadJSON from "../sub/loadJSON.js";
let changelog = loadJSON('./src/modules/changelog/changelog.json')
export default function(string) {
try {
switch (string) {
case "title":
return replaceBase(changelog["current"]["title"]);
case "content":
return replaceBase(changelog["current"]["content"]);
case "history":
return changelog["history"].map((i) => {
return {
title: replaceBase(i["title"]),
content: replaceBase(i["content"])
}
});
}
} catch (e) {
return `!!CHANGELOG_${string}!!`
}
}