Fix lock icon not being shown when locking account in profile settings (#14190)
This commit is contained in:
parent
35cedc922c
commit
4babf5b8b5
@ -207,10 +207,12 @@ function main() {
|
|||||||
delegate(document, '#account_locked', 'change', ({ target }) => {
|
delegate(document, '#account_locked', 'change', ({ target }) => {
|
||||||
const lock = document.querySelector('.card .display-name i');
|
const lock = document.querySelector('.card .display-name i');
|
||||||
|
|
||||||
|
if (lock) {
|
||||||
if (target.checked) {
|
if (target.checked) {
|
||||||
lock.style.display = 'inline';
|
delete lock.dataset.hidden;
|
||||||
} else {
|
} else {
|
||||||
lock.style.display = 'none';
|
lock.dataset.hidden = 'true';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -76,6 +76,10 @@
|
|||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
|
i[data-hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
strong {
|
strong {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: $primary-text-color;
|
color: $primary-text-color;
|
||||||
|
@ -13,4 +13,4 @@
|
|||||||
%strong.emojify.p-name= display_name(account, custom_emojify: true)
|
%strong.emojify.p-name= display_name(account, custom_emojify: true)
|
||||||
%span
|
%span
|
||||||
= acct(account)
|
= acct(account)
|
||||||
= fa_icon('lock') if account.locked?
|
= fa_icon('lock', { :data => ({hidden: true} unless account.locked?)})
|
||||||
|
Loading…
Reference in New Issue
Block a user