From ea80f41e21f1593b5131246347efc20e54453920 Mon Sep 17 00:00:00 2001 From: Li Date: Tue, 13 Dec 2022 02:40:24 +0800 Subject: [PATCH] =?UTF-8?q?:ambulance:=20=E5=8D=87=E7=BA=A7=201.0.1=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=9B=A0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E4=B8=BA=E7=A9=BA=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=20NEP=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- gradle.properties | 2 +- src/main/java/run/halo/live2d/Live2dInitProcessor.java | 2 +- src/main/resources/plugin.yaml | 2 +- src/main/resources/static/js/live2d-autoload.js | 2 +- src/main/resources/static/js/live2d-autoload.min.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2d57f50..f6f33b3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

Halo version Build Status - Code Style: Prettier + Code Style: Prettier LICENSE MIT

diff --git a/gradle.properties b/gradle.properties index 8d0c7be..47a478a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=1.0.0-SNAPSHOT +version=1.0.1 diff --git a/src/main/java/run/halo/live2d/Live2dInitProcessor.java b/src/main/java/run/halo/live2d/Live2dInitProcessor.java index 37cf0e2..4707366 100644 --- a/src/main/java/run/halo/live2d/Live2dInitProcessor.java +++ b/src/main/java/run/halo/live2d/Live2dInitProcessor.java @@ -30,7 +30,7 @@ * * @author LIlGG * @since 2022-11-30 - * @version 1.0.0 + * @version 1.0.1 */ @Component @Slf4j diff --git a/src/main/resources/plugin.yaml b/src/main/resources/plugin.yaml index 177ecd6..f0ac446 100644 --- a/src/main/resources/plugin.yaml +++ b/src/main/resources/plugin.yaml @@ -4,7 +4,7 @@ metadata: name: PluginLive2d spec: enabled: true - version: 1.0.0 + version: 1.0.1 requires: ">=2.0.0" author: name: LIlGG diff --git a/src/main/resources/static/js/live2d-autoload.js b/src/main/resources/static/js/live2d-autoload.js index dbc9001..94692cd 100644 --- a/src/main/resources/static/js/live2d-autoload.js +++ b/src/main/resources/static/js/live2d-autoload.js @@ -22,7 +22,7 @@ function Live2d() { "apiPath": "//api.zsq.im/live2d/", "tools": ["hitokoto", "asteroids", "switch-model", "switch-texture", "photo", "info", "quit"], "updateTime": "2022.12.09", - "version": "1.0.0", + "version": "1.0.1", "tipsPath": "live2d-tips.json" } /** diff --git a/src/main/resources/static/js/live2d-autoload.min.js b/src/main/resources/static/js/live2d-autoload.min.js index dd29271..b2cbaa0 100644 --- a/src/main/resources/static/js/live2d-autoload.min.js +++ b/src/main/resources/static/js/live2d-autoload.min.js @@ -1,7 +1,7 @@ let live2d=new Live2d();function Live2d(){const util={} const message={} const tools={} - class Live2d{#path;#config;defaultConfig={"apiPath":"//api.zsq.im/live2d/","tools":["hitokoto","asteroids","switch-model","switch-texture","photo","info","quit"],"updateTime":"2022.12.09","version":"1.0.0","tipsPath":"live2d-tips.json"} + class Live2d{#path;#config;defaultConfig={"apiPath":"//api.zsq.im/live2d/","tools":["hitokoto","asteroids","switch-model","switch-texture","photo","info","quit"],"updateTime":"2022.12.09","version":"1.0.1","tipsPath":"live2d-tips.json"} init(path,config={}){if(screen.width>=768){Promise.all([util.loadExternalResource(path+"css/live2d.min.css","css"),util.loadExternalResource(path+"lib/live2d/live2d.min.js","js"),]).then(()=>{this.#path=path;this.defaultConfig.tipsPath=path+"live2d-tips.json" this.#config={...this.defaultConfig,...config};this.#doInit();})}} get path(){return this.#path}#doInit(){document.body.insertAdjacentHTML("beforeend",`
看板娘
`);const toggle=document.getElementById("live2d-toggle");toggle.addEventListener("click",()=>{toggle.classList.remove("live2d-toggle-active");if(toggle.getAttribute("first-time")){this.#loadWidget();toggle.removeAttribute("first-time");}else{localStorage.removeItem("live2d-display");document.getElementById("live2d-plugin").style.display="";setTimeout(()=>{document.getElementById("live2d-plugin").style.bottom=0;},0);}});if(localStorage.getItem("live2d-display")&&Date.now()-localStorage.getItem("live2d-display")<=86400000){toggle.setAttribute("first-time",true);setTimeout(()=>{toggle.classList.add("live2d-toggle-active");},0);}else{this.#loadWidget();}}#loadWidget(){localStorage.removeItem("live2d-display");sessionStorage.removeItem("live2d-text");document.body.insertAdjacentHTML("beforeend",`