]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'main' into glitch-soc/merge-upstream
authorClaire <claire.github-309c@sitedethib.com>
Thu, 17 Feb 2022 09:58:25 +0000 (10:58 +0100)
committerClaire <claire.github-309c@sitedethib.com>
Thu, 17 Feb 2022 09:58:44 +0000 (10:58 +0100)
Conflicts:
- `db/schema.rb`:
  Conflict due to glitch-soc adding the `content_type` column on status edits
  and thus having a different schema version number.
  Solved by taking upstream's schema version number, as it is higher than
  glitch-soc's.

20 files changed:
1  2 
.github/workflows/build-image.yml
Gemfile
Gemfile.lock
Vagrantfile
app/controllers/auth/registrations_controller.rb
app/javascript/packs/public.js
app/javascript/styles/mastodon/admin.scss
app/lib/feed_manager.rb
app/models/account.rb
app/models/user.rb
app/views/admin/dashboard/index.html.haml
app/views/admin/reports/show.html.haml
app/views/layouts/public.html.haml
config/navigation.rb
config/routes.rb
config/settings.yml
db/schema.rb
package.json
streaming/index.js
yarn.lock

index 5b7f2481eae9503a34a71709dc1f245b5b85446b,92a164c40e1c567ac133e96f66a7cc7711da0734..2d1df72112bac1591f08ce9b040f2405cff40e29
@@@ -31,7 -34,7 +35,7 @@@ jobs
          with:
            context: .
            platforms: linux/amd64,linux/arm64
-           push: true
+           push: ${{ github.event_name != 'pull_request' }}
            tags: ${{ steps.meta.outputs.tags }}
 -          cache-from: type=registry,ref=tootsuite/mastodon:latest
 +          cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/mastodon:latest
            cache-to: type=inline
diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
Simple merge
diff --cc Vagrantfile
Simple merge
index 6b1f3fa822a975b42a1f031d72ab4008e640d950,3b025838b06ad27b7188fc17855cc0303daae9ea..5d32fe66e2ab03344f346b53f90e882ce66c2ce7
@@@ -8,8 -8,8 +8,9 @@@ class Auth::RegistrationsController < D
    before_action :set_invite, only: [:new, :create]
    before_action :check_enabled_registrations, only: [:new, :create]
    before_action :configure_sign_up_params, only: [:create]
 +  before_action :set_pack
    before_action :set_sessions, only: [:edit, :update]
+   before_action :set_strikes, only: [:edit, :update]
    before_action :set_instance_presenter, only: [:new, :create, :update]
    before_action :set_body_classes, only: [:new, :create, :edit, :update]
    before_action :require_not_suspended!, only: [:update]
index 7ebe8b4d0c6d635bb97afcdfd38733d8405b98af,3d0a937e1f80742c66775dda37b84d1b49c0aa1d..be467a8e25c6dd99d95c5911b9d626d6569ec7e2
@@@ -150,14 -167,116 +150,8 @@@ function main() 
      });
    });
  
 -  delegate(document, '.webapp-btn', 'click', ({ target, button }) => {
 -    if (button !== 0) {
 -      return true;
 -    }
 -    window.location.href = target.href;
 -    return false;
 -  });
 -
 -  delegate(document, '.modal-button', 'click', e => {
 -    e.preventDefault();
 -
 -    let href;
 -
 -    if (e.target.nodeName !== 'A') {
 -      href = e.target.parentNode.href;
 -    } else {
 -      href = e.target.href;
 -    }
 -
 -    window.open(href, 'mastodon-intent', 'width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes');
 -  });
 -
 -  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 = 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;
 -  });
 -
 -  const getProfileAvatarAnimationHandler = (swapTo) => {
 -    //animate avatar gifs on the profile page when moused over
 -    return ({ target }) => {
 -      const swapSrc = target.getAttribute(swapTo);
 -      //only change the img source if autoplay is off and the image src is actually different
 -      if(target.getAttribute('data-autoplay') !== 'true' && target.src !== swapSrc) {
 -        target.src = swapSrc;
 -      }
 -    };
 -  };
 -
 -  delegate(document, 'img#profile_page_avatar', 'mouseover', getProfileAvatarAnimationHandler('data-original'));
 -
 -  delegate(document, 'img#profile_page_avatar', 'mouseout', getProfileAvatarAnimationHandler('data-static'));
 -
 -  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;
 -  });
 -
    delegate(document, '.sidebar__toggle__icon', 'click', () => {
-     const target = document.querySelector('.sidebar ul');
-     if (target.style.display === 'block') {
-       target.style.display = 'none';
-     } else {
-       target.style.display = 'block';
-     }
+     document.querySelector('.sidebar ul').classList.toggle('visible');
    });
  
    // Empty the honeypot fields in JS in case something like an extension
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc db/schema.rb
Simple merge
diff --cc package.json
index 4f876816fc0864ea947773bdfeabe25f15d86447,387fc4bb662f06c58b8b1b06487f428c3e44ca66..77328c4c1a0f6e339a30b48a023f7bb3230c328d
      "@github/webauthn-json": "^0.5.7",
      "@rails/ujs": "^6.1.4",
      "array-includes": "^3.1.4",
 +    "atrament": "0.2.4",
      "arrow-key-navigation": "^1.2.0",
      "autoprefixer": "^9.8.8",
-     "axios": "^0.25.0",
+     "axios": "^0.26.0",
      "babel-loader": "^8.2.3",
      "babel-plugin-lodash": "^3.3.4",
      "babel-plugin-preval": "^5.1.0",
Simple merge
diff --cc yarn.lock
Simple merge