Skip to content

Commit

Permalink
Merge pull request #156 from HereIsYui/master
Browse files Browse the repository at this point in the history
新增部分功能
  • Loading branch information
adlered authored Nov 21, 2024
2 parents f88494c + 4459c03 commit 9216be9
Show file tree
Hide file tree
Showing 8 changed files with 192 additions and 136 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/css/base.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/css/mobile-base.css

Large diffs are not rendered by default.

283 changes: 149 additions & 134 deletions src/main/resources/js/chat-room.js

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions src/main/resources/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,24 @@ var Settings = {
},
});
},
/**
* 加载扫码登录APP功能
*/
initApiCode: function(){
$.ajax({
url: Label.servePath + '/getApiKeyInWeb',
type: 'GET',
cache: false,
success: function (result) {
if (result.apiKey !== "") {
$("#apiCode").append("<label><svg><use xlink:href=\"#safe\"></use></svg> 请使用官方APP扫码以登录APP </label><br><br><br>");
$("#apiCode").append("<p>为了保护账号安全,请勿将本二维码以任何方式分享给他人,请勿在任何地点分享此二维码内容</p>");
$("#apiCode").append("<br>");
$("#apiCode").append("<img src='https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=login:" + result.apiKey + "'/>");
}
},
});
},
/**
* 初始化背包
*/
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2259,6 +2259,12 @@ a[class*=" icon-"]:hover {
}
}

/* color userName */
.ft-admin-user {
color: red;
font-weight: bold;
}

/*@keyframes swim {
0% {
transform: translate(0,0) rotateY(0deg);
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/scss/mobile-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3535,4 +3535,10 @@ only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-de
.file__items .item__info .red {
margin-top: 8px;
width: 100%
}

/* color userName */
.ft-admin-user {
color: red;
font-weight: bold;
}
10 changes: 10 additions & 0 deletions src/main/resources/skins/classic/home/settings/account.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@
</div>
</div>

<div class="module">
<div class="module-header">
<h2>APP扫码登录</h2>
</div>
<div class="module-panel form fn-clear">
<div id="apiCode">
</div>
</div>
</div>

<div class="module">
<div class="module-header">
<h2>${userNameLabel} ${updateNameTipLabel}</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<#if 'account' == type>Settings.initBag(${sysBag});</#if>
<#if 'account' == type>Settings.initMetal(${sysMetal});</#if>
<#if 'account' == type>Settings.initMFA();</#if>
<#if 'account' == type>Settings.initApiCode();</#if>
</script>
</body>
</html>
Expand Down

0 comments on commit 9216be9

Please sign in to comment.