Merge commit '1cdcd9dc08c91321f80ffe4822f6a3da15abeb2c' into glitch-soc/merge-upstream

Conflicts:
- `app/javascript/packs/public.jsx`:
  Upstream updated code that we actually moved to `app/javascript/core/settings.js`.
  Applied the changes there.
This commit is contained in:
Claire
2023-08-24 21:01:19 +02:00
8 changed files with 369 additions and 198 deletions

View File

@ -18,22 +18,14 @@ delegate(document, '#account_display_name', 'input', ({ target }) => {
}
});
delegate(document, '#account_avatar', 'change', ({ target }) => {
const avatar = document.querySelector('.card .avatar img');
delegate(document, '#edit_profile input[type=file]', 'change', ({ target }) => {
const avatar = document.getElementById(target.id + '-preview');
const [file] = target.files || [];
const url = file ? URL.createObjectURL(file) : avatar.dataset.originalSrc;
avatar.src = url;
});
delegate(document, '#account_header', 'change', ({ target }) => {
const header = document.querySelector('.card .card__img img');
const [file] = target.files || [];
const url = file ? URL.createObjectURL(file) : header.dataset.originalSrc;
header.src = url;
});
delegate(document, '#account_locked', 'change', ({ target }) => {
const lock = document.querySelector('.card .display-name i');