Merge pull request #1079 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
This commit is contained in:
commit
58946fef3c
2
Gemfile
2
Gemfile
@ -131,7 +131,7 @@ group :development do
|
||||
gem 'letter_opener', '~> 1.7'
|
||||
gem 'letter_opener_web', '~> 1.3'
|
||||
gem 'memory_profiler'
|
||||
gem 'rubocop', '~> 0.70', require: false
|
||||
gem 'rubocop', '~> 0.71', require: false
|
||||
gem 'brakeman', '~> 4.5', require: false
|
||||
gem 'bundler-audit', '~> 0.6', require: false
|
||||
gem 'scss_lint', '~> 0.58', require: false
|
||||
|
10
Gemfile.lock
10
Gemfile.lock
@ -481,7 +481,7 @@ GEM
|
||||
rdf-normalize (0.3.3)
|
||||
rdf (>= 2.2, < 4.0)
|
||||
redcarpet (3.4.0)
|
||||
redis (4.1.1)
|
||||
redis (4.1.2)
|
||||
redis-actionpack (5.0.2)
|
||||
actionpack (>= 4.0, < 6)
|
||||
redis-rack (>= 1, < 3)
|
||||
@ -530,14 +530,14 @@ GEM
|
||||
rspec-core (~> 3.0, >= 3.0.0)
|
||||
sidekiq (>= 2.4.0)
|
||||
rspec-support (3.8.0)
|
||||
rubocop (0.70.0)
|
||||
rubocop (0.71.0)
|
||||
jaro_winkler (~> 1.5.1)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 2.6)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 1.7)
|
||||
ruby-progressbar (1.10.0)
|
||||
ruby-progressbar (1.10.1)
|
||||
ruby-saml (1.9.0)
|
||||
nokogiri (>= 1.5.10)
|
||||
rufus-scheduler (3.5.2)
|
||||
@ -636,7 +636,7 @@ GEM
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff
|
||||
webpacker (4.0.4)
|
||||
webpacker (4.0.6)
|
||||
activesupport (>= 4.2)
|
||||
rack-proxy (>= 0.6.1)
|
||||
railties (>= 4.2)
|
||||
@ -750,7 +750,7 @@ DEPENDENCIES
|
||||
rqrcode (~> 0.10)
|
||||
rspec-rails (~> 3.8)
|
||||
rspec-sidekiq (~> 3.0)
|
||||
rubocop (~> 0.70)
|
||||
rubocop (~> 0.71)
|
||||
sanitize (~> 5.0)
|
||||
scss_lint (~> 0.58)
|
||||
sidekiq (~> 5.2)
|
||||
|
@ -70,6 +70,7 @@
|
||||
border-radius: 4px;
|
||||
@include avatar-radius();
|
||||
background: darken($ui-base-color, 8%);
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
|
||||
}
|
||||
|
||||
render () {
|
||||
const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus } = this.props;
|
||||
const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, children } = this.props;
|
||||
const { suggestionsHidden } = this.state;
|
||||
const style = { direction: 'ltr' };
|
||||
|
||||
@ -197,34 +197,38 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
|
||||
style.direction = 'rtl';
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='autosuggest-textarea'>
|
||||
<label>
|
||||
<span style={{ display: 'none' }}>{placeholder}</span>
|
||||
|
||||
<Textarea
|
||||
inputRef={this.setTextarea}
|
||||
className='autosuggest-textarea__textarea'
|
||||
disabled={disabled}
|
||||
placeholder={placeholder}
|
||||
autoFocus={autoFocus}
|
||||
value={value}
|
||||
onChange={this.onChange}
|
||||
onKeyDown={this.onKeyDown}
|
||||
onKeyUp={onKeyUp}
|
||||
onFocus={this.onFocus}
|
||||
onBlur={this.onBlur}
|
||||
onPaste={this.onPaste}
|
||||
style={style}
|
||||
aria-autocomplete='list'
|
||||
/>
|
||||
</label>
|
||||
return [
|
||||
<div className='compose-form__autosuggest-wrapper'>
|
||||
<div className='autosuggest-textarea'>
|
||||
<label>
|
||||
<span style={{ display: 'none' }}>{placeholder}</span>
|
||||
|
||||
<Textarea
|
||||
inputRef={this.setTextarea}
|
||||
className='autosuggest-textarea__textarea'
|
||||
disabled={disabled}
|
||||
placeholder={placeholder}
|
||||
autoFocus={autoFocus}
|
||||
value={value}
|
||||
onChange={this.onChange}
|
||||
onKeyDown={this.onKeyDown}
|
||||
onKeyUp={onKeyUp}
|
||||
onFocus={this.onFocus}
|
||||
onBlur={this.onBlur}
|
||||
onPaste={this.onPaste}
|
||||
style={style}
|
||||
aria-autocomplete='list'
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
{children}
|
||||
</div>,
|
||||
<div className='autosuggest-textarea__suggestions-wrapper'>
|
||||
<div className={`autosuggest-textarea__suggestions ${suggestionsHidden || suggestions.isEmpty() ? '' : 'autosuggest-textarea__suggestions--visible'}`}>
|
||||
{suggestions.map(this.renderSuggestion)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
</div>,
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -201,29 +201,29 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='compose-form__autosuggest-wrapper'>
|
||||
<AutosuggestTextarea
|
||||
ref={this.setAutosuggestTextarea}
|
||||
placeholder={intl.formatMessage(messages.placeholder)}
|
||||
disabled={disabled}
|
||||
value={this.props.text}
|
||||
onChange={this.handleChange}
|
||||
suggestions={this.props.suggestions}
|
||||
onKeyDown={this.handleKeyDown}
|
||||
onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}
|
||||
onSuggestionsClearRequested={this.onSuggestionsClearRequested}
|
||||
onSuggestionSelected={this.onSuggestionSelected}
|
||||
onPaste={onPaste}
|
||||
autoFocus={!showSearch && !isMobile(window.innerWidth)}
|
||||
/>
|
||||
|
||||
<div className='emoji-picker-wrapper'>
|
||||
<EmojiPickerDropdown onPickEmoji={this.handleEmojiPick} />
|
||||
</div>
|
||||
|
||||
<div className='compose-form__modifiers'>
|
||||
<UploadFormContainer />
|
||||
<PollFormContainer />
|
||||
</div>
|
||||
<AutosuggestTextarea
|
||||
ref={this.setAutosuggestTextarea}
|
||||
placeholder={intl.formatMessage(messages.placeholder)}
|
||||
disabled={disabled}
|
||||
value={this.props.text}
|
||||
onChange={this.handleChange}
|
||||
suggestions={this.props.suggestions}
|
||||
onKeyDown={this.handleKeyDown}
|
||||
onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}
|
||||
onSuggestionsClearRequested={this.onSuggestionsClearRequested}
|
||||
onSuggestionSelected={this.onSuggestionSelected}
|
||||
onPaste={onPaste}
|
||||
autoFocus={!showSearch && !isMobile(window.innerWidth)}
|
||||
>
|
||||
<div className='compose-form__modifiers'>
|
||||
<UploadFormContainer />
|
||||
<PollFormContainer />
|
||||
</div>
|
||||
</AutosuggestTextarea>
|
||||
|
||||
<div className='compose-form__buttons-wrapper'>
|
||||
<div className='compose-form__buttons'>
|
||||
|
@ -9,9 +9,6 @@ const ComposePanel = () => (
|
||||
<SearchContainer openInRoute />
|
||||
<NavigationContainer />
|
||||
<ComposeFormContainer />
|
||||
|
||||
<div className='flex-spacer' />
|
||||
|
||||
<LinkFooter withHotkeys />
|
||||
</div>
|
||||
);
|
||||
|
@ -68,6 +68,7 @@
|
||||
margin: 0;
|
||||
border-radius: 4px;
|
||||
background: darken($ui-base-color, 8%);
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -333,14 +333,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
.emoji-picker-dropdown {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.compose-form__autosuggest-wrapper {
|
||||
position: relative;
|
||||
|
||||
.emoji-picker-dropdown {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.autosuggest-textarea,
|
||||
@ -355,7 +356,8 @@
|
||||
opacity: 0.0;
|
||||
|
||||
&.spoiler-input--visible {
|
||||
height: 47px;
|
||||
height: 36px;
|
||||
margin-bottom: 11px;
|
||||
opacity: 1.0;
|
||||
}
|
||||
}
|
||||
@ -406,6 +408,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
.emoji-picker-wrapper,
|
||||
.autosuggest-textarea__suggestions-wrapper {
|
||||
position: relative;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.autosuggest-textarea__suggestions {
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
@ -566,6 +574,7 @@
|
||||
border-radius: 0 0 4px 4px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex: 0 0 auto;
|
||||
|
||||
.compose-form__buttons {
|
||||
display: flex;
|
||||
@ -614,6 +623,7 @@
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
min-width: 0;
|
||||
flex: 0 0 auto;
|
||||
|
||||
.compose-form__publish-button-wrapper {
|
||||
overflow: hidden;
|
||||
@ -644,6 +654,9 @@
|
||||
margin-bottom: 10px;
|
||||
background: $ui-primary-color;
|
||||
padding: 10px;
|
||||
min-height: 23px;
|
||||
overflow-y: auto;
|
||||
flex: 0 2 auto;
|
||||
}
|
||||
|
||||
.reply-indicator__header {
|
||||
@ -1794,7 +1807,6 @@ a.account__display-name {
|
||||
height: 100%;
|
||||
|
||||
&__pane {
|
||||
flex: 1 1 auto;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
@ -2185,7 +2197,8 @@ a.account__display-name {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
height: calc(100% - 10px);
|
||||
overflow-y: hidden;
|
||||
|
||||
.search__input {
|
||||
line-height: 18px;
|
||||
@ -2201,14 +2214,33 @@ a.account__display-name {
|
||||
.navigation-bar {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
flex: 0 1 48px;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
.flex-spacer {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.compose-form {
|
||||
flex: 1;
|
||||
overflow-y: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 310px;
|
||||
padding-bottom: 71px;
|
||||
margin-bottom: -71px;
|
||||
}
|
||||
|
||||
.compose-form__autosuggest-wrapper {
|
||||
overflow-y: auto;
|
||||
background-color: $white;
|
||||
border-radius: 4px 4px 0 0;
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
|
||||
.autosuggest-textarea__textarea {
|
||||
max-height: 200px;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.compose-form__upload-thumbnail {
|
||||
@ -2218,6 +2250,9 @@ a.account__display-name {
|
||||
|
||||
.navigation-panel {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
height: calc(100% - 20px);
|
||||
overflow-y: auto;
|
||||
|
||||
hr {
|
||||
border: 0;
|
||||
|
@ -49,7 +49,7 @@ sk:
|
||||
few: Sledovateľov
|
||||
one: Sledovateľ
|
||||
other: Sledovatelia
|
||||
following: Sledovaní
|
||||
following: Následujem
|
||||
joined: Pridal/a sa v %{date}
|
||||
last_active: naposledy aktívny
|
||||
link_verified_on: Vlastníctvo tohto odkazu bolo skontrolované %{date}
|
||||
@ -214,7 +214,7 @@ sk:
|
||||
silence_account: "%{name} utíšil/a účet %{target}"
|
||||
suspend_account: "%{name} zablokoval/a účet používateľa %{target}"
|
||||
unassigned_report: "%{name} odobral/a report od %{target}"
|
||||
unsilence_account: "%{name} zrušil/a utíšenie účtu používateľa %{target}"
|
||||
unsilence_account: "%{name} zrušil/a stíšenie účtu používateľa %{target}"
|
||||
unsuspend_account: "%{name} zrušil/a blokovanie účtu používateľa %{target}"
|
||||
update_custom_emoji: "%{name} aktualizoval/a emoji %{target}"
|
||||
update_status: "%{name} aktualizoval/a status pre %{target}"
|
||||
|
@ -35,7 +35,7 @@ defaults: &defaults
|
||||
flavour: 'glitch'
|
||||
skin: 'default'
|
||||
aggregate_reblogs: true
|
||||
advanced_layout: true
|
||||
advanced_layout: false
|
||||
notification_emails:
|
||||
follow: false
|
||||
reblog: false
|
||||
|
@ -22,7 +22,6 @@ module.exports = {
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
includePaths: ['app/javascript'],
|
||||
fiber: require('fibers'),
|
||||
implementation: require('sass'),
|
||||
sourceMap: true,
|
||||
},
|
||||
|
@ -8,6 +8,6 @@ class CreateAccountModerationNotes < ActiveRecord::Migration[5.1]
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_foreign_key :account_moderation_notes, :accounts, column: :target_account_id
|
||||
safety_assured { add_foreign_key :account_moderation_notes, :accounts, column: :target_account_id }
|
||||
end
|
||||
end
|
||||
|
@ -1,5 +1,5 @@
|
||||
class AddForeignKeyToAccountModerationNotes < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
add_foreign_key :account_moderation_notes, :accounts
|
||||
safety_assured { add_foreign_key :account_moderation_notes, :accounts }
|
||||
end
|
||||
end
|
||||
|
@ -1,6 +1,6 @@
|
||||
class AddMovedToAccountIdToAccounts < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
add_column :accounts, :moved_to_account_id, :bigint, null: true, default: nil
|
||||
add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify
|
||||
safety_assured { add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify }
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,17 @@
|
||||
class PreserveOldLayoutForExistingUsers < ActiveRecord::Migration[5.2]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
# Assume that currently active users are already using the layout that they
|
||||
# want to use, therefore ensure that it is saved explicitly and not based
|
||||
# on the to-be-changed default
|
||||
|
||||
User.where(User.arel_table[:current_sign_in_at].gteq(1.month.ago)).find_each do |user|
|
||||
next if Setting.unscoped.where(thing_type: 'User', thing_id: user.id, var: 'advanced_layout').exists?
|
||||
user.settings.advanced_layout = true
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2019_05_19_130537) do
|
||||
ActiveRecord::Schema.define(version: 2019_05_29_143559) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
30
package.json
30
package.json
@ -73,8 +73,8 @@
|
||||
"@clusterws/cws": "^0.14.0",
|
||||
"array-includes": "^3.0.3",
|
||||
"atrament": "^0.2.3",
|
||||
"autoprefixer": "^9.4.10",
|
||||
"axios": "^0.18.0",
|
||||
"autoprefixer": "^9.5.1",
|
||||
"axios": "^0.19.0",
|
||||
"babel-loader": "^8.0.5",
|
||||
"babel-plugin-lodash": "^3.3.4",
|
||||
"babel-plugin-preval": "^3.0.1",
|
||||
@ -88,18 +88,16 @@
|
||||
"css-loader": "^2.1.1",
|
||||
"cssnano": "^4.1.10",
|
||||
"detect-passive-events": "^1.0.2",
|
||||
"dotenv": "^6.2.0",
|
||||
"dotenv": "^8.0.0",
|
||||
"emoji-mart": "Gargron/emoji-mart#build",
|
||||
"es6-symbol": "^3.1.1",
|
||||
"escape-html": "^1.0.3",
|
||||
"exif-js": "^2.3.0",
|
||||
"express": "^4.17.1",
|
||||
"favico.js": "^0.3.10",
|
||||
"fibers": "^3.1.1",
|
||||
"file-loader": "^3.0.1",
|
||||
"font-awesome": "^4.7.0",
|
||||
"glob": "^7.1.1",
|
||||
"history": "^4.7.2",
|
||||
"http-link-header": "^1.0.2",
|
||||
"immutable": "^3.8.2",
|
||||
"imports-loader": "^0.8.0",
|
||||
@ -117,15 +115,15 @@
|
||||
"npmlog": "^4.1.2",
|
||||
"object-assign": "^4.1.1",
|
||||
"object-fit-images": "^3.2.3",
|
||||
"object.values": "^1.0.4",
|
||||
"offline-plugin": "^5.0.6",
|
||||
"object.values": "^1.1.0",
|
||||
"offline-plugin": "^5.0.7",
|
||||
"path-complete-extname": "^1.0.0",
|
||||
"pg": "^6.4.0",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-object-fit-images": "^1.1.2",
|
||||
"prop-types": "^15.5.10",
|
||||
"punycode": "^2.1.0",
|
||||
"rails-ujs": "^5.2.2",
|
||||
"rails-ujs": "^5.2.3",
|
||||
"react": "^16.7.0",
|
||||
"react-dom": "^16.7.0",
|
||||
"react-hotkeys": "^1.1.4",
|
||||
@ -140,7 +138,7 @@
|
||||
"react-redux-loading-bar": "^4.0.8",
|
||||
"react-router-dom": "^4.1.1",
|
||||
"react-router-scroll-4": "^1.0.0-beta.1",
|
||||
"react-select": "^2.2.0",
|
||||
"react-select": "^2.4.4",
|
||||
"react-sparklines": "^1.7.0",
|
||||
"react-swipeable-views": "^0.13.0",
|
||||
"react-textarea-autosize": "^7.1.0",
|
||||
@ -153,7 +151,7 @@
|
||||
"requestidlecallback": "^0.3.0",
|
||||
"reselect": "^4.0.0",
|
||||
"rimraf": "^2.6.3",
|
||||
"sass": "^1.17.2",
|
||||
"sass": "^1.20.1",
|
||||
"sass-loader": "^7.0.3",
|
||||
"stringz": "^1.0.0",
|
||||
"substring-trie": "^1.0.2",
|
||||
@ -164,25 +162,25 @@
|
||||
"webpack": "^4.29.6",
|
||||
"webpack-assets-manifest": "^3.1.1",
|
||||
"webpack-bundle-analyzer": "^3.1.0",
|
||||
"webpack-cli": "^3.2.3",
|
||||
"webpack-cli": "^3.3.2",
|
||||
"webpack-merge": "^4.2.1",
|
||||
"websocket.js": "^0.1.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-jest": "^24.5.0",
|
||||
"babel-jest": "^24.8.0",
|
||||
"enzyme": "^3.8.0",
|
||||
"enzyme-adapter-react-16": "^1.7.1",
|
||||
"eslint": "^5.11.1",
|
||||
"eslint-plugin-import": "~2.14.0",
|
||||
"eslint-plugin-jsx-a11y": "~6.1.2",
|
||||
"eslint-plugin-promise": "~4.0.1",
|
||||
"eslint-plugin-jsx-a11y": "~6.2.1",
|
||||
"eslint-plugin-promise": "~4.1.1",
|
||||
"eslint-plugin-react": "~7.12.1",
|
||||
"jest": "^24.5.0",
|
||||
"jest": "^24.8.0",
|
||||
"raf": "^3.4.1",
|
||||
"react-intl-translations-manager": "^5.0.3",
|
||||
"react-test-renderer": "^16.7.0",
|
||||
"webpack-dev-server": "^3.2.1",
|
||||
"webpack-dev-server": "^3.5.1",
|
||||
"yargs": "^12.0.5"
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ RSpec.describe NotifyService, type: :service do
|
||||
end
|
||||
|
||||
it 'shows reblogs when disabled' do
|
||||
recipient.follow!(sender, reblogs: true)
|
||||
recipient.follow!(sender, reblogs: false)
|
||||
is_expected.to change(Notification, :count)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user