core&ui: bug fix

This commit is contained in:
undefined committed 2021-09-25 21:47:05 +08:00
1 parent 42f41c4f61
commit e4c2f309c4
6 files changed
+9 -26

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.22.6",
"version": "4.22.7",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -69,8 +69,8 @@ async function initChart() {
}
const page = new NamedPage('user_detail', () => {
$('[name="profile_contact_copy"]').get().forEach((el) => {
const data = $(el).attr('data-content');
$('[data-copy]').get().forEach((el) => {
const data = $(el).attr('data-copy');
const decoded = base64.decode(data);
const clip = new Clipboard(el, { text: () => decoded });
clip.on('success', () => {
@@ -41,17 +41,17 @@
<span class="icon icon-comment--multiple"></span>
</a>
{% if udoc['mail'] %}
<a class="profile-header__contact-item" href="javascript:;" name="profile_contact_copy" data-content="{{ udoc['mail'] | base64_encode }}" data-tooltip="{{ _('Copy Email') }}">
<a class="profile-header__contact-item" href="javascript:;" data-copy="{{ udoc['mail'] | base64_encode }}" data-tooltip="{{ _('Copy Email') }}">
<span class="icon icon-mail"></span>
</a>
{% endif %}
{% if udoc['qq'] %}
<a class="profile-header__contact-item" href="javascript:;" name="profile_qq_copy" data-content="{{ udoc['qq'] | base64_encode }}" data-tooltip="{{ _('Copy QQ Number') }}">
<a class="profile-header__contact-item" href="javascript:;" data-copy="{{ udoc['qq'] | base64_encode }}" data-tooltip="{{ _('Copy QQ Number') }}">
<span class="icon icon-qq"></span>
</a>
{% endif %}
{% if udoc['wechat'] %}
<a class="profile-header__contact-item" href="javascript:;" name="profile_wechat_copy" data-content="{{ udoc['wechat'] | base64_encode }}" data-tooltip="{{ _('Copy WeChat Account') }}">
<a class="profile-header__contact-item" href="javascript:;" data-copy="{{ udoc['wechat'] | base64_encode }}" data-tooltip="{{ _('Copy WeChat Account') }}">
<span class="icon icon-wechat"></span>
</a>
{% endif %}