独自機能の追加などで他の部分への影響が分かるようにCI周りの修正 (#1)
* Fix EmojiFormatter failure * Add notification_emails.warning setting default value * Fix list spec failure and add antennas for spec response * Fix domain block spec failure to add kb custom response * Fix SearchQueryTransformer spec failure * Fix Account#matches_display_name spec failure * Fix UpdateStatusService changes mentions spec failure * Fix RuboCop Lint * Ignore brakeman warning * Fix CI failure for ignore brakeman warning * Fix migration failure * Fix README * Fix migration CI failure * Fix some spec failure * Format code for RuboCop lint failure * Fix ESlint failure * Fix haml-lint failure
This commit is contained in:
parent
b5949f8e48
commit
696e4a10d6
45 changed files with 347 additions and 113 deletions
|
@ -1,4 +1,5 @@
|
|||
import api from '../api';
|
||||
|
||||
import { importFetchedAccounts } from './importer';
|
||||
|
||||
export const ANTENNAS_FETCH_REQUEST = 'ANTENNAS_FETCH_REQUEST';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import api, { getLinks } from '../api';
|
||||
|
||||
import { importFetchedStatuses } from './importer';
|
||||
|
||||
export const EMOJI_REACTED_STATUSES_FETCH_REQUEST = 'EMOJI_REACTED_STATUSES_FETCH_REQUEST';
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { PureComponent } from 'react';
|
||||
|
||||
import emojify from '../features/emoji/emoji';
|
||||
|
||||
export default class EmojiView extends PureComponent {
|
||||
|
|
|
@ -33,7 +33,11 @@ export const ShortNumberRenderer: React.FC<ShortNumberProps> = ({
|
|||
|
||||
const customRenderer = children ?? renderer ?? null;
|
||||
|
||||
const displayNumber = !isHide ? <ShortNumberCounter value={shortNumber} /> : <span>-</span>;
|
||||
const displayNumber = !isHide ? (
|
||||
<ShortNumberCounter value={shortNumber} />
|
||||
) : (
|
||||
<span>-</span>
|
||||
);
|
||||
|
||||
return (
|
||||
customRenderer?.(displayNumber, pluralReady(value, division)) ??
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
import { PureComponent } from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import PropTypes from 'prop-types';
|
||||
import { PureComponent } from 'react';
|
||||
|
||||
import { injectIntl } from 'react-intl';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
||||
import EmojiView from './emoji_view';
|
||||
|
||||
class EmojiReactionButton extends PureComponent {
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { makeGetAccount } from '../../../selectors';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { injectIntl } from 'react-intl';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { Avatar } from '../../../components/avatar';
|
||||
import { DisplayName } from '../../../components/display_name';
|
||||
import { injectIntl } from 'react-intl';
|
||||
import { makeGetAccount } from '../../../selectors';
|
||||
|
||||
const makeMapStateToProps = () => {
|
||||
const getAccount = makeGetAccount();
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { IconButton } from '../../../components/icon_button';
|
||||
|
||||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
import { removeFromAntennaAdder, addToAntennaAdder } from '../../../actions/antennas';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { Icon } from 'mastodon/components/icon';
|
||||
|
||||
import { removeFromAntennaAdder, addToAntennaAdder } from '../../../actions/antennas';
|
||||
import { IconButton } from '../../../components/icon_button';
|
||||
|
||||
const messages = defineMessages({
|
||||
remove: { id: 'lists.account.remove', defaultMessage: 'Remove from list' },
|
||||
add: { id: 'lists.account.add', defaultMessage: 'Add to list' },
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { connect } from 'react-redux';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
|
||||
import { injectIntl } from 'react-intl';
|
||||
import { setupAntennaAdder, resetAntennaAdder } from '../../actions/antennas';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import Antenna from './components/antenna';
|
||||
|
||||
import { setupAntennaAdder, resetAntennaAdder } from '../../actions/antennas';
|
||||
|
||||
import Account from './components/account';
|
||||
import Antenna from './components/antenna';
|
||||
// hack
|
||||
|
||||
const getOrderedAntennas = createSelector([state => state.get('antennas')], antennas => {
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import { connect } from 'react-redux';
|
||||
import TextIconButton from '../components/text_icon_button';
|
||||
import { changeComposeMarkdown } from '../../../actions/compose';
|
||||
import { injectIntl, defineMessages } from 'react-intl';
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { changeComposeMarkdown } from '../../../actions/compose';
|
||||
import TextIconButton from '../components/text_icon_button';
|
||||
|
||||
const messages = defineMessages({
|
||||
marked: { id: 'compose_form.markdown.marked', defaultMessage: 'Markdown is enabled' },
|
||||
unmarked: { id: 'compose_form.markdown.unmarked', defaultMessage: 'Markdown is disabled' },
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
import { debounce } from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { debounce } from 'lodash';
|
||||
|
||||
import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns';
|
||||
import { fetchEmojiReactedStatuses, expandEmojiReactedStatuses } from 'mastodon/actions/emoji_reactions';
|
||||
import ColumnHeader from 'mastodon/components/column_header';
|
||||
|
|
|
@ -446,7 +446,6 @@ class Notification extends ImmutablePureComponent {
|
|||
|
||||
renderWarning (notification) {
|
||||
const { intl, unread } = this.props;
|
||||
console.dir(notification);
|
||||
|
||||
return (
|
||||
<HotKeys handlers={this.getHandlers()}>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
|
||||
import {
|
||||
ANTENNA_ADDER_RESET,
|
||||
ANTENNA_ADDER_SETUP,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
|
||||
import {
|
||||
ANTENNA_ACCOUNTS_FETCH_REQUEST,
|
||||
ANTENNA_ACCOUNTS_FETCH_SUCCESS,
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { Map as ImmutableMap, fromJS } from 'immutable';
|
||||
|
||||
import {
|
||||
ANTENNAS_FETCH_SUCCESS,
|
||||
} from '../actions/antennas';
|
||||
import { Map as ImmutableMap, fromJS } from 'immutable';
|
||||
|
||||
const initialState = ImmutableMap();
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class CustomEmoji < ApplicationRecord
|
|||
|
||||
belongs_to :category, class_name: 'CustomEmojiCategory', optional: true
|
||||
has_one :local_counterpart, -> { where(domain: nil) }, class_name: 'CustomEmoji', primary_key: :shortcode, foreign_key: :shortcode, inverse_of: false
|
||||
has_many :emoji_reactions, inverse_of: :custom_emoji, dependent: :destroy
|
||||
has_many :emoji_reactions, inverse_of: :custom_emoji
|
||||
|
||||
has_attached_file :image, styles: { static: { format: 'png', convert_options: '-coalesce +profile "!icc,*" +set modify-date +set create-date' } }, validate_media_type: false
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ class UserSettings
|
|||
setting :pending_account, default: true
|
||||
setting :trends, default: true
|
||||
setting :appeal, default: true
|
||||
setting :warning, default: true
|
||||
end
|
||||
|
||||
namespace :interactions do
|
||||
|
|
|
@ -43,6 +43,7 @@ class UpdateStatusService < BaseService
|
|||
update_metadata!
|
||||
broadcast_updates!
|
||||
|
||||
@status.reload
|
||||
@status
|
||||
rescue NoChangesSubmittedError
|
||||
# For calls that result in no changes, swallow the error
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%tbody
|
||||
%tr
|
||||
%td
|
||||
%img{ src: media_attachment.url, class: 'image' }
|
||||
%img.image{ src: media_attachment.url, alt: '' }
|
||||
.detailed-status__meta
|
||||
- if media_attachment.status.application
|
||||
= media_attachment.status.application.name
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
%th= t('admin.statuses.favourites')
|
||||
%td= friendly_number_to_human @status.favourites_count
|
||||
|
||||
%div.action-buttons
|
||||
.action-buttons
|
||||
%div
|
||||
- if @account.local?
|
||||
= link_to t('admin.statuses.remove_history'), remove_history_admin_account_status_path(@account.id), data: { confirm: t('admin.statuses.are_you_sure') }, method: :post, class: 'button' if can?(:warn, @account)
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
%h4= t('antennas.contexts.account')
|
||||
%p.hint= t 'antennas.edit.accounts_hint'
|
||||
|
||||
.fields-row
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :accounts_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.accounts_raw')
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
%h4= t('antennas.contexts.tag')
|
||||
|
||||
.fields-row
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :tags_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.tags_raw')
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
|
@ -49,7 +49,7 @@
|
|||
%h4= t('antennas.contexts.keyword')
|
||||
%p.hint= t 'antennas.edit.keywords_hint'
|
||||
|
||||
.fields-row
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :keywords_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.keywords_raw')
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
= yield :header_tags
|
||||
|
||||
%script(src="https://www.googletagmanager.com/gtag/js?id=AW-11130587137" async)
|
||||
%script{ src="https://www.googletagmanager.com/gtag/js?id=AW-11130587137" async }
|
||||
|
||||
:javascript
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
.fields-group
|
||||
= f.input :my_actor_type, collection: ['person', 'bot'],label_method: lambda { |item| safe_join([t("simple_form.labels.defaults.#{item}"), content_tag(:span, I18n.t("simple_form.hints.defaults.#{item}"), class: 'hint')]) }, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', wrapper: :with_floating_label
|
||||
|
||||
-#.fields-group
|
||||
.fields-group
|
||||
= f.input :group_allow_private_message, as: :boolean, wrapper: :with_label, kmyblue: true, hint: t('simple_form.hints.defaults.group_allow_private_message')
|
||||
|
||||
.actions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue