mirror of
https://github.com/amehime/hexo-theme-shoka.git
synced 2026-04-05 02:16:56 +08:00
update
This commit is contained in:
@@ -85,6 +85,7 @@ Hexo5可以在根目录新建一个yml文件,命名为`_config.shoka.yml`。
|
||||
💡 增加语言包:`繁体中文`和`日语`
|
||||
💡 quiz功能优化,根据语言显示题型标签
|
||||
🔧 修复评论功能中反复初始化leancloud-storage
|
||||
🔧 修复`audio: false`时不能隐藏播放按钮、停止播放
|
||||
|
||||
## 0.2 👉 0.2.1
|
||||
⚠️ 配置文件添加 `loader` 参数,[配置戳此](config/#加载动画)
|
||||
|
||||
@@ -252,19 +252,21 @@ const mediaPlayer = function(config) {
|
||||
var that = this;
|
||||
callback = callback || function() {}
|
||||
if(!this.loaded) {
|
||||
utils.fetch(this.options.rawList).then(function(list) {
|
||||
that.playlist = list;
|
||||
create.list();
|
||||
that.setMode(t.media.options.mode);
|
||||
that.loaded = true;
|
||||
callback();
|
||||
});
|
||||
if(this.options.rawList)
|
||||
utils.fetch(this.options.rawList).then(function(list) {
|
||||
that.playlist = list;
|
||||
create.list();
|
||||
that.setMode(t.media.options.mode);
|
||||
that.loaded = true;
|
||||
callback();
|
||||
});
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
load: function(newList) {
|
||||
if(newList) {
|
||||
var d = "block"
|
||||
if(newList && newList.length > 0) {
|
||||
if(this.options.rawList !== newList) {
|
||||
this.options.rawList = newList;
|
||||
if(this.loaded) {
|
||||
@@ -272,6 +274,12 @@ const mediaPlayer = function(config) {
|
||||
this.fetch();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
d = "none"
|
||||
this.pause()
|
||||
}
|
||||
for(var el in this.buttons) {
|
||||
this.buttons[el].display(d)
|
||||
}
|
||||
},
|
||||
// 根据模式切换当前曲目pointer
|
||||
|
||||
Reference in New Issue
Block a user