gem 'goldfinger', '~> 2.1'
gem 'hiredis', '~> 0.6'
gem 'redis-namespace', '~> 1.5'
- gem 'health_check', '~> 3.0'
+ gem 'health_check', git: 'https://github.com/ianheggie/health_check', ref: '0b799ead604f900ed50685e9b2d469cd2befba5b'
+gem 'html2text'
gem 'htmlentities', '~> 4.3'
gem 'http', '~> 3.3'
gem 'http_accept_language', '~> 2.1'
link_header (~> 0.0, >= 0.0.8)
rdf-normalize (0.3.3)
rdf (>= 2.2, < 4.0)
- redis (4.1.2)
+ redcarpet (3.4.0)
+ redis (4.1.3)
redis-actionpack (5.0.2)
actionpack (>= 4.0, < 6)
redis-rack (>= 1, < 3)
fuubar (~> 2.4)
goldfinger (~> 2.1)
hamlit-rails (~> 0.2)
- health_check (~> 3.0)
+ health_check!
hiredis (~> 0.6)
+ html2text
htmlentities (~> 4.3)
http (~> 3.3)
http_accept_language (~> 2.1)
# frozen_string_literal: true
class AboutController < ApplicationController
+ before_action :set_pack
layout 'public'
- before_action :require_open_federation!, only: [:show, :more, :blocks]
- before_action :check_blocklist_enabled, only: [:blocks]
- before_action :authenticate_user!, only: [:blocks], if: :blocklist_account_required?
+ before_action :require_open_federation!, only: [:show, :more]
before_action :set_body_classes, only: :show
before_action :set_instance_presenter
before_action :set_expires_in, only: [:show, :more, :terms]
end
end
- helper_method :new_user
-
+ def set_pack
+ use_pack 'public'
+ end
+
def set_instance_presenter
@instance_presenter = InstancePresenter.new
end
skip_before_action :require_no_authentication, only: [:create]
skip_before_action :require_functional!
+ prepend_before_action :set_pack
+ prepend_before_action :authenticate_with_two_factor, if: :two_factor_enabled?, only: [:create]
before_action :set_instance_presenter, only: [:new]
before_action :set_body_classes
render :two_factor
end
- def authenticate_and_respond(user)
- sign_in(user)
- remember_me(user)
-
- respond_with user, location: after_sign_in_path_for(user)
- end
-
private
+ def set_pack
+ use_pack 'auth'
+ end
+
def set_instance_presenter
@instance_presenter = InstancePresenter.new
end
before_action :set_instance_presenter
before_action :set_tag, only: :show
before_action :set_accounts
+ before_action :set_pack
+ skip_before_action :require_functional!
+
def index
render :index
end
layout 'modal'
+ before_action :set_pack
before_action :set_body_classes
+ skip_before_action :require_functional!
+
def new
@remote_follow = RemoteFollow.new(session_params)
end
before_action :set_interaction_type
before_action :set_status
before_action :set_body_classes
+ before_action :set_pack
+ skip_before_action :require_functional!
+
def new
@remote_follow = RemoteFollow.new(session_params)
end
"navigation_bar.pins": "固定したトゥート",
"navigation_bar.preferences": "ユーザー設定",
"navigation_bar.public_timeline": "連合タイムライン",
+ "navigation_bar.misc": "その他",
"navigation_bar.security": "セキュリティ",
- "notification.and_n_others": "and {count, plural, one {# other} other {# others}}",
+ "notification.and_n_others": "と、他 {count} 件",
"notification.favourite": "{name}さんがあなたのトゥートをお気に入りに登録しました",
"notification.follow": "{name}さんにフォローされました",
"notification.mention": "{name}さんがあなたに返信しました",
delegate(document, '.custom-emoji', 'mouseover', getEmojiAnimationHandler('data-original'));
delegate(document, '.custom-emoji', 'mouseout', getEmojiAnimationHandler('data-static'));
- });
-
- delegate(document, '.webapp-btn', 'click', ({ target, button }) => {
- if (button !== 0) {
- return true;
- }
- window.location.href = target.href;
- return false;
- });
-
- delegate(document, '.status__content__spoiler-link', 'click', function() {
- const contentEl = this.parentNode.parentNode.querySelector('.e-content');
-
- if (contentEl.style.display === 'block') {
- contentEl.style.display = 'none';
- this.parentNode.style.marginBottom = 0;
- } else {
- contentEl.style.display = 'block';
- this.parentNode.style.marginBottom = null;
- }
-
- return false;
- });
-
- delegate(document, '.blocks-table button.icon-button', 'click', function(e) {
- e.preventDefault();
-
- const classList = this.firstElementChild.classList;
- classList.toggle('fa-chevron-down');
- classList.toggle('fa-chevron-up');
- this.parentElement.parentElement.nextElementSibling.classList.toggle('hidden');
- });
-
- 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 = document.querySelector('#default_account_display_name').textContent;
- }
- }
- });
-
- 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');
+ delegate(document, '.blocks-table button.icon-button', 'click', function(e) {
+ e.preventDefault();
- if (target.checked) {
- lock.style.display = 'inline';
- } else {
- lock.style.display = 'none';
- }
- });
-
- 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;
+ const classList = this.firstElementChild.classList;
+ classList.toggle('fa-chevron-down');
+ classList.toggle('fa-chevron-up');
+ this.parentElement.parentElement.nextElementSibling.classList.toggle('hidden');
+ });
});
+
+ 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';
+ }
+ });
}
loadPolyfills().then(main).catch(error => {
Favourite.select('status_id').where(status_id: status_ids).where(account_id: account_id).each_with_object({}) { |f, h| h[f.status_id] = true }
end
+ def bookmarks_map(status_ids, account_id)
+ Bookmark.select('status_id').where(status_id: status_ids).where(account_id: account_id).map { |f| [f.status_id, true] }.to_h
+ end
+
def reblogs_map(status_ids, account_id)
- select('reblog_of_id').where(reblog_of_id: status_ids).where(account_id: account_id).reorder(nil).each_with_object({}) { |s, h| h[s.reblog_of_id] = true }
+ unscoped.select('reblog_of_id').where(reblog_of_id: status_ids).where(account_id: account_id).each_with_object({}) { |s, h| h[s.reblog_of_id] = true }
end
def mutes_map(conversation_ids, account_id)
attribute :end_time, if: :poll_and_expires?
attribute :closed, if: :poll_and_expired?
+ attribute :voters_count, if: :poll_and_voters_count?
+
def id
+ raise Mastodon::NotPermittedError, 'Local-only statuses should not be serialized' if object.local_only? && !instance_options[:allow_local_only]
ActivityPub::TagManager.instance.uri_for(object)
end
= site_hostname
- content_for :header_tags do
- = javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
= render partial: 'shared/og'
- .grid-3
+ .grid-4
.column-0
.public-account-header.public-account-header--no-bar
.public-account-header__image
all: すべて
changes_saved_msg: 正常に変更されました!
copy: コピー
+ no_batch_actions_available: 利用可能なバッチアクションはありません
order_by: 並び順
save_changes: 変更を保存
+ use_this: これを使う
validation_errors:
other: エラーが発生しました! 以下の%{count}個のエラーを確認してください
html_validator:
end
end
+ resources :flavours, only: [:index, :show, :update], param: :flavour
+
resource :delete, only: [:show, :destroy]
- resource :migration, only: [:show, :update]
+ resource :migration, only: [:show, :create]
+
+ namespace :migration do
+ resource :redirect, only: [:new, :create, :destroy]
+ end
+ resources :aliases, only: [:index, :create, :destroy]
resources :sessions, only: [:destroy]
resources :featured_tags, only: [:index, :create, :destroy]
end