mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: add more categories to explore page
This commit is contained in:
parent
f17d61c268
commit
2e0b18d217
8 changed files with 546 additions and 4502 deletions
|
|
@ -1,4 +1,12 @@
|
|||
import pack from "../../package.json";
|
||||
import initLocalStorage from "@/store/initLocalStorage.js";
|
||||
|
||||
// function exampleFunction() {
|
||||
// console.log("update to vx.x.x");
|
||||
// // 0.2.0 to 0.2.1
|
||||
// localStorage.setItem("appVersion", "x.x.x");
|
||||
// window.location.reload();
|
||||
// }
|
||||
|
||||
function updateTo_0_2_0() {
|
||||
// 0.1 to 0.2.0
|
||||
|
|
@ -18,11 +26,25 @@ function updateTo_0_2_0() {
|
|||
window.location.reload();
|
||||
}
|
||||
|
||||
function updateTo_0_2_1() {
|
||||
console.log("update to v0.2.1");
|
||||
// 0.2.0 to 0.2.1
|
||||
// 初始化 playlistCategories
|
||||
let settings = JSON.parse(localStorage.getItem("settings"));
|
||||
settings.playlistCategories = initLocalStorage.settings.playlistCategories;
|
||||
localStorage.setItem("settings", JSON.stringify(settings));
|
||||
localStorage.setItem("appVersion", "0.2.1");
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
export default function () {
|
||||
while (localStorage.getItem("appVersion") !== pack.version) {
|
||||
let currentVersion = localStorage.getItem("appVersion");
|
||||
if (currentVersion === "0.1") {
|
||||
updateTo_0_2_0();
|
||||
}
|
||||
if (currentVersion === "0.2.0") {
|
||||
updateTo_0_2_1();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue