Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - app/javascript/packs/public.js - app/models/user.rb - config/settings.yml - db/schema.rb Moved public.js changes to settings.js.
This commit is contained in:
commit
e7f1bfdc2d
47 changed files with 751 additions and 43 deletions
|
@ -1,13 +1,17 @@
|
|||
// This file will be loaded on settings pages, regardless of theme.
|
||||
|
||||
import escapeTextContentForBrowser from 'escape-html';
|
||||
const { delegate } = require('rails-ujs');
|
||||
import emojify from '../mastodon/features/emoji/emoji';
|
||||
|
||||
delegate(document, '#account_display_name', 'input', ({ target }) => {
|
||||
const name = document.querySelector('.card .display-name strong');
|
||||
|
||||
if (name) {
|
||||
name.innerHTML = emojify(target.value);
|
||||
if (target.value) {
|
||||
name.innerHTML = emojify(escapeTextContentForBrowser(target.value));
|
||||
} else {
|
||||
name.textContent = document.querySelector('#default_account_display_name').textContent;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue