Merge pull request #2071 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
This commit is contained in:
commit
ad17e1944a
57 changed files with 411 additions and 371 deletions
|
@ -15,6 +15,12 @@
|
|||
"webben.browserslist"
|
||||
],
|
||||
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/sshd:1": {
|
||||
"version": "latest"
|
||||
}
|
||||
},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// This can be used to network with other containers or the host.
|
||||
"forwardPorts": [3000, 4000],
|
||||
|
|
38
.github/workflows/lint-json.yml
vendored
Normal file
38
.github/workflows/lint-json.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: JSON Linting
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
paths:
|
||||
- 'package.json'
|
||||
- 'yarn.lock'
|
||||
- '.prettier*'
|
||||
- '**/*.json'
|
||||
- '.github/workflows/lint-json.yml'
|
||||
|
||||
pull_request:
|
||||
paths:
|
||||
- 'package.json'
|
||||
- 'yarn.lock'
|
||||
- '.prettier*'
|
||||
- '**/*.json'
|
||||
- '.github/workflows/lint-json.yml'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: yarn
|
||||
|
||||
- name: Install all yarn packages
|
||||
run: yarn --frozen-lockfile
|
||||
|
||||
- name: Prettier
|
||||
run: yarn prettier --check "**/*.json"
|
40
.github/workflows/lint-yml.yml
vendored
Normal file
40
.github/workflows/lint-yml.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: YML Linting
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
paths:
|
||||
- 'package.json'
|
||||
- 'yarn.lock'
|
||||
- '.prettier*'
|
||||
- '**/*.yaml'
|
||||
- '**/*.yml'
|
||||
- '.github/workflows/lint-yml.yml'
|
||||
|
||||
pull_request:
|
||||
paths:
|
||||
- 'package.json'
|
||||
- 'yarn.lock'
|
||||
- '.prettier*'
|
||||
- '**/*.yaml'
|
||||
- '**/*.yml'
|
||||
- '.github/workflows/lint-yml.yml'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: yarn
|
||||
|
||||
- name: Install all yarn packages
|
||||
run: yarn --frozen-lockfile
|
||||
|
||||
- name: Prettier
|
||||
run: yarn prettier --check "**/*.{yml,yaml}"
|
2
.github/workflows/linter.yml
vendored
2
.github/workflows/linter.yml
vendored
|
@ -57,8 +57,6 @@ jobs:
|
|||
cache: yarn
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Check prettier formatting
|
||||
run: yarn format-check
|
||||
- name: Set-up RuboCop Problem Mathcher
|
||||
uses: r7kamura/rubocop-problem-matchers-action@v1
|
||||
- name: Set-up Stylelint Problem Matcher
|
||||
|
|
1
Gemfile
1
Gemfile
|
@ -122,7 +122,6 @@ group :test do
|
|||
gem 'climate_control', '~> 0.2'
|
||||
gem 'faker', '~> 3.1'
|
||||
gem 'json-schema', '~> 3.0'
|
||||
gem 'microformats', '~> 4.4'
|
||||
gem 'rack-test', '~> 2.0'
|
||||
gem 'rails-controller-testing', '~> 1.0'
|
||||
gem 'rspec_junit_formatter', '~> 0.6'
|
||||
|
|
38
Gemfile.lock
38
Gemfile.lock
|
@ -130,7 +130,7 @@ GEM
|
|||
concurrent-ruby (~> 1.0, >= 1.0.5)
|
||||
redis (>= 1.0, < 6)
|
||||
builder (3.2.4)
|
||||
bullet (7.0.4)
|
||||
bullet (7.0.7)
|
||||
activesupport (>= 3.0.0)
|
||||
uniform_notifier (~> 1.11)
|
||||
bundler-audit (0.9.1)
|
||||
|
@ -330,9 +330,9 @@ GEM
|
|||
idn-ruby (0.1.5)
|
||||
ipaddress (0.8.3)
|
||||
jmespath (1.6.2)
|
||||
json (2.6.2)
|
||||
json (2.6.3)
|
||||
json-canonicalization (0.3.0)
|
||||
json-jwt (1.13.0)
|
||||
json-jwt (1.14.0)
|
||||
activesupport (>= 4.2)
|
||||
aes_key_wrap
|
||||
bindata
|
||||
|
@ -349,7 +349,7 @@ GEM
|
|||
json-schema (3.0.0)
|
||||
addressable (>= 2.8)
|
||||
jsonapi-renderer (0.2.2)
|
||||
jwt (2.4.1)
|
||||
jwt (2.5.0)
|
||||
kaminari (1.2.2)
|
||||
activesupport (>= 4.1.0)
|
||||
kaminari-actionview (= 1.2.2)
|
||||
|
@ -399,15 +399,12 @@ GEM
|
|||
matrix (0.4.2)
|
||||
memory_profiler (1.0.1)
|
||||
method_source (1.0.0)
|
||||
microformats (4.4.1)
|
||||
json (~> 2.2)
|
||||
nokogiri (~> 1.10)
|
||||
mime-types (3.4.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2022.0105)
|
||||
mini_mime (1.1.2)
|
||||
mini_portile2 (2.8.0)
|
||||
minitest (5.16.3)
|
||||
minitest (5.17.0)
|
||||
msgpack (1.6.0)
|
||||
multi_json (1.15.0)
|
||||
multipart-post (2.1.1)
|
||||
|
@ -456,9 +453,9 @@ GEM
|
|||
openssl-signature_algorithm (1.2.1)
|
||||
openssl (> 2.0, < 3.1)
|
||||
orm_adapter (0.5.0)
|
||||
ox (2.14.11)
|
||||
ox (2.14.12)
|
||||
parallel (1.22.1)
|
||||
parser (3.1.2.1)
|
||||
parser (3.1.3.0)
|
||||
ast (~> 2.4.1)
|
||||
parslet (2.0.0)
|
||||
pastel (0.8.0)
|
||||
|
@ -554,7 +551,7 @@ GEM
|
|||
redis (>= 4)
|
||||
redlock (1.3.2)
|
||||
redis (>= 3.0.0, < 6.0)
|
||||
regexp_parser (2.6.0)
|
||||
regexp_parser (2.6.1)
|
||||
request_store (1.5.1)
|
||||
rack (>= 1.4)
|
||||
responders (3.0.1)
|
||||
|
@ -589,26 +586,26 @@ GEM
|
|||
rspec-support (3.11.1)
|
||||
rspec_junit_formatter (0.6.0)
|
||||
rspec-core (>= 2, < 4, != 2.12.0)
|
||||
rubocop (1.39.0)
|
||||
rubocop (1.42.0)
|
||||
json (~> 2.3)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.1.2.1)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.23.0, < 2.0)
|
||||
rubocop-ast (>= 1.24.1, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.23.0)
|
||||
rubocop-ast (1.24.1)
|
||||
parser (>= 3.1.1.0)
|
||||
rubocop-performance (1.15.1)
|
||||
rubocop-performance (1.15.2)
|
||||
rubocop (>= 1.7.0, < 2.0)
|
||||
rubocop-ast (>= 0.4.0)
|
||||
rubocop-rails (2.17.2)
|
||||
rubocop-rails (2.17.4)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 1.33.0, < 2.0)
|
||||
rubocop-rspec (2.15.0)
|
||||
rubocop-rspec (2.16.0)
|
||||
rubocop (~> 1.33)
|
||||
ruby-progressbar (1.11.0)
|
||||
ruby-saml (1.13.0)
|
||||
|
@ -812,7 +809,6 @@ DEPENDENCIES
|
|||
makara (~> 0.5)
|
||||
mario-redis-lock (~> 1.2)
|
||||
memory_profiler
|
||||
microformats (~> 4.4)
|
||||
mime-types (~> 3.4.1)
|
||||
net-ldap (~> 0.17)
|
||||
nokogiri (~> 1.13)
|
||||
|
@ -880,9 +876,3 @@ DEPENDENCIES
|
|||
webpacker (~> 5.4)
|
||||
webpush!
|
||||
xorcist (~> 1.1)
|
||||
|
||||
RUBY VERSION
|
||||
ruby 3.0.4p208
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.33
|
||||
|
|
|
@ -49,7 +49,7 @@ module Admin
|
|||
private
|
||||
|
||||
def set_instance
|
||||
@instance = Instance.find(params[:id])
|
||||
@instance = Instance.find(TagManager.instance.normalize_domain(params[:id]&.strip))
|
||||
end
|
||||
|
||||
def set_instances
|
||||
|
|
|
@ -4,8 +4,8 @@ module WebAppControllerConcern
|
|||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
prepend_before_action :redirect_unauthenticated_to_permalinks!
|
||||
before_action :set_pack
|
||||
before_action :redirect_unauthenticated_to_permalinks!
|
||||
before_action :set_app_body_class
|
||||
before_action :set_referrer_policy_header
|
||||
end
|
||||
|
@ -19,7 +19,7 @@ module WebAppControllerConcern
|
|||
end
|
||||
|
||||
def redirect_unauthenticated_to_permalinks!
|
||||
return if user_signed_in?
|
||||
return if user_signed_in? # NOTE: Different from upstream because we allow moved users to log in
|
||||
|
||||
redirect_path = PermalinkRedirector.new(request.path).redirect_path
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ ready(() => {
|
|||
}
|
||||
|
||||
document.querySelector('a#add-instance-button')?.addEventListener('click', (e) => {
|
||||
const domain = document.getElementById('by_domain')?.value;
|
||||
const domain = document.querySelector('input[type="text"]#by_domain')?.value;
|
||||
|
||||
if (domain) {
|
||||
const url = new URL(event.target.href);
|
||||
|
|
|
@ -30,6 +30,7 @@ export default class IconButton extends React.PureComponent {
|
|||
counter: PropTypes.number,
|
||||
obfuscateCount: PropTypes.bool,
|
||||
href: PropTypes.string,
|
||||
ariaHidden: PropTypes.bool,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
|
@ -39,6 +40,7 @@ export default class IconButton extends React.PureComponent {
|
|||
animate: false,
|
||||
overlay: false,
|
||||
tabIndex: '0',
|
||||
ariaHidden: false,
|
||||
};
|
||||
|
||||
state = {
|
||||
|
@ -115,6 +117,7 @@ export default class IconButton extends React.PureComponent {
|
|||
counter,
|
||||
obfuscateCount,
|
||||
href,
|
||||
ariaHidden,
|
||||
} = this.props;
|
||||
|
||||
const {
|
||||
|
@ -155,6 +158,7 @@ export default class IconButton extends React.PureComponent {
|
|||
<button
|
||||
aria-label={title}
|
||||
aria-expanded={expanded}
|
||||
aria-hidden={ariaHidden}
|
||||
title={title}
|
||||
className={classes}
|
||||
onClick={this.handleClick}
|
||||
|
|
|
@ -376,7 +376,7 @@ class MediaGallery extends React.PureComponent {
|
|||
</button>
|
||||
);
|
||||
} else if (visible) {
|
||||
spoilerButton = <IconButton title={intl.formatMessage(messages.toggle_visible, { number: size })} icon='eye-slash' overlay onClick={this.handleOpen} />;
|
||||
spoilerButton = <IconButton title={intl.formatMessage(messages.toggle_visible, { number: size })} icon='eye-slash' overlay onClick={this.handleOpen} ariaHidden />;
|
||||
} else {
|
||||
spoilerButton = (
|
||||
<button type='button' onClick={this.handleOpen} className='spoiler-button__overlay'>
|
||||
|
|
|
@ -9,7 +9,7 @@ import { me } from 'flavours/glitch/initial_state';
|
|||
import RelativeTimestamp from './relative_timestamp';
|
||||
import { accountAdminLink, statusAdminLink } from 'flavours/glitch/utils/backend_links';
|
||||
import classNames from 'classnames';
|
||||
import { PERMISSION_MANAGE_USERS } from 'flavours/glitch/permissions';
|
||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'flavours/glitch/permissions';
|
||||
|
||||
const messages = defineMessages({
|
||||
delete: { id: 'status.delete', defaultMessage: 'Delete' },
|
||||
|
@ -37,9 +37,10 @@ const messages = defineMessages({
|
|||
unpin: { id: 'status.unpin', defaultMessage: 'Unpin from profile' },
|
||||
embed: { id: 'status.embed', defaultMessage: 'Embed' },
|
||||
admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },
|
||||
admin_status: { id: 'status.admin_status', defaultMessage: 'Open this status in the moderation interface' },
|
||||
copy: { id: 'status.copy', defaultMessage: 'Copy link to status' },
|
||||
hide: { id: 'status.hide', defaultMessage: 'Hide toot' },
|
||||
admin_status: { id: 'status.admin_status', defaultMessage: 'Open this post in the moderation interface' },
|
||||
admin_domain: { id: 'status.admin_domain', defaultMessage: 'Open moderation interface for {domain}' },
|
||||
copy: { id: 'status.copy', defaultMessage: 'Copy link to post' },
|
||||
hide: { id: 'status.hide', defaultMessage: 'Hide post' },
|
||||
edited: { id: 'status.edited', defaultMessage: 'Edited {date}' },
|
||||
filter: { id: 'status.filter', defaultMessage: 'Filter this post' },
|
||||
openOriginalPage: { id: 'account.open_original_page', defaultMessage: 'Open original page' },
|
||||
|
@ -197,6 +198,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
|
||||
render () {
|
||||
const { status, intl, withDismiss, withCounters, showReplyCount, scrollKey } = this.props;
|
||||
const { permissions } = this.context.identity;
|
||||
|
||||
const anonymousAccess = !me;
|
||||
const mutingConversation = status.get('muted');
|
||||
|
@ -252,19 +254,19 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick });
|
||||
menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport });
|
||||
|
||||
if ((this.context.identity.permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS && (accountAdminLink || statusAdminLink)) {
|
||||
if (((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS && (accountAdminLink || statusAdminLink)) || (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION)) {
|
||||
menu.push(null);
|
||||
if (accountAdminLink !== undefined) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.admin_account, { name: status.getIn(['account', 'username']) }),
|
||||
href: accountAdminLink(status.getIn(['account', 'id'])),
|
||||
});
|
||||
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) {
|
||||
if (accountAdminLink !== undefined) {
|
||||
menu.push({ text: intl.formatMessage(messages.admin_account, { name: status.getIn(['account', 'username']) }), href: accountAdminLink(status.getIn(['account', 'id'])) });
|
||||
}
|
||||
if (statusAdminLink !== undefined) {
|
||||
menu.push({ text: intl.formatMessage(messages.admin_status), href: statusAdminLink(status.getIn(['account', 'id']), status.get('id')) });
|
||||
}
|
||||
}
|
||||
if (statusAdminLink !== undefined) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.admin_status),
|
||||
href: statusAdminLink(status.getIn(['account', 'id']), status.get('id')),
|
||||
});
|
||||
if (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION) {
|
||||
const domain = status.getIn(['account', 'acct']).split('@')[1];
|
||||
menu.push({ text: intl.formatMessage(messages.admin_domain, { domain: domain }), href: `/admin/instances/${domain}` });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
|
||||
import 'intersection-observer';
|
||||
import 'requestidlecallback';
|
||||
import objectFitImages from 'object-fit-images';
|
||||
|
||||
objectFitImages();
|
||||
|
|
|
@ -14,7 +14,7 @@ import { NavLink } from 'react-router-dom';
|
|||
import DropdownMenuContainer from 'flavours/glitch/containers/dropdown_menu_container';
|
||||
import AccountNoteContainer from '../containers/account_note_container';
|
||||
import FollowRequestNoteContainer from '../containers/follow_request_note_container';
|
||||
import { PERMISSION_MANAGE_USERS } from 'flavours/glitch/permissions';
|
||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'flavours/glitch/permissions';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
const messages = defineMessages({
|
||||
|
@ -52,6 +52,7 @@ const messages = defineMessages({
|
|||
unendorse: { id: 'account.unendorse', defaultMessage: 'Don\'t feature on profile' },
|
||||
add_or_remove_from_list: { id: 'account.add_or_remove_from_list', defaultMessage: 'Add or Remove from lists' },
|
||||
admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },
|
||||
admin_domain: { id: 'status.admin_domain', defaultMessage: 'Open moderation interface for {domain}' },
|
||||
add_account_note: { id: 'account.add_account_note', defaultMessage: 'Add note for @{name}' },
|
||||
languages: { id: 'account.languages', defaultMessage: 'Change subscribed languages' },
|
||||
openOriginalPage: { id: 'account.open_original_page', defaultMessage: 'Open original page' },
|
||||
|
@ -155,7 +156,7 @@ class Header extends ImmutablePureComponent {
|
|||
|
||||
render () {
|
||||
const { account, hidden, intl, domain } = this.props;
|
||||
const { signedIn } = this.context.identity;
|
||||
const { signedIn, permissions } = this.context.identity;
|
||||
|
||||
if (!account) {
|
||||
return null;
|
||||
|
@ -291,9 +292,14 @@ class Header extends ImmutablePureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
if (account.get('id') !== me && (this.context.identity.permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS && accountAdminLink) {
|
||||
if (account.get('id') !== me && ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS && accountAdminLink) || (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION)) {
|
||||
menu.push(null);
|
||||
menu.push({ text: intl.formatMessage(messages.admin_account, { name: account.get('username') }), href: accountAdminLink(account.get('id')) });
|
||||
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS && accountAdminLink) {
|
||||
menu.push({ text: intl.formatMessage(messages.admin_account, { name: account.get('username') }), href: accountAdminLink(account.get('id')) });
|
||||
}
|
||||
if (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION) {
|
||||
menu.push({ text: intl.formatMessage(messages.admin_domain, { domain: remoteDomain }), href: `/admin/instances/${remoteDomain}` });
|
||||
}
|
||||
}
|
||||
|
||||
const content = { __html: account.get('note_emojified') };
|
||||
|
|
|
@ -310,7 +310,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
|
||||
<ReplyIndicatorContainer />
|
||||
|
||||
<div className={`spoiler-input ${spoiler ? 'spoiler-input--visible' : ''}`} ref={this.setRef}>
|
||||
<div className={`spoiler-input ${spoiler ? 'spoiler-input--visible' : ''}`} ref={this.setRef} aria-hidden={!this.props.spoiler}>
|
||||
<AutosuggestInput
|
||||
placeholder={intl.formatMessage(messages.spoiler_placeholder)}
|
||||
value={spoilerText}
|
||||
|
|
|
@ -7,7 +7,7 @@ import { defineMessages, injectIntl } from 'react-intl';
|
|||
import { me } from 'flavours/glitch/initial_state';
|
||||
import { accountAdminLink, statusAdminLink } from 'flavours/glitch/utils/backend_links';
|
||||
import classNames from 'classnames';
|
||||
import { PERMISSION_MANAGE_USERS } from 'flavours/glitch/permissions';
|
||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'flavours/glitch/permissions';
|
||||
|
||||
const messages = defineMessages({
|
||||
delete: { id: 'status.delete', defaultMessage: 'Delete' },
|
||||
|
@ -34,6 +34,7 @@ const messages = defineMessages({
|
|||
embed: { id: 'status.embed', defaultMessage: 'Embed' },
|
||||
admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },
|
||||
admin_status: { id: 'status.admin_status', defaultMessage: 'Open this status in the moderation interface' },
|
||||
admin_domain: { id: 'status.admin_domain', defaultMessage: 'Open moderation interface for {domain}' },
|
||||
copy: { id: 'status.copy', defaultMessage: 'Copy link to status' },
|
||||
openOriginalPage: { id: 'account.open_original_page', defaultMessage: 'Open original page' },
|
||||
});
|
||||
|
@ -177,19 +178,19 @@ class ActionBar extends React.PureComponent {
|
|||
menu.push({ text: intl.formatMessage(messages.mute, { name: status.getIn(['account', 'username']) }), action: this.handleMuteClick });
|
||||
menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick });
|
||||
menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport });
|
||||
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS && (accountAdminLink || statusAdminLink)) {
|
||||
if (((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS && (accountAdminLink || statusAdminLink)) || (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION)) {
|
||||
menu.push(null);
|
||||
if (accountAdminLink !== undefined) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.admin_account, { name: status.getIn(['account', 'username']) }),
|
||||
href: accountAdminLink(status.getIn(['account', 'id'])),
|
||||
});
|
||||
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) {
|
||||
if (accountAdminLink !== undefined) {
|
||||
menu.push({ text: intl.formatMessage(messages.admin_account, { name: status.getIn(['account', 'username']) }), href: accountAdminLink(status.getIn(['account', 'id'])) });
|
||||
}
|
||||
if (statusAdminLink !== undefined) {
|
||||
menu.push({ text: intl.formatMessage(messages.admin_status), href: statusAdminLink(status.getIn(['account', 'id']), status.get('id')) });
|
||||
}
|
||||
}
|
||||
if (statusAdminLink !== undefined) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.admin_status),
|
||||
href: statusAdminLink(status.getIn(['account', 'id']), status.get('id')),
|
||||
});
|
||||
if (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION) {
|
||||
const domain = status.getIn(['account', 'acct']).split('@')[1];
|
||||
menu.push({ text: intl.formatMessage(messages.admin_domain, { domain: domain }), href: `/admin/instances/${domain}` });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,15 +23,14 @@ function loadPolyfills() {
|
|||
);
|
||||
|
||||
// Latest version of Firefox and Safari do not have IntersectionObserver.
|
||||
// Edge does not have requestIdleCallback and object-fit CSS property.
|
||||
// Edge does not have requestIdleCallback.
|
||||
// This avoids shipping them all the polyfills.
|
||||
const needsExtraPolyfills = !(
|
||||
window.AbortController &&
|
||||
window.IntersectionObserver &&
|
||||
window.IntersectionObserverEntry &&
|
||||
'isIntersecting' in IntersectionObserverEntry.prototype &&
|
||||
window.requestIdleCallback &&
|
||||
'object-fit' in (new Image()).style
|
||||
window.requestIdleCallback
|
||||
);
|
||||
|
||||
return Promise.all([
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export const PERMISSION_INVITE_USERS = 0x0000000000010000;
|
||||
export const PERMISSION_MANAGE_USERS = 0x0000000000000400;
|
||||
export const PERMISSION_MANAGE_REPORTS = 0x0000000000000010;
|
||||
export const PERMISSION_INVITE_USERS = 0x0000000000010000;
|
||||
export const PERMISSION_MANAGE_USERS = 0x0000000000000400;
|
||||
export const PERMISSION_MANAGE_FEDERATION = 0x0000000000000020;
|
||||
export const PERMISSION_MANAGE_REPORTS = 0x0000000000000010;
|
||||
|
|
|
@ -289,10 +289,10 @@
|
|||
color: $dark-text-color;
|
||||
|
||||
&__chart {
|
||||
background: rgba(darken($ui-primary-color, 14%), 0.2);
|
||||
background: rgba(darken($ui-primary-color, 14%), 0.7);
|
||||
|
||||
&.leading {
|
||||
background: rgba($ui-highlight-color, 0.2);
|
||||
background: rgba($ui-highlight-color, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ export default class IconButton extends React.PureComponent {
|
|||
counter: PropTypes.number,
|
||||
obfuscateCount: PropTypes.bool,
|
||||
href: PropTypes.string,
|
||||
ariaHidden: PropTypes.bool,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
|
@ -36,6 +37,7 @@ export default class IconButton extends React.PureComponent {
|
|||
animate: false,
|
||||
overlay: false,
|
||||
tabIndex: '0',
|
||||
ariaHidden: false,
|
||||
};
|
||||
|
||||
state = {
|
||||
|
@ -102,6 +104,7 @@ export default class IconButton extends React.PureComponent {
|
|||
counter,
|
||||
obfuscateCount,
|
||||
href,
|
||||
ariaHidden,
|
||||
} = this.props;
|
||||
|
||||
const {
|
||||
|
@ -142,6 +145,7 @@ export default class IconButton extends React.PureComponent {
|
|||
type='button'
|
||||
aria-label={title}
|
||||
aria-expanded={expanded}
|
||||
aria-hidden={ariaHidden}
|
||||
title={title}
|
||||
className={classes}
|
||||
onClick={this.handleClick}
|
||||
|
|
|
@ -345,7 +345,7 @@ class MediaGallery extends React.PureComponent {
|
|||
</button>
|
||||
);
|
||||
} else if (visible) {
|
||||
spoilerButton = <IconButton title={intl.formatMessage(messages.toggle_visible, { number: size })} icon='eye-slash' overlay onClick={this.handleOpen} />;
|
||||
spoilerButton = <IconButton title={intl.formatMessage(messages.toggle_visible, { number: size })} icon='eye-slash' overlay onClick={this.handleOpen} ariaHidden />;
|
||||
} else {
|
||||
spoilerButton = (
|
||||
<button type='button' onClick={this.handleOpen} className='spoiler-button__overlay'>
|
||||
|
|
|
@ -8,7 +8,7 @@ import { defineMessages, injectIntl } from 'react-intl';
|
|||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { me } from '../initial_state';
|
||||
import classNames from 'classnames';
|
||||
import { PERMISSION_MANAGE_USERS } from 'mastodon/permissions';
|
||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions';
|
||||
|
||||
const messages = defineMessages({
|
||||
delete: { id: 'status.delete', defaultMessage: 'Delete' },
|
||||
|
@ -37,9 +37,10 @@ const messages = defineMessages({
|
|||
unpin: { id: 'status.unpin', defaultMessage: 'Unpin from profile' },
|
||||
embed: { id: 'status.embed', defaultMessage: 'Embed' },
|
||||
admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },
|
||||
admin_status: { id: 'status.admin_status', defaultMessage: 'Open this status in the moderation interface' },
|
||||
copy: { id: 'status.copy', defaultMessage: 'Copy link to status' },
|
||||
hide: { id: 'status.hide', defaultMessage: 'Hide toot' },
|
||||
admin_status: { id: 'status.admin_status', defaultMessage: 'Open this post in the moderation interface' },
|
||||
admin_domain: { id: 'status.admin_domain', defaultMessage: 'Open moderation interface for {domain}' },
|
||||
copy: { id: 'status.copy', defaultMessage: 'Copy link to post' },
|
||||
hide: { id: 'status.hide', defaultMessage: 'Hide post' },
|
||||
blockDomain: { id: 'account.block_domain', defaultMessage: 'Block domain {domain}' },
|
||||
unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unblock domain {domain}' },
|
||||
unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' },
|
||||
|
@ -232,7 +233,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
|
||||
render () {
|
||||
const { status, relationship, intl, withDismiss, withCounters, scrollKey } = this.props;
|
||||
const { signedIn } = this.context.identity;
|
||||
const { signedIn, permissions } = this.context.identity;
|
||||
|
||||
const anonymousAccess = !signedIn;
|
||||
const publicStatus = ['public', 'unlisted'].includes(status.get('visibility'));
|
||||
|
@ -312,10 +313,16 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
if ((this.context.identity.permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) {
|
||||
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS || (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION)) {
|
||||
menu.push(null);
|
||||
menu.push({ text: intl.formatMessage(messages.admin_account, { name: account.get('username') }), href: `/admin/accounts/${status.getIn(['account', 'id'])}` });
|
||||
menu.push({ text: intl.formatMessage(messages.admin_status), href: `/admin/accounts/${status.getIn(['account', 'id'])}/statuses/${status.get('id')}` });
|
||||
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) {
|
||||
menu.push({ text: intl.formatMessage(messages.admin_account, { name: account.get('username') }), href: `/admin/accounts/${status.getIn(['account', 'id'])}` });
|
||||
menu.push({ text: intl.formatMessage(messages.admin_status), href: `/admin/accounts/${status.getIn(['account', 'id'])}/statuses/${status.get('id')}` });
|
||||
}
|
||||
if (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION) {
|
||||
const domain = account.get('acct').split('@')[1];
|
||||
menu.push({ text: intl.formatMessage(messages.admin_domain, { domain: domain }), href: `/admin/instances/${domain}` });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
|
||||
import 'intersection-observer';
|
||||
import 'requestidlecallback';
|
||||
import objectFitImages from 'object-fit-images';
|
||||
|
||||
objectFitImages();
|
||||
|
|
|
@ -15,7 +15,7 @@ import { NavLink } from 'react-router-dom';
|
|||
import DropdownMenuContainer from 'mastodon/containers/dropdown_menu_container';
|
||||
import AccountNoteContainer from '../containers/account_note_container';
|
||||
import FollowRequestNoteContainer from '../containers/follow_request_note_container';
|
||||
import { PERMISSION_MANAGE_USERS } from 'mastodon/permissions';
|
||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
const messages = defineMessages({
|
||||
|
@ -53,6 +53,7 @@ const messages = defineMessages({
|
|||
unendorse: { id: 'account.unendorse', defaultMessage: 'Don\'t feature on profile' },
|
||||
add_or_remove_from_list: { id: 'account.add_or_remove_from_list', defaultMessage: 'Add or Remove from lists' },
|
||||
admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },
|
||||
admin_domain: { id: 'status.admin_domain', defaultMessage: 'Open moderation interface for {domain}' },
|
||||
languages: { id: 'account.languages', defaultMessage: 'Change subscribed languages' },
|
||||
openOriginalPage: { id: 'account.open_original_page', defaultMessage: 'Open original page' },
|
||||
});
|
||||
|
@ -163,7 +164,7 @@ class Header extends ImmutablePureComponent {
|
|||
|
||||
render () {
|
||||
const { account, hidden, intl, domain } = this.props;
|
||||
const { signedIn } = this.context.identity;
|
||||
const { signedIn, permissions } = this.context.identity;
|
||||
|
||||
if (!account) {
|
||||
return null;
|
||||
|
@ -288,9 +289,14 @@ class Header extends ImmutablePureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
if (account.get('id') !== me && (this.context.identity.permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) {
|
||||
if ((account.get('id') !== me && (permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) || (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION)) {
|
||||
menu.push(null);
|
||||
menu.push({ text: intl.formatMessage(messages.admin_account, { name: account.get('username') }), href: `/admin/accounts/${account.get('id')}` });
|
||||
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) {
|
||||
menu.push({ text: intl.formatMessage(messages.admin_account, { name: account.get('username') }), href: `/admin/accounts/${account.get('id')}` });
|
||||
}
|
||||
if (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION) {
|
||||
menu.push({ text: intl.formatMessage(messages.admin_domain, { domain: remoteDomain }), href: `/admin/instances/${remoteDomain}` });
|
||||
}
|
||||
}
|
||||
|
||||
const content = { __html: account.get('note_emojified') };
|
||||
|
|
|
@ -226,7 +226,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
|
||||
<ReplyIndicatorContainer />
|
||||
|
||||
<div className={`spoiler-input ${this.props.spoiler ? 'spoiler-input--visible' : ''}`} ref={this.setRef}>
|
||||
<div className={`spoiler-input ${this.props.spoiler ? 'spoiler-input--visible' : ''}`} ref={this.setRef} aria-hidden={!this.props.spoiler}>
|
||||
<AutosuggestInput
|
||||
placeholder={intl.formatMessage(messages.spoiler_placeholder)}
|
||||
value={this.props.spoilerText}
|
||||
|
|
|
@ -7,7 +7,7 @@ import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
|
|||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
import { me } from '../../../initial_state';
|
||||
import classNames from 'classnames';
|
||||
import { PERMISSION_MANAGE_USERS } from 'mastodon/permissions';
|
||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions';
|
||||
|
||||
const messages = defineMessages({
|
||||
delete: { id: 'status.delete', defaultMessage: 'Delete' },
|
||||
|
@ -34,6 +34,7 @@ const messages = defineMessages({
|
|||
embed: { id: 'status.embed', defaultMessage: 'Embed' },
|
||||
admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },
|
||||
admin_status: { id: 'status.admin_status', defaultMessage: 'Open this status in the moderation interface' },
|
||||
admin_domain: { id: 'status.admin_domain', defaultMessage: 'Open moderation interface for {domain}' },
|
||||
copy: { id: 'status.copy', defaultMessage: 'Copy link to status' },
|
||||
blockDomain: { id: 'account.block_domain', defaultMessage: 'Block domain {domain}' },
|
||||
unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unblock domain {domain}' },
|
||||
|
@ -243,10 +244,16 @@ class ActionBar extends React.PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) {
|
||||
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS || (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION)) {
|
||||
menu.push(null);
|
||||
menu.push({ text: intl.formatMessage(messages.admin_account, { name: status.getIn(['account', 'username']) }), href: `/admin/accounts/${status.getIn(['account', 'id'])}` });
|
||||
menu.push({ text: intl.formatMessage(messages.admin_status), href: `/admin/accounts/${status.getIn(['account', 'id'])}/statuses/${status.get('id')}` });
|
||||
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) {
|
||||
menu.push({ text: intl.formatMessage(messages.admin_account, { name: status.getIn(['account', 'username']) }), href: `/admin/accounts/${status.getIn(['account', 'id'])}` });
|
||||
menu.push({ text: intl.formatMessage(messages.admin_status), href: `/admin/accounts/${status.getIn(['account', 'id'])}/statuses/${status.get('id')}` });
|
||||
}
|
||||
if (isRemote && (permissions & PERMISSION_MANAGE_FEDERATION) === PERMISSION_MANAGE_FEDERATION) {
|
||||
const domain = account.get('acct').split('@')[1];
|
||||
menu.push({ text: intl.formatMessage(messages.admin_domain, { domain: domain }), href: `/admin/instances/${domain}` });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,15 +23,14 @@ function loadPolyfills() {
|
|||
);
|
||||
|
||||
// Latest version of Firefox and Safari do not have IntersectionObserver.
|
||||
// Edge does not have requestIdleCallback and object-fit CSS property.
|
||||
// Edge does not have requestIdleCallback.
|
||||
// This avoids shipping them all the polyfills.
|
||||
const needsExtraPolyfills = !(
|
||||
window.AbortController &&
|
||||
window.IntersectionObserver &&
|
||||
window.IntersectionObserverEntry &&
|
||||
'isIntersecting' in IntersectionObserverEntry.prototype &&
|
||||
window.requestIdleCallback &&
|
||||
'object-fit' in (new Image()).style
|
||||
window.requestIdleCallback
|
||||
);
|
||||
|
||||
return Promise.all([
|
||||
|
|
|
@ -563,7 +563,7 @@
|
|||
"status.favourite": "Favourite",
|
||||
"status.filter": "Filter this post",
|
||||
"status.filtered": "Filtered",
|
||||
"status.hide": "Hide toot",
|
||||
"status.hide": "Hide post",
|
||||
"status.history.created": "{name} created {date}",
|
||||
"status.history.edited": "{name} edited {date}",
|
||||
"status.load_more": "Load more",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export const PERMISSION_INVITE_USERS = 0x0000000000010000;
|
||||
export const PERMISSION_MANAGE_USERS = 0x0000000000000400;
|
||||
export const PERMISSION_MANAGE_REPORTS = 0x0000000000000010;
|
||||
export const PERMISSION_INVITE_USERS = 0x0000000000010000;
|
||||
export const PERMISSION_MANAGE_USERS = 0x0000000000000400;
|
||||
export const PERMISSION_MANAGE_FEDERATION = 0x0000000000000020;
|
||||
export const PERMISSION_MANAGE_REPORTS = 0x0000000000000010;
|
||||
|
|
|
@ -1216,7 +1216,7 @@ a.name-tag,
|
|||
|
||||
path:first-child {
|
||||
fill: rgba($highlight-text-color, 0.25) !important;
|
||||
fill-opacity: 100% !important;
|
||||
fill-opacity: 1 !important;
|
||||
}
|
||||
|
||||
path:last-child {
|
||||
|
|
|
@ -4268,7 +4268,7 @@ a.status-card.compact:hover {
|
|||
}
|
||||
|
||||
@keyframes heartbeat {
|
||||
from {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
animation-timing-function: ease-out;
|
||||
}
|
||||
|
@ -7343,7 +7343,7 @@ noscript {
|
|||
|
||||
path:first-child {
|
||||
fill: rgba($highlight-text-color, 0.25) !important;
|
||||
fill-opacity: 100% !important;
|
||||
fill-opacity: 1 !important;
|
||||
}
|
||||
|
||||
path:last-child {
|
||||
|
|
|
@ -279,10 +279,10 @@
|
|||
color: $dark-text-color;
|
||||
|
||||
&__chart {
|
||||
background: rgba(darken($ui-primary-color, 14%), 0.2);
|
||||
background: rgba(darken($ui-primary-color, 14%), 0.7);
|
||||
|
||||
&.leading {
|
||||
background: rgba($ui-highlight-color, 0.2);
|
||||
background: rgba($ui-highlight-color, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,14 @@ class Admin::SystemCheck::ElasticsearchCheck < Admin::SystemCheck::BaseCheck
|
|||
|
||||
def message
|
||||
if running_version.present?
|
||||
Admin::SystemCheck::Message.new(:elasticsearch_version_check, I18n.t('admin.system_checks.elasticsearch_version_check.version_comparison', running_version: running_version, required_version: required_version))
|
||||
Admin::SystemCheck::Message.new(
|
||||
:elasticsearch_version_check,
|
||||
I18n.t(
|
||||
'admin.system_checks.elasticsearch_version_check.version_comparison',
|
||||
running_version: running_version,
|
||||
required_version: required_version
|
||||
)
|
||||
)
|
||||
else
|
||||
Admin::SystemCheck::Message.new(:elasticsearch_running_check)
|
||||
end
|
||||
|
@ -23,7 +30,8 @@ class Admin::SystemCheck::ElasticsearchCheck < Admin::SystemCheck::BaseCheck
|
|||
|
||||
def running_version
|
||||
@running_version ||= begin
|
||||
Chewy.client.info['version']['number']
|
||||
Chewy.client.info['version']['minimum_wire_compatibility_version'] ||
|
||||
Chewy.client.info['version']['number']
|
||||
rescue Faraday::ConnectionFailed
|
||||
nil
|
||||
end
|
||||
|
|
|
@ -414,6 +414,7 @@ class FeedManager
|
|||
end
|
||||
|
||||
return true if check_for_blocks.any? { |target_account_id| crutches[:blocking][target_account_id] || crutches[:muting][target_account_id] }
|
||||
return true if crutches[:blocked_by][status.account_id]
|
||||
|
||||
if status.reply? && !status.in_reply_to_account_id.nil? # Filter out if it's a reply
|
||||
should_filter = !crutches[:following][status.in_reply_to_account_id] # and I'm not following the person it's a reply to
|
||||
|
@ -606,7 +607,7 @@ class FeedManager
|
|||
crutches[:blocking] = Block.where(account_id: receiver_id, target_account_id: check_for_blocks).pluck(:target_account_id).index_with(true)
|
||||
crutches[:muting] = Mute.where(account_id: receiver_id, target_account_id: check_for_blocks).pluck(:target_account_id).index_with(true)
|
||||
crutches[:domain_blocking] = AccountDomainBlock.where(account_id: receiver_id, domain: statuses.flat_map { |s| [s.account.domain, s.reblog&.account&.domain] }.compact).pluck(:domain).index_with(true)
|
||||
crutches[:blocked_by] = Block.where(target_account_id: receiver_id, account_id: statuses.map { |s| s.reblog&.account_id }.compact).pluck(:account_id).index_with(true)
|
||||
crutches[:blocked_by] = Block.where(target_account_id: receiver_id, account_id: statuses.map { |s| [s.account_id, s.reblog&.account_id] }.flatten.compact).pluck(:account_id).index_with(true)
|
||||
|
||||
crutches
|
||||
end
|
||||
|
|
|
@ -83,6 +83,7 @@ class Form::AdminSettings
|
|||
validates :show_domain_blocks_rationale, inclusion: { in: %w(disabled users all) }, if: -> { defined?(@show_domain_blocks_rationale) }
|
||||
validates :media_cache_retention_period, :content_cache_retention_period, :backups_retention_period, numericality: { only_integer: true }, allow_blank: true, if: -> { defined?(@media_cache_retention_period) || defined?(@content_cache_retention_period) || defined?(@backups_retention_period) }
|
||||
validates :site_short_description, length: { maximum: 200 }, if: -> { defined?(@site_short_description) }
|
||||
validate :validate_site_uploads
|
||||
|
||||
KEYS.each do |key|
|
||||
define_method(key) do
|
||||
|
@ -104,11 +105,16 @@ class Form::AdminSettings
|
|||
define_method("#{key}=") do |file|
|
||||
value = public_send(key)
|
||||
value.file = file
|
||||
rescue Mastodon::DimensionsValidationError => e
|
||||
errors.add(key.to_sym, e.message)
|
||||
end
|
||||
end
|
||||
|
||||
def save
|
||||
return false unless valid?
|
||||
# NOTE: Annoyingly, files are processed and can error out before
|
||||
# validations are called, and `valid?` clears errors…
|
||||
# So for now, return early if errors aren't empty.
|
||||
return false unless errors.empty? && valid?
|
||||
|
||||
KEYS.each do |key|
|
||||
next if PSEUDO_KEYS.include?(key) || !instance_variable_defined?("@#{key}")
|
||||
|
@ -141,4 +147,16 @@ class Form::AdminSettings
|
|||
value
|
||||
end
|
||||
end
|
||||
|
||||
def validate_site_uploads
|
||||
UPLOAD_KEYS.each do |key|
|
||||
next unless instance_variable_defined?("@#{key}")
|
||||
upload = instance_variable_get("@#{key}")
|
||||
next if upload.valid?
|
||||
|
||||
upload.errors.each do |error|
|
||||
errors.import(error, attribute: key)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,6 +18,7 @@ class Relay < ApplicationRecord
|
|||
|
||||
scope :enabled, -> { accepted }
|
||||
|
||||
before_validation :strip_url
|
||||
before_destroy :ensure_disabled
|
||||
|
||||
alias enabled? accepted?
|
||||
|
@ -74,4 +75,8 @@ class Relay < ApplicationRecord
|
|||
def ensure_disabled
|
||||
disable! if enabled?
|
||||
end
|
||||
|
||||
def strip_url
|
||||
inbox_url&.strip!
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,8 +26,12 @@ class Tag < ApplicationRecord
|
|||
has_many :featured_tags, dependent: :destroy, inverse_of: :tag
|
||||
has_many :followers, through: :passive_relationships, source: :account
|
||||
|
||||
HASHTAG_SEPARATORS = "_\u00B7\u200c"
|
||||
HASHTAG_NAME_PAT = "([[:word:]_][[:word:]#{HASHTAG_SEPARATORS}]*[[:alpha:]#{HASHTAG_SEPARATORS}][[:word:]#{HASHTAG_SEPARATORS}]*[[:word:]_])|([[:word:]_]*[[:alpha:]][[:word:]_]*)"
|
||||
HASHTAG_SEPARATORS = "_\u00B7\u30FB\u200c"
|
||||
HASHTAG_FIRST_SEQUENCE_CHUNK_ONE = "[[:word:]_][[:word:]#{HASHTAG_SEPARATORS}]*[[:alpha:]#{HASHTAG_SEPARATORS}]"
|
||||
HASHTAG_FIRST_SEQUENCE_CHUNK_TWO = "[[:word:]#{HASHTAG_SEPARATORS}]*[[:word:]_]"
|
||||
HASHTAG_FIRST_SEQUENCE = "(#{HASHTAG_FIRST_SEQUENCE_CHUNK_ONE}#{HASHTAG_FIRST_SEQUENCE_CHUNK_TWO})"
|
||||
HASTAG_LAST_SEQUENCE = '([[:word:]_]*[[:alpha:]][[:word:]_]*)'
|
||||
HASHTAG_NAME_PAT = "#{HASHTAG_FIRST_SEQUENCE}|#{HASTAG_LAST_SEQUENCE}"
|
||||
|
||||
HASHTAG_RE = /(?:^|[^\/\)\w])#(#{HASHTAG_NAME_PAT})/i
|
||||
HASHTAG_NAME_RE = /\A(#{HASHTAG_NAME_PAT})\z/i
|
||||
|
@ -45,7 +49,11 @@ class Tag < ApplicationRecord
|
|||
scope :listable, -> { where(listable: [true, nil]) }
|
||||
scope :trendable, -> { Setting.trendable_by_default ? where(trendable: [true, nil]) : where(trendable: true) }
|
||||
scope :not_trendable, -> { where(trendable: false) }
|
||||
scope :recently_used, ->(account) { joins(:statuses).where(statuses: { id: account.statuses.select(:id).limit(1000) }).group(:id).order(Arel.sql('count(*) desc')) }
|
||||
scope :recently_used, ->(account) {
|
||||
joins(:statuses)
|
||||
.where(statuses: { id: account.statuses.select(:id).limit(1000) })
|
||||
.group(:id).order(Arel.sql('count(*) desc'))
|
||||
}
|
||||
scope :matches_name, ->(term) { where(arel_table[:name].lower.matches(arel_table.lower("#{sanitize_sql_like(Tag.normalize(term))}%"), nil, true)) } # Search with case-sensitive to use B-tree index
|
||||
|
||||
update_index('tags', :self)
|
||||
|
@ -105,7 +113,8 @@ class Tag < ApplicationRecord
|
|||
names = Array(name_or_names).map { |str| [normalize(str), str] }.uniq(&:first)
|
||||
|
||||
names.map do |(normalized_name, display_name)|
|
||||
tag = matching_name(normalized_name).first || create(name: normalized_name, display_name: display_name.gsub(HASHTAG_INVALID_CHARS_RE, ''))
|
||||
tag = matching_name(normalized_name).first || create(name: normalized_name,
|
||||
display_name: display_name.gsub(HASHTAG_INVALID_CHARS_RE, ''))
|
||||
|
||||
yield tag if block_given?
|
||||
|
||||
|
@ -154,6 +163,9 @@ class Tag < ApplicationRecord
|
|||
end
|
||||
|
||||
def validate_display_name_change
|
||||
errors.add(:display_name, I18n.t('tags.does_not_match_previous_name')) unless HashtagNormalizer.new.normalize(display_name).casecmp(name.mb_chars).zero?
|
||||
unless HashtagNormalizer.new.normalize(display_name).casecmp(name.mb_chars).zero?
|
||||
errors.add(:display_name,
|
||||
I18n.t('tags.does_not_match_previous_name'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -498,6 +498,7 @@ class User < ApplicationRecord
|
|||
BootstrapTimelineWorker.perform_async(account_id)
|
||||
ActivityTracker.increment('activity:accounts:local')
|
||||
UserMailer.welcome(self).deliver_later
|
||||
TriggerWebhookWorker.perform_async('account.approved', 'Account', account_id)
|
||||
end
|
||||
|
||||
def prepare_returning_user!
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
class Webhook < ApplicationRecord
|
||||
EVENTS = %w(
|
||||
account.approved
|
||||
account.created
|
||||
report.created
|
||||
).freeze
|
||||
|
|
|
@ -7,6 +7,7 @@ class REST::PreferencesSerializer < ActiveModel::Serializer
|
|||
|
||||
attribute :reading_default_sensitive_media, key: 'reading:expand:media'
|
||||
attribute :reading_default_sensitive_text, key: 'reading:expand:spoilers'
|
||||
attribute :reading_autoplay_gifs, key: 'reading:autoplay:gifs'
|
||||
|
||||
def posting_default_privacy
|
||||
object.user.setting_default_privacy
|
||||
|
@ -27,4 +28,8 @@ class REST::PreferencesSerializer < ActiveModel::Serializer
|
|||
def reading_default_sensitive_text
|
||||
object.user.setting_expand_spoilers
|
||||
end
|
||||
|
||||
def reading_autoplay_gifs
|
||||
object.user.setting_auto_play_gif
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,7 +28,7 @@ class FetchOEmbedService
|
|||
page = Nokogiri::HTML(html)
|
||||
|
||||
if @format.nil? || @format == :json
|
||||
@endpoint_url ||= page.at_xpath('//link[@type="application/json+oembed"]')&.attribute('href')&.value
|
||||
@endpoint_url ||= page.at_xpath('//link[@type="application/json+oembed"]|//link[@type="text/json+oembed"]')&.attribute('href')&.value
|
||||
@format ||= :json if @endpoint_url
|
||||
end
|
||||
|
||||
|
@ -100,7 +100,7 @@ class FetchOEmbedService
|
|||
end
|
||||
|
||||
def validate(oembed)
|
||||
oembed if oembed[:version] == '1.0' && oembed[:type].present?
|
||||
oembed if oembed[:version].to_s == '1.0' && oembed[:type].present?
|
||||
end
|
||||
|
||||
def html
|
||||
|
|
|
@ -3,10 +3,13 @@
|
|||
class SuspendAccountService < BaseService
|
||||
include Payloadable
|
||||
|
||||
# Carry out the suspension of a recently-suspended account
|
||||
# @param [Account] account Account to suspend
|
||||
def call(account)
|
||||
return unless account.suspended?
|
||||
|
||||
@account = account
|
||||
|
||||
suspend!
|
||||
reject_remote_follows!
|
||||
distribute_update_actor!
|
||||
unmerge_from_home_timelines!
|
||||
|
@ -16,10 +19,6 @@ class SuspendAccountService < BaseService
|
|||
|
||||
private
|
||||
|
||||
def suspend!
|
||||
@account.suspend! unless @account.suspended?
|
||||
end
|
||||
|
||||
def reject_remote_follows!
|
||||
return if @account.local? || !@account.activitypub?
|
||||
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
|
||||
class UnsuspendAccountService < BaseService
|
||||
include Payloadable
|
||||
|
||||
# Restores a recently-unsuspended account
|
||||
# @param [Account] account Account to restore
|
||||
def call(account)
|
||||
@account = account
|
||||
|
||||
unsuspend!
|
||||
refresh_remote_account!
|
||||
|
||||
return if @account.nil? || @account.suspended?
|
||||
|
@ -18,10 +20,6 @@ class UnsuspendAccountService < BaseService
|
|||
|
||||
private
|
||||
|
||||
def unsuspend!
|
||||
@account.unsuspend! if @account.suspended?
|
||||
end
|
||||
|
||||
def refresh_remote_account!
|
||||
return if @account.local?
|
||||
|
||||
|
|
|
@ -10,5 +10,7 @@ class URLValidator < ActiveModel::EachValidator
|
|||
def compliant?(url)
|
||||
parsed_url = Addressable::URI.parse(url)
|
||||
parsed_url && %w(http https).include?(parsed_url.scheme) && parsed_url.host
|
||||
rescue Addressable::URI::InvalidURIError
|
||||
false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
.report-notes__item__header
|
||||
%span.username
|
||||
= link_to report_note.account.username, admin_account_path(report_note.account_id)
|
||||
%time.relative-formatted{ datetime: report_note.created_at }
|
||||
= t('admin.report_notes.created_at')
|
||||
%time.relative-formatted{ datetime: report_note.created_at.iso8601 }
|
||||
= l report_note.created_at.to_date
|
||||
|
||||
.report-notes__item__content
|
||||
= simple_format(h(report_note.content))
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
- else
|
||||
= link_to @report.account.domain, admin_instance_path(@report.account.domain)
|
||||
%time.relative-formatted{ datetime: @report.created_at.iso8601 }
|
||||
= t('admin.report_notes.created_at')
|
||||
= l @report.created_at.to_date
|
||||
|
||||
.report-notes__item__content
|
||||
= simple_format(h(@report.comment))
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
%span.username
|
||||
= link_to @appeal.account.username, can?(:show, @appeal.account) ? admin_account_path(@appeal.account_id) : short_account_url(@appeal.account)
|
||||
%time.relative-formatted{ datetime: @appeal.created_at.iso8601 }
|
||||
= t('admin.report_notes.created_at')
|
||||
= l @appeal.created_at.to_date
|
||||
|
||||
.report-notes__item__content
|
||||
= simple_format(h(@appeal.text))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
.name
|
||||
= t 'users.signed_in_as'
|
||||
%span.username @#{current_account.local_username_and_domain}
|
||||
= link_to destroy_user_session_path(continue: true), method: :delete, class: 'logout-link icon-button' do
|
||||
= link_to destroy_user_session_path(continue: true), method: :delete, class: 'logout-link icon-button', title: t('applications.logout'), 'aria-label': t('applications.logout') do
|
||||
= fa_icon 'sign-out'
|
||||
|
||||
.container-alt= yield
|
||||
|
|
|
@ -1 +1 @@
|
|||
// Not needed
|
||||
/* Not needed */
|
||||
|
|
12
package.json
12
package.json
|
@ -2,7 +2,7 @@
|
|||
"name": "@mastodon/mastodon",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
"node": ">=14"
|
||||
},
|
||||
"scripts": {
|
||||
"postversion": "git push --tags",
|
||||
|
@ -13,7 +13,7 @@
|
|||
"test": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:jest",
|
||||
"test:lint": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:lint:sass",
|
||||
"test:lint:js": "eslint --ext=js . --cache",
|
||||
"test:lint:sass": "stylelint '**/*.scss'",
|
||||
"test:lint:sass": "stylelint \"**/*.{css,scss}\"",
|
||||
"test:jest": "cross-env NODE_ENV=test jest",
|
||||
"format": "prettier --write \"**/*.{json,yml}\"",
|
||||
"format-check": "prettier --check \"**/*.{json,yml}\""
|
||||
|
@ -39,7 +39,7 @@
|
|||
"atrament": "0.2.4",
|
||||
"arrow-key-navigation": "^1.2.0",
|
||||
"autoprefixer": "^9.8.8",
|
||||
"axios": "^1.2.1",
|
||||
"axios": "^1.2.2",
|
||||
"babel-loader": "^8.3.0",
|
||||
"babel-plugin-lodash": "^3.3.4",
|
||||
"babel-plugin-preval": "^5.1.0",
|
||||
|
@ -83,13 +83,11 @@
|
|||
"mkdirp": "^1.0.4",
|
||||
"npmlog": "^7.0.1",
|
||||
"object-assign": "^4.1.1",
|
||||
"object-fit-images": "^3.2.3",
|
||||
"object.values": "^1.1.6",
|
||||
"path-complete-extname": "^1.0.0",
|
||||
"pg": "^8.5.0",
|
||||
"postcss": "^8.4.20",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-object-fit-images": "^1.1.2",
|
||||
"promise.prototype.finally": "^3.1.4",
|
||||
"prop-types": "^15.8.1",
|
||||
"punycode": "^2.1.0",
|
||||
|
@ -162,8 +160,8 @@
|
|||
"raf": "^3.4.1",
|
||||
"react-intl-translations-manager": "^5.0.3",
|
||||
"react-test-renderer": "^16.14.0",
|
||||
"stylelint": "^14.14.0",
|
||||
"stylelint-config-standard-scss": "^5.0.0",
|
||||
"stylelint": "^14.16.1",
|
||||
"stylelint-config-standard-scss": "^6.1.0",
|
||||
"webpack-dev-server": "^3.11.3",
|
||||
"yargs": "^17.6.2"
|
||||
},
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
module.exports = ({ env }) => ({
|
||||
plugins: {
|
||||
autoprefixer: {},
|
||||
'postcss-object-fit-images': {},
|
||||
cssnano: env === 'production' ? {} : false,
|
||||
},
|
||||
});
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
cursor: default;
|
||||
}
|
||||
|
||||
[inert], [inert] * {
|
||||
[inert],
|
||||
[inert] * {
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
|
|
|
@ -39,6 +39,18 @@ RSpec.describe FeedManager do
|
|||
expect(FeedManager.instance.filter?(:home, reblog, bob)).to be false
|
||||
end
|
||||
|
||||
it 'returns true for post from account who blocked me' do
|
||||
status = Fabricate(:status, text: 'Hello, World', account: alice)
|
||||
alice.block!(bob)
|
||||
expect(FeedManager.instance.filter?(:home, status, bob)).to be true
|
||||
end
|
||||
|
||||
it 'returns true for post from blocked account' do
|
||||
status = Fabricate(:status, text: 'Hello, World', account: alice)
|
||||
bob.block!(alice)
|
||||
expect(FeedManager.instance.filter?(:home, status, bob)).to be true
|
||||
end
|
||||
|
||||
it 'returns true for reblog by followee of blocked account' do
|
||||
status = Fabricate(:status, text: 'Hello world', account: jeff)
|
||||
reblog = Fabricate(:status, reblog: status, account: alice)
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Tag, type: :model do
|
||||
RSpec.describe Tag do
|
||||
describe 'validations' do
|
||||
it 'invalid with #' do
|
||||
expect(Tag.new(name: '#hello_world')).to_not be_valid
|
||||
expect(described_class.new(name: '#hello_world')).not_to be_valid
|
||||
end
|
||||
|
||||
it 'invalid with .' do
|
||||
expect(Tag.new(name: '.abcdef123')).to_not be_valid
|
||||
expect(described_class.new(name: '.abcdef123')).not_to be_valid
|
||||
end
|
||||
|
||||
it 'invalid with spaces' do
|
||||
expect(Tag.new(name: 'hello world')).to_not be_valid
|
||||
expect(described_class.new(name: 'hello world')).not_to be_valid
|
||||
end
|
||||
|
||||
it 'valid with aesthetic' do
|
||||
expect(Tag.new(name: 'aesthetic')).to be_valid
|
||||
expect(described_class.new(name: 'aesthetic')).to be_valid
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -62,6 +63,10 @@ RSpec.describe Tag, type: :model do
|
|||
expect(subject.match('hello #one·two·three').to_s).to eq ' #one·two·three'
|
||||
end
|
||||
|
||||
it 'matches ・unicode in ぼっち・ざ・ろっく correctly' do
|
||||
expect(subject.match('testing #ぼっち・ざ・ろっく').to_s).to eq ' #ぼっち・ざ・ろっく'
|
||||
end
|
||||
|
||||
it 'matches ZWNJ' do
|
||||
expect(subject.match('just add #نرمافزار and').to_s).to eq ' #نرمافزار'
|
||||
end
|
||||
|
@ -89,44 +94,46 @@ RSpec.describe Tag, type: :model do
|
|||
describe '.find_normalized' do
|
||||
it 'returns tag for a multibyte case-insensitive name' do
|
||||
upcase_string = 'abcABCabcABCやゆよ'
|
||||
downcase_string = 'abcabcabcabcやゆよ';
|
||||
downcase_string = 'abcabcabcabcやゆよ'
|
||||
|
||||
tag = Fabricate(:tag, name: HashtagNormalizer.new.normalize(downcase_string))
|
||||
expect(Tag.find_normalized(upcase_string)).to eq tag
|
||||
expect(described_class.find_normalized(upcase_string)).to eq tag
|
||||
end
|
||||
end
|
||||
|
||||
describe '.matches_name' do
|
||||
it 'returns tags for multibyte case-insensitive names' do
|
||||
upcase_string = 'abcABCabcABCやゆよ'
|
||||
downcase_string = 'abcabcabcabcやゆよ';
|
||||
downcase_string = 'abcabcabcabcやゆよ'
|
||||
|
||||
tag = Fabricate(:tag, name: HashtagNormalizer.new.normalize(downcase_string))
|
||||
expect(Tag.matches_name(upcase_string)).to eq [tag]
|
||||
expect(described_class.matches_name(upcase_string)).to eq [tag]
|
||||
end
|
||||
|
||||
it 'uses the LIKE operator' do
|
||||
expect(Tag.matches_name('100%abc').to_sql).to eq %q[SELECT "tags".* FROM "tags" WHERE LOWER("tags"."name") LIKE LOWER('100abc%')]
|
||||
result = %q[SELECT "tags".* FROM "tags" WHERE LOWER("tags"."name") LIKE LOWER('100abc%')]
|
||||
expect(described_class.matches_name('100%abc').to_sql).to eq result
|
||||
end
|
||||
end
|
||||
|
||||
describe '.matching_name' do
|
||||
it 'returns tags for multibyte case-insensitive names' do
|
||||
upcase_string = 'abcABCabcABCやゆよ'
|
||||
downcase_string = 'abcabcabcabcやゆよ';
|
||||
downcase_string = 'abcabcabcabcやゆよ'
|
||||
|
||||
tag = Fabricate(:tag, name: HashtagNormalizer.new.normalize(downcase_string))
|
||||
expect(Tag.matching_name(upcase_string)).to eq [tag]
|
||||
expect(described_class.matching_name(upcase_string)).to eq [tag]
|
||||
end
|
||||
end
|
||||
|
||||
describe '.find_or_create_by_names' do
|
||||
it 'runs a passed block once per tag regardless of duplicates' do
|
||||
upcase_string = 'abcABCabcABCやゆよ'
|
||||
downcase_string = 'abcabcabcabcやゆよ';
|
||||
count = 0
|
||||
let(:upcase_string) { 'abcABCabcABCやゆよ' }
|
||||
let(:downcase_string) { 'abcabcabcabcやゆよ' }
|
||||
|
||||
Tag.find_or_create_by_names([upcase_string, downcase_string]) do |tag|
|
||||
it 'runs a passed block once per tag regardless of duplicates' do
|
||||
count = 0
|
||||
|
||||
described_class.find_or_create_by_names([upcase_string, downcase_string]) do |_tag|
|
||||
count += 1
|
||||
end
|
||||
|
||||
|
@ -136,28 +143,28 @@ RSpec.describe Tag, type: :model do
|
|||
|
||||
describe '.search_for' do
|
||||
it 'finds tag records with matching names' do
|
||||
tag = Fabricate(:tag, name: "match")
|
||||
_miss_tag = Fabricate(:tag, name: "miss")
|
||||
tag = Fabricate(:tag, name: 'match')
|
||||
_miss_tag = Fabricate(:tag, name: 'miss')
|
||||
|
||||
results = Tag.search_for("match")
|
||||
results = described_class.search_for('match')
|
||||
|
||||
expect(results).to eq [tag]
|
||||
end
|
||||
|
||||
it 'finds tag records in case insensitive' do
|
||||
tag = Fabricate(:tag, name: "MATCH")
|
||||
_miss_tag = Fabricate(:tag, name: "miss")
|
||||
tag = Fabricate(:tag, name: 'MATCH')
|
||||
_miss_tag = Fabricate(:tag, name: 'miss')
|
||||
|
||||
results = Tag.search_for("match")
|
||||
results = described_class.search_for('match')
|
||||
|
||||
expect(results).to eq [tag]
|
||||
end
|
||||
|
||||
it 'finds the exact matching tag as the first item' do
|
||||
similar_tag = Fabricate(:tag, name: "matchlater", reviewed_at: Time.now.utc)
|
||||
tag = Fabricate(:tag, name: "match", reviewed_at: Time.now.utc)
|
||||
similar_tag = Fabricate(:tag, name: 'matchlater', reviewed_at: Time.now.utc)
|
||||
tag = Fabricate(:tag, name: 'match', reviewed_at: Time.now.utc)
|
||||
|
||||
results = Tag.search_for("match")
|
||||
results = described_class.search_for('match')
|
||||
|
||||
expect(results).to eq [tag, similar_tag]
|
||||
end
|
||||
|
|
|
@ -13,6 +13,8 @@ RSpec.describe SuspendAccountService, type: :service do
|
|||
|
||||
local_follower.follow!(account)
|
||||
list.accounts << account
|
||||
|
||||
account.suspend!
|
||||
end
|
||||
|
||||
it "unmerges from local followers' feeds" do
|
||||
|
@ -21,8 +23,8 @@ RSpec.describe SuspendAccountService, type: :service do
|
|||
expect(FeedManager.instance).to have_received(:unmerge_from_list).with(account, list)
|
||||
end
|
||||
|
||||
it 'marks account as suspended' do
|
||||
expect { subject }.to change { account.suspended? }.from(false).to(true)
|
||||
it 'does not change the “suspended” flag' do
|
||||
expect { subject }.to_not change { account.suspended? }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ RSpec.describe UnsuspendAccountService, type: :service do
|
|||
local_follower.follow!(account)
|
||||
list.accounts << account
|
||||
|
||||
account.suspend!(origin: :local)
|
||||
account.unsuspend!
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -30,8 +30,8 @@ RSpec.describe UnsuspendAccountService, type: :service do
|
|||
stub_request(:post, 'https://bob.com/inbox').to_return(status: 201)
|
||||
end
|
||||
|
||||
it 'marks account as unsuspended' do
|
||||
expect { subject }.to change { account.suspended? }.from(true).to(false)
|
||||
it 'does not change the “suspended” flag' do
|
||||
expect { subject }.to_not change { account.suspended? }
|
||||
end
|
||||
|
||||
include_examples 'common behavior' do
|
||||
|
@ -83,8 +83,8 @@ RSpec.describe UnsuspendAccountService, type: :service do
|
|||
expect(FeedManager.instance).to have_received(:merge_into_list).with(account, list)
|
||||
end
|
||||
|
||||
it 'marks account as unsuspended' do
|
||||
expect { subject }.to change { account.suspended? }.from(true).to(false)
|
||||
it 'does not change the “suspended” flag' do
|
||||
expect { subject }.to_not change { account.suspended? }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -107,8 +107,8 @@ RSpec.describe UnsuspendAccountService, type: :service do
|
|||
expect(FeedManager.instance).to_not have_received(:merge_into_list).with(account, list)
|
||||
end
|
||||
|
||||
it 'does not mark the account as unsuspended' do
|
||||
expect { subject }.not_to change { account.suspended? }
|
||||
it 'marks account as suspended' do
|
||||
expect { subject }.to change { account.suspended? }.from(false).to(true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
253
yarn.lock
253
yarn.lock
|
@ -2245,11 +2245,6 @@ ansi-regex@^5.0.0, ansi-regex@^5.0.1:
|
|||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-styles@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
|
||||
integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=
|
||||
|
||||
ansi-styles@^3.2.0, ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
|
||||
|
@ -2515,10 +2510,10 @@ axe-core@^4.4.3:
|
|||
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.3.tgz#11c74d23d5013c0fa5d183796729bc3482bd2f6f"
|
||||
integrity sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w==
|
||||
|
||||
axios@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.1.tgz#44cf04a3c9f0c2252ebd85975361c026cb9f864a"
|
||||
integrity sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A==
|
||||
axios@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.2.tgz#72681724c6e6a43a9fea860fc558127dbe32f9f1"
|
||||
integrity sha512-bz/J4gS2S3I7mpN/YZfGFTqhXTYzRho8Ay38w2otuuDR322KzFIWm/4W2K6gIwvWaws5n+mnb7D1lN9uD+QH6Q==
|
||||
dependencies:
|
||||
follow-redirects "^1.15.0"
|
||||
form-data "^4.0.0"
|
||||
|
@ -3105,17 +3100,6 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001400:
|
|||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001414.tgz"
|
||||
integrity sha512-t55jfSaWjCdocnFdKQoO+d2ct9C59UZg4dY3OnUlSZ447r8pUtIKdp0hpAzrGFultmTC+Us+KpKi4GZl/LXlFg==
|
||||
|
||||
chalk@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
|
||||
integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=
|
||||
dependencies:
|
||||
ansi-styles "^2.2.1"
|
||||
escape-string-regexp "^1.0.2"
|
||||
has-ansi "^2.0.0"
|
||||
strip-ansi "^3.0.0"
|
||||
supports-color "^2.0.0"
|
||||
|
||||
chalk@^2.0.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2:
|
||||
version "2.4.2"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
||||
|
@ -3546,10 +3530,10 @@ cosmiconfig@^6.0.0:
|
|||
path-type "^4.0.0"
|
||||
yaml "^1.7.2"
|
||||
|
||||
cosmiconfig@^7.0.0, cosmiconfig@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d"
|
||||
integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==
|
||||
cosmiconfig@^7.0.0, cosmiconfig@^7.1.0:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6"
|
||||
integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==
|
||||
dependencies:
|
||||
"@types/parse-json" "^4.0.0"
|
||||
import-fresh "^3.2.1"
|
||||
|
@ -3650,43 +3634,11 @@ css-declaration-sorter@^4.0.1:
|
|||
postcss "^7.0.1"
|
||||
timsort "^0.3.0"
|
||||
|
||||
css-font-size-keywords@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/css-font-size-keywords/-/css-font-size-keywords-1.0.0.tgz#854875ace9aca6a8d2ee0d345a44aae9bb6db6cb"
|
||||
integrity sha1-hUh1rOmspqjS7g00WkSq6btttss=
|
||||
|
||||
css-font-stretch-keywords@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/css-font-stretch-keywords/-/css-font-stretch-keywords-1.0.1.tgz#50cee9b9ba031fb5c952d4723139f1e107b54b10"
|
||||
integrity sha1-UM7puboDH7XJUtRyMTnx4Qe1SxA=
|
||||
|
||||
css-font-style-keywords@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/css-font-style-keywords/-/css-font-style-keywords-1.0.1.tgz#5c3532813f63b4a1de954d13cea86ab4333409e4"
|
||||
integrity sha1-XDUygT9jtKHelU0TzqhqtDM0CeQ=
|
||||
|
||||
css-font-weight-keywords@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/css-font-weight-keywords/-/css-font-weight-keywords-1.0.0.tgz#9bc04671ac85bc724b574ef5d3ac96b0d604fd97"
|
||||
integrity sha1-m8BGcayFvHJLV07106yWsNYE/Zc=
|
||||
|
||||
css-functions-list@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/css-functions-list/-/css-functions-list-3.1.0.tgz#cf5b09f835ad91a00e5959bcfc627cd498e1321b"
|
||||
integrity sha512-/9lCvYZaUbBGvYUgYGFJ4dcYiyqdhSjG7IPVluoV8A1ILjkF7ilmhp1OGUz8n+nmBcu0RNrQAzgD8B6FJbrt2w==
|
||||
|
||||
css-global-keywords@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/css-global-keywords/-/css-global-keywords-1.0.1.tgz#72a9aea72796d019b1d2a3252de4e5aaa37e4a69"
|
||||
integrity sha1-cqmupyeW0Bmx0qMlLeTlqqN+Smk=
|
||||
|
||||
css-list-helpers@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/css-list-helpers/-/css-list-helpers-1.0.1.tgz#fff57192202db83240c41686f919e449a7024f7d"
|
||||
integrity sha1-//VxkiAtuDJAxBaG+RnkSacCT30=
|
||||
dependencies:
|
||||
tcomb "^2.5.0"
|
||||
|
||||
css-loader@^5.2.7:
|
||||
version "5.2.7"
|
||||
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.2.7.tgz#9b9f111edf6fb2be5dc62525644cbc9c232064ae"
|
||||
|
@ -3718,11 +3670,6 @@ css-select@^2.0.0:
|
|||
domutils "^1.7.0"
|
||||
nth-check "^1.0.2"
|
||||
|
||||
css-system-font-keywords@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/css-system-font-keywords/-/css-system-font-keywords-1.0.0.tgz#85c6f086aba4eb32c571a3086affc434b84823ed"
|
||||
integrity sha1-hcbwhquk6zLFcaMIav/ENLhII+0=
|
||||
|
||||
css-tree@1.0.0-alpha.37:
|
||||
version "1.0.0-alpha.37"
|
||||
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22"
|
||||
|
@ -4415,7 +4362,7 @@ escape-html@^1.0.3, escape-html@~1.0.3:
|
|||
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
||||
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
|
||||
|
||||
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
|
||||
escape-string-regexp@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||
|
@ -5368,23 +5315,11 @@ hard-rejection@^2.1.0:
|
|||
resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883"
|
||||
integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==
|
||||
|
||||
has-ansi@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
|
||||
integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=
|
||||
dependencies:
|
||||
ansi-regex "^2.0.0"
|
||||
|
||||
has-bigints@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa"
|
||||
integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==
|
||||
|
||||
has-flag@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
|
||||
integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=
|
||||
|
||||
has-flag@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
|
||||
|
@ -5699,10 +5634,10 @@ ignore@^4.0.6:
|
|||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
|
||||
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
|
||||
|
||||
ignore@^5.2.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
|
||||
integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==
|
||||
ignore@^5.2.0, ignore@^5.2.1:
|
||||
version "5.2.4"
|
||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
|
||||
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
|
||||
|
||||
immutable@^4.0.0, immutable@^4.2.1:
|
||||
version "4.2.1"
|
||||
|
@ -6725,11 +6660,6 @@ jest@^29.3.1:
|
|||
import-local "^3.0.2"
|
||||
jest-cli "^29.3.1"
|
||||
|
||||
js-base64@^2.1.9:
|
||||
version "2.6.4"
|
||||
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4"
|
||||
integrity sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==
|
||||
|
||||
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
|
@ -6835,9 +6765,9 @@ json3@^3.3.3:
|
|||
integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==
|
||||
|
||||
json5@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
|
||||
integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593"
|
||||
integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==
|
||||
dependencies:
|
||||
minimist "^1.2.0"
|
||||
|
||||
|
@ -6905,10 +6835,10 @@ klona@^2.0.4:
|
|||
resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0"
|
||||
integrity sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==
|
||||
|
||||
known-css-properties@^0.25.0:
|
||||
version "0.25.0"
|
||||
resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.25.0.tgz#6ebc4d4b412f602e5cfbeb4086bd544e34c0a776"
|
||||
integrity sha512-b0/9J1O9Jcyik1GC6KC42hJ41jKwdO/Mq8Mdo5sYN+IuRTXs2YFHZC3kZSx6ueusqa95x3wLYe/ytKjbAfGixA==
|
||||
known-css-properties@^0.26.0:
|
||||
version "0.26.0"
|
||||
resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.26.0.tgz#008295115abddc045a9f4ed7e2a84dc8b3a77649"
|
||||
integrity sha512-5FZRzrZzNTBruuurWpvZnvP9pum+fe0HcK8z/ooo+U+Hmp4vtbyp1/QDsqmufirXy4egGzbaH/y2uCZf+6W5Kg==
|
||||
|
||||
language-subtag-registry@~0.3.2:
|
||||
version "0.3.20"
|
||||
|
@ -7682,11 +7612,6 @@ object-copy@^0.1.0:
|
|||
define-property "^0.2.5"
|
||||
kind-of "^3.0.3"
|
||||
|
||||
object-fit-images@^3.2.3:
|
||||
version "3.2.4"
|
||||
resolved "https://registry.yarnpkg.com/object-fit-images/-/object-fit-images-3.2.4.tgz#6c299d38fdf207746e5d2d46c2877f6f25d15b52"
|
||||
integrity sha512-G+7LzpYfTfqUyrZlfrou/PLLLAPNC52FTy5y1CBywX+1/FkxIloOyQXBmZ3Zxa2AWO+lMF0JTuvqbr7G5e5CWg==
|
||||
|
||||
object-inspect@^1.12.2, object-inspect@^1.9.0:
|
||||
version "1.12.2"
|
||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
|
||||
|
@ -7969,21 +7894,6 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.5:
|
|||
pbkdf2 "^3.0.3"
|
||||
safe-buffer "^5.1.1"
|
||||
|
||||
parse-css-font@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/parse-css-font/-/parse-css-font-2.0.2.tgz#7b60b060705a25a9b90b7f0ed493e5823248a652"
|
||||
integrity sha1-e2CwYHBaJam5C38O1JPlgjJIplI=
|
||||
dependencies:
|
||||
css-font-size-keywords "^1.0.0"
|
||||
css-font-stretch-keywords "^1.0.1"
|
||||
css-font-style-keywords "^1.0.1"
|
||||
css-font-weight-keywords "^1.0.0"
|
||||
css-global-keywords "^1.0.1"
|
||||
css-list-helpers "^1.0.1"
|
||||
css-system-font-keywords "^1.0.0"
|
||||
tcomb "^2.5.0"
|
||||
unquote "^1.1.0"
|
||||
|
||||
parse-json@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
|
||||
|
@ -8483,15 +8393,6 @@ postcss-normalize-whitespace@^4.0.2:
|
|||
postcss "^7.0.0"
|
||||
postcss-value-parser "^3.0.0"
|
||||
|
||||
postcss-object-fit-images@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss-object-fit-images/-/postcss-object-fit-images-1.1.2.tgz#8b773043db14672ef6cd6f2cb1f0d8b26a9f573b"
|
||||
integrity sha1-i3cwQ9sUZy72zW8ssfDYsmqfVzs=
|
||||
dependencies:
|
||||
parse-css-font "^2.0.2"
|
||||
postcss "^5.0.16"
|
||||
quote "^0.4.0"
|
||||
|
||||
postcss-ordered-values@^4.1.2:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee"
|
||||
|
@ -8545,10 +8446,10 @@ postcss-selector-parser@^3.0.0:
|
|||
indexes-of "^1.0.1"
|
||||
uniq "^1.0.1"
|
||||
|
||||
postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.6:
|
||||
version "6.0.10"
|
||||
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d"
|
||||
integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==
|
||||
postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.6:
|
||||
version "6.0.11"
|
||||
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz#2e41dc39b7ad74046e1615185185cd0b17d0c8dc"
|
||||
integrity sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==
|
||||
dependencies:
|
||||
cssesc "^3.0.0"
|
||||
util-deprecate "^1.0.2"
|
||||
|
@ -8581,16 +8482,6 @@ postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0, postcss-value-parser@^
|
|||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
|
||||
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
|
||||
|
||||
postcss@^5.0.16:
|
||||
version "5.2.18"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5"
|
||||
integrity sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==
|
||||
dependencies:
|
||||
chalk "^1.1.3"
|
||||
js-base64 "^2.1.9"
|
||||
source-map "^0.5.6"
|
||||
supports-color "^3.2.3"
|
||||
|
||||
postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.27, postcss@^7.0.32:
|
||||
version "7.0.32"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d"
|
||||
|
@ -8600,7 +8491,7 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.27, postcss@^7.0.32:
|
|||
source-map "^0.6.1"
|
||||
supports-color "^6.1.0"
|
||||
|
||||
postcss@^8.2.15, postcss@^8.4.17, postcss@^8.4.20:
|
||||
postcss@^8.2.15, postcss@^8.4.19, postcss@^8.4.20:
|
||||
version "8.4.20"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.20.tgz#64c52f509644cecad8567e949f4081d98349dc56"
|
||||
integrity sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==
|
||||
|
@ -8846,11 +8737,6 @@ quick-lru@^4.0.1:
|
|||
resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f"
|
||||
integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==
|
||||
|
||||
quote@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/quote/-/quote-0.4.0.tgz#10839217f6c1362b89194044d29b233fd7f32f01"
|
||||
integrity sha1-EIOSF/bBNiuJGUBE0psjP9fzLwE=
|
||||
|
||||
raf@^3.1.0, raf@^3.4.1:
|
||||
version "3.4.1"
|
||||
resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39"
|
||||
|
@ -10261,7 +10147,7 @@ stringz@^2.1.0:
|
|||
dependencies:
|
||||
char-regex "^1.0.2"
|
||||
|
||||
strip-ansi@^3.0.0, strip-ansi@^3.0.1:
|
||||
strip-ansi@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
|
||||
integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
|
||||
|
@ -10333,34 +10219,34 @@ stylehacks@^4.0.0:
|
|||
postcss "^7.0.0"
|
||||
postcss-selector-parser "^3.0.0"
|
||||
|
||||
stylelint-config-recommended-scss@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-7.0.0.tgz#db16b6ae6055e72e3398916c0f13d6eb685902a2"
|
||||
integrity sha512-rGz1J4rMAyJkvoJW4hZasuQBB7y9KIrShb20l9DVEKKZSEi1HAy0vuNlR8HyCKy/jveb/BdaQFcoiYnmx4HoiA==
|
||||
stylelint-config-recommended-scss@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-8.0.0.tgz#1c1e93e619fe2275d4c1067928d92e0614f7d64f"
|
||||
integrity sha512-BxjxEzRaZoQb7Iinc3p92GS6zRdRAkIuEu2ZFLTxJK2e1AIcCb5B5MXY9KOXdGTnYFZ+KKx6R4Fv9zU6CtMYPQ==
|
||||
dependencies:
|
||||
postcss-scss "^4.0.2"
|
||||
stylelint-config-recommended "^8.0.0"
|
||||
stylelint-config-recommended "^9.0.0"
|
||||
stylelint-scss "^4.0.0"
|
||||
|
||||
stylelint-config-recommended@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-8.0.0.tgz#7736be9984246177f017c39ec7b1cd0f19ae9117"
|
||||
integrity sha512-IK6dWvE000+xBv9jbnHOnBq01gt6HGVB2ZTsot+QsMpe82doDQ9hvplxfv4YnpEuUwVGGd9y6nbaAnhrjcxhZQ==
|
||||
stylelint-config-recommended@^9.0.0:
|
||||
version "9.0.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-9.0.0.tgz#1c9e07536a8cd875405f8ecef7314916d94e7e40"
|
||||
integrity sha512-9YQSrJq4NvvRuTbzDsWX3rrFOzOlYBmZP+o513BJN/yfEmGSr0AxdvrWs0P/ilSpVV/wisamAHu5XSk8Rcf4CQ==
|
||||
|
||||
stylelint-config-standard-scss@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-config-standard-scss/-/stylelint-config-standard-scss-5.0.0.tgz#afc5e43c73e7a15875b8f30f54204b01a2634743"
|
||||
integrity sha512-zoXLibojHZYPFjtkc4STZtAJ2yGTq3Bb4MYO0oiyO6f/vNxDKRcSDZYoqN260Gv2eD5niQIr1/kr5SXlFj9kcQ==
|
||||
stylelint-config-standard-scss@^6.1.0:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-config-standard-scss/-/stylelint-config-standard-scss-6.1.0.tgz#a6cddd2a9430578b92fc89726a59474d5548a444"
|
||||
integrity sha512-iZ2B5kQT2G3rUzx+437cEpdcnFOQkwnwqXuY8Z0QUwIHQVE8mnYChGAquyKFUKZRZ0pRnrciARlPaR1RBtPb0Q==
|
||||
dependencies:
|
||||
stylelint-config-recommended-scss "^7.0.0"
|
||||
stylelint-config-standard "^26.0.0"
|
||||
stylelint-config-recommended-scss "^8.0.0"
|
||||
stylelint-config-standard "^29.0.0"
|
||||
|
||||
stylelint-config-standard@^26.0.0:
|
||||
version "26.0.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-config-standard/-/stylelint-config-standard-26.0.0.tgz#4701b8d582d34120eec7d260ba779e4c2d953635"
|
||||
integrity sha512-hUuB7LaaqM8abvkOO84wh5oYSkpXgTzHu2Zza6e7mY+aOmpNTjoFBRxSLlzY0uAOMWEFx0OMKzr+reG1BUtcqQ==
|
||||
stylelint-config-standard@^29.0.0:
|
||||
version "29.0.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-config-standard/-/stylelint-config-standard-29.0.0.tgz#4cc0e0f05512a39bb8b8e97853247d3a95d66fa2"
|
||||
integrity sha512-uy8tZLbfq6ZrXy4JKu3W+7lYLgRQBxYTUUB88vPgQ+ZzAxdrvcaSUW9hOMNLYBnwH+9Kkj19M2DHdZ4gKwI7tg==
|
||||
dependencies:
|
||||
stylelint-config-recommended "^8.0.0"
|
||||
stylelint-config-recommended "^9.0.0"
|
||||
|
||||
stylelint-scss@^4.0.0:
|
||||
version "4.2.0"
|
||||
|
@ -10373,15 +10259,15 @@ stylelint-scss@^4.0.0:
|
|||
postcss-selector-parser "^6.0.6"
|
||||
postcss-value-parser "^4.1.0"
|
||||
|
||||
stylelint@^14.14.0:
|
||||
version "14.14.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-14.14.0.tgz#1acb52497c9a921f23f9c4014d4e0ee6eba768d0"
|
||||
integrity sha512-yUI+4xXfPHVnueYddSQ/e1GuEA/2wVhWQbGj16AmWLtQJtn28lVxfS4b0CsWyVRPgd3Auzi0NXOthIEUhtQmmA==
|
||||
stylelint@^14.16.1:
|
||||
version "14.16.1"
|
||||
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-14.16.1.tgz#b911063530619a1bbe44c2b875fd8181ebdc742d"
|
||||
integrity sha512-ErlzR/T3hhbV+a925/gbfc3f3Fep9/bnspMiJPorfGEmcBbXdS+oo6LrVtoUZ/w9fqD6o6k7PtUlCOsCRdjX/A==
|
||||
dependencies:
|
||||
"@csstools/selector-specificity" "^2.0.2"
|
||||
balanced-match "^2.0.0"
|
||||
colord "^2.9.3"
|
||||
cosmiconfig "^7.0.1"
|
||||
cosmiconfig "^7.1.0"
|
||||
css-functions-list "^3.1.0"
|
||||
debug "^4.3.4"
|
||||
fast-glob "^3.2.12"
|
||||
|
@ -10391,21 +10277,21 @@ stylelint@^14.14.0:
|
|||
globby "^11.1.0"
|
||||
globjoin "^0.1.4"
|
||||
html-tags "^3.2.0"
|
||||
ignore "^5.2.0"
|
||||
ignore "^5.2.1"
|
||||
import-lazy "^4.0.0"
|
||||
imurmurhash "^0.1.4"
|
||||
is-plain-object "^5.0.0"
|
||||
known-css-properties "^0.25.0"
|
||||
known-css-properties "^0.26.0"
|
||||
mathml-tag-names "^2.1.3"
|
||||
meow "^9.0.0"
|
||||
micromatch "^4.0.5"
|
||||
normalize-path "^3.0.0"
|
||||
picocolors "^1.0.0"
|
||||
postcss "^8.4.17"
|
||||
postcss "^8.4.19"
|
||||
postcss-media-query-parser "^0.2.3"
|
||||
postcss-resolve-nested-selector "^0.1.1"
|
||||
postcss-safe-parser "^6.0.0"
|
||||
postcss-selector-parser "^6.0.10"
|
||||
postcss-selector-parser "^6.0.11"
|
||||
postcss-value-parser "^4.2.0"
|
||||
resolve-from "^5.0.0"
|
||||
string-width "^4.2.3"
|
||||
|
@ -10413,7 +10299,7 @@ stylelint@^14.14.0:
|
|||
style-search "^0.1.0"
|
||||
supports-hyperlinks "^2.3.0"
|
||||
svg-tags "^1.0.0"
|
||||
table "^6.8.0"
|
||||
table "^6.8.1"
|
||||
v8-compile-cache "^2.3.0"
|
||||
write-file-atomic "^4.0.2"
|
||||
|
||||
|
@ -10427,18 +10313,6 @@ substring-trie@^1.0.2:
|
|||
resolved "https://registry.yarnpkg.com/substring-trie/-/substring-trie-1.0.2.tgz#7b42592391628b4f2cb17365c6cce4257c7b7af5"
|
||||
integrity sha1-e0JZI5Fii08ssXNlxszkJXx7evU=
|
||||
|
||||
supports-color@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
|
||||
integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
|
||||
|
||||
supports-color@^3.2.3:
|
||||
version "3.2.3"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
|
||||
integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=
|
||||
dependencies:
|
||||
has-flag "^1.0.0"
|
||||
|
||||
supports-color@^5.3.0:
|
||||
version "5.5.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
||||
|
@ -10509,10 +10383,10 @@ symbol-tree@^3.2.4:
|
|||
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
|
||||
integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==
|
||||
|
||||
table@^6.0.9, table@^6.8.0:
|
||||
version "6.8.0"
|
||||
resolved "https://registry.yarnpkg.com/table/-/table-6.8.0.tgz#87e28f14fa4321c3377ba286f07b79b281a3b3ca"
|
||||
integrity sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==
|
||||
table@^6.0.9, table@^6.8.1:
|
||||
version "6.8.1"
|
||||
resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf"
|
||||
integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==
|
||||
dependencies:
|
||||
ajv "^8.0.1"
|
||||
lodash.truncate "^4.4.2"
|
||||
|
@ -10537,11 +10411,6 @@ tar@^6.0.2:
|
|||
mkdirp "^1.0.3"
|
||||
yallist "^4.0.0"
|
||||
|
||||
tcomb@^2.5.0:
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/tcomb/-/tcomb-2.7.0.tgz#10d62958041669a5d53567b9a4ee8cde22b1c2b0"
|
||||
integrity sha1-ENYpWAQWaaXVNWe5pO6M3iKxwrA=
|
||||
|
||||
temp-dir@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e"
|
||||
|
@ -10981,7 +10850,7 @@ unpipe@1.0.0, unpipe@~1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
|
||||
integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
|
||||
|
||||
unquote@^1.1.0, unquote@~1.1.1:
|
||||
unquote@~1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544"
|
||||
integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=
|
||||
|
|
Loading…
Reference in a new issue