]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorThibaut Girka <thib@sitedethib.com>
Wed, 1 Jul 2020 17:23:14 +0000 (19:23 +0200)
committerThibaut Girka <thib@sitedethib.com>
Wed, 1 Jul 2020 17:23:14 +0000 (19:23 +0200)
Conflicts:
- `app/javascript/packs/public.js`:
  Conflict because part of that file has been split to
  `app/javascript/core/settings.js`. Ported those changes
  there.

1  2 
Gemfile.lock
app/javascript/core/settings.js
app/javascript/mastodon/locales/defaultMessages.json
app/javascript/mastodon/locales/en.json
app/javascript/styles/mastodon/components.scss
app/lib/feed_manager.rb
config/i18n-tasks.yml

diff --cc Gemfile.lock
Simple merge
index 9fe03f90c2c37a957ed3ffa7e70f53fb7b04a0c8,0000000000000000000000000000000000000000..9403e339b47eb77e8d769c2c4a3374a3229261fd
mode 100644,000000..100644
--- /dev/null
@@@ -1,74 -1,0 +1,76 @@@
-   if (target.checked) {
-     lock.style.display = 'inline';
-   } else {
-     lock.style.display = 'none';
 +//  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) {
 +    if (target.value) {
 +      name.innerHTML = emojify(escapeTextContentForBrowser(target.value));
 +    } else {
 +      name.textContent = name.textContent = target.dataset.default;
 +    }
 +  }
 +});
 +
 +delegate(document, '#account_avatar', 'change', ({ target }) => {
 +  const avatar = document.querySelector('.card .avatar img');
 +  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');
 +
++  if (lock) {
++    if (target.checked) {
++      delete lock.dataset.hidden;
++    } else {
++      lock.dataset.hidden = 'true';
++    }
 +  }
 +});
 +
 +delegate(document, '.input-copy input', 'click', ({ target }) => {
 +  target.focus();
 +  target.select();
 +  target.setSelectionRange(0, target.value.length);
 +});
 +
 +delegate(document, '.input-copy button', 'click', ({ target }) => {
 +  const input = target.parentNode.querySelector('.input-copy__wrapper input');
 +
 +  const oldReadOnly = input.readonly;
 +
 +  input.readonly = false;
 +  input.focus();
 +  input.select();
 +  input.setSelectionRange(0, input.value.length);
 +
 +  try {
 +    if (document.execCommand('copy')) {
 +      input.blur();
 +      target.parentNode.classList.add('copied');
 +
 +    setTimeout(() => {
 +        target.parentNode.classList.remove('copied');
 +      }, 700);
 +    }
 +  } catch (err) {
 +    console.error(err);
 +  }
 +
 +  input.readonly = oldReadOnly;
 +});
Simple merge
index 1e223fbdeeed56a50ab8bc297e722d6c814b1b95,2dc6f880bfc3f30e263ba5158c087925cc0e1897..e09f4262b3825a38d51f4712074edbe4491ff1fb
@@@ -59,8 -59,8 +59,9 @@@ ignore_unused
    - 'errors.429'
    - 'admin.accounts.roles.*'
    - 'admin.action_logs.actions.*'
 +  - 'themes.*'
    - 'statuses.attached.*'
+   - 'move_handler.carry_{mutes,blocks}_over_text'
  
  ignore_inconsistent_interpolations:
    - '*.one'