mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-15 06:09:58 +08:00
Add button to clear selected textures in closet
This commit is contained in:
parent
4c54a391be
commit
62af291091
@ -1,4 +1,4 @@
|
||||
/* global initSkinViewer, applySkinViewerConfig */
|
||||
/* global initSkinViewer, applySkinViewerConfig, defaultSteveSkin */
|
||||
|
||||
'use strict';
|
||||
|
||||
@ -59,6 +59,18 @@ $('body').on('click', '.category-switch', () => {
|
||||
reloadCloset(category, page, search);
|
||||
});
|
||||
|
||||
$('#closet-reset').click(() => {
|
||||
const $indicator = $('#textures-indicator');
|
||||
$indicator.text('');
|
||||
$indicator.removeData('skin');
|
||||
$indicator.removeData('cape');
|
||||
|
||||
$.msp.config.skinUrl = defaultSteveSkin;
|
||||
$.msp.config.capeUrl = '';
|
||||
$.msp.config.slim = false;
|
||||
initSkinViewer();
|
||||
});
|
||||
|
||||
async function initCloset() {
|
||||
if ($('#closet-container').length !== 1)
|
||||
return;
|
||||
|
@ -38,6 +38,7 @@ closet:
|
||||
|
||||
use-as:
|
||||
button: Apply...
|
||||
reset: Clear selected
|
||||
title: Which player should be applied to?
|
||||
empty: It seems that you own no player...
|
||||
add: Add new player
|
||||
|
@ -45,6 +45,7 @@ closet:
|
||||
|
||||
use-as:
|
||||
button: 使用...
|
||||
reset: 重置已选材质
|
||||
title: 要给哪个角色使用呢?
|
||||
empty: 你好像还没有添加任何角色哦
|
||||
add: 添加角色
|
||||
|
@ -57,6 +57,7 @@
|
||||
|
||||
<div class="box-footer">
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#modal-use-as">{{ trans('user.closet.use-as.button') }}</button>
|
||||
<button class="btn btn-default pull-right" id="closet-reset">{{ trans('user.closet.use-as.reset') }}</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user