Compare commits
8 Commits
tarrien-pa
...
4.1.4
Author | SHA1 | Date | |
---|---|---|---|
2ce9b08e7a | |||
e373217577 | |||
3f5af768c8 | |||
cb8ab46302 | |||
53b979d5c7 | |||
f2bbac3f9f | |||
015ed99612 | |||
cf58535193 |
10
CHANGELOG.md
10
CHANGELOG.md
@ -3,6 +3,14 @@ Changelog
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [4.1.4] - 2023-07-07
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix branding:generate_app_icons failing because of disallowed ICO coder ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25794))
|
||||||
|
- Fix crash in admin interface when viewing a remote user with verified links ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25796))
|
||||||
|
- Fix processing of media files with unusual names ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25788))
|
||||||
|
|
||||||
## [4.1.3] - 2023-07-06
|
## [4.1.3] - 2023-07-06
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
@ -30,7 +38,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Fix multiple inefficiencies in automatic post cleanup worker ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24607), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24785), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24840))
|
- Fix multiple inefficiencies in automatic post cleanup worker ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24607), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24785), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24840))
|
||||||
- Fix performance of streaming by parsing message JSON once ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25278), [ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25361))
|
- Fix performance of streaming by parsing message JSON once ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25278), [ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25361))
|
||||||
- Fix CSP headers when `S3_ALIAS_HOST` includes a path component ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25273))
|
- Fix CSP headers when `S3_ALIAS_HOST` includes a path component ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25273))
|
||||||
- Fix `tootctl accounts approve --number N` not aproving N earliest registrations ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24605))
|
- Fix `tootctl accounts approve --number N` not approving N earliest registrations ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24605))
|
||||||
- Fix reports not being closed when performing batch suspensions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24988))
|
- Fix reports not being closed when performing batch suspensions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24988))
|
||||||
- Fix being able to vote on your own polls ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25015))
|
- Fix being able to vote on your own polls ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25015))
|
||||||
- Fix race condition when reblogging a status ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25016))
|
- Fix race condition when reblogging a status ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25016))
|
||||||
|
@ -627,7 +627,7 @@ GEM
|
|||||||
fugit (~> 1.1, >= 1.1.6)
|
fugit (~> 1.1, >= 1.1.6)
|
||||||
safety_net_attestation (0.4.0)
|
safety_net_attestation (0.4.0)
|
||||||
jwt (~> 2.0)
|
jwt (~> 2.0)
|
||||||
sanitize (6.0.1)
|
sanitize (6.0.2)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.12.0)
|
nokogiri (>= 1.12.0)
|
||||||
scenic (1.7.0)
|
scenic (1.7.0)
|
||||||
|
1
Mastodon-Modern
Submodule
1
Mastodon-Modern
Submodule
Submodule Mastodon-Modern added at 301d0033f5
@ -53,7 +53,7 @@ module StatusesHelper
|
|||||||
def status_description(status)
|
def status_description(status)
|
||||||
components = [[media_summary(status), status_text_summary(status)].reject(&:blank?).join(' · ')]
|
components = [[media_summary(status), status_text_summary(status)].reject(&:blank?).join(' · ')]
|
||||||
|
|
||||||
if status.spoiler_text.blank?
|
if (status.spoiler_text.blank? || Setting.preview_sensitive_media)
|
||||||
components << status.text
|
components << status.text
|
||||||
components << poll_summary(status)
|
components << poll_summary(status)
|
||||||
end
|
end
|
||||||
|
@ -90,7 +90,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||||||
const fulltext = this.getFulltextForCharacterCounting();
|
const fulltext = this.getFulltextForCharacterCounting();
|
||||||
const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
|
const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
|
||||||
|
|
||||||
return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 500 || (isOnlyWhitespace && !anyMedia));
|
return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 1500 || (isOnlyWhitespace && !anyMedia));
|
||||||
};
|
};
|
||||||
|
|
||||||
handleSubmit = (e) => {
|
handleSubmit = (e) => {
|
||||||
@ -280,7 +280,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='character-counter__wrapper'>
|
<div className='character-counter__wrapper'>
|
||||||
<CharacterCounter max={500} text={this.getFulltextForCharacterCounting()} />
|
<CharacterCounter max={1500} text={this.getFulltextForCharacterCounting()} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
8
app/javascript/styles/modern-dark-wobbl-old.scss
Normal file
8
app/javascript/styles/modern-dark-wobbl-old.scss
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
@import 'wobbl-old/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'modern/modern';
|
||||||
|
|
||||||
|
.layout-multiple-columns .column {
|
||||||
|
flex-grow: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
8
app/javascript/styles/modern-dark-wobbl.scss
Normal file
8
app/javascript/styles/modern-dark-wobbl.scss
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
@import 'wobbl/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'modern/modern';
|
||||||
|
|
||||||
|
.layout-multiple-columns .column {
|
||||||
|
flex-grow: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
8
app/javascript/styles/modern-dark.scss
Normal file
8
app/javascript/styles/modern-dark.scss
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
@import 'mastodon/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'modern/modern';
|
||||||
|
|
||||||
|
.layout-multiple-columns .column {
|
||||||
|
flex-grow: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
9
app/javascript/styles/modern-light-wobbl-old.scss
Normal file
9
app/javascript/styles/modern-light-wobbl-old.scss
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@import 'wobbl-old-light/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'modern/modern';
|
||||||
|
@import 'mastodon-light/diff';
|
||||||
|
|
||||||
|
.layout-multiple-columns .column {
|
||||||
|
flex-grow: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
9
app/javascript/styles/modern-light-wobbl.scss
Normal file
9
app/javascript/styles/modern-light-wobbl.scss
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@import 'wobbl-light/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'modern/modern';
|
||||||
|
@import 'mastodon-light/diff';
|
||||||
|
|
||||||
|
.layout-multiple-columns .column {
|
||||||
|
flex-grow: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
9
app/javascript/styles/modern-light.scss
Normal file
9
app/javascript/styles/modern-light.scss
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@import 'mastodon-light/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'modern/modern';
|
||||||
|
@import 'mastodon-light/diff';
|
||||||
|
|
||||||
|
.layout-multiple-columns .column {
|
||||||
|
flex-grow: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
4640
app/javascript/styles/modern/modern.scss
Normal file
4640
app/javascript/styles/modern/modern.scss
Normal file
File diff suppressed because it is too large
Load Diff
4
app/javascript/styles/wobbl-light.scss
Normal file
4
app/javascript/styles/wobbl-light.scss
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
@import 'wobbl-light/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'mastodon-light/diff';
|
||||||
|
|
44
app/javascript/styles/wobbl-light/variables.scss
Normal file
44
app/javascript/styles/wobbl-light/variables.scss
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
// Dependent colors
|
||||||
|
$black: #000000;
|
||||||
|
$white: #ffffff;
|
||||||
|
|
||||||
|
$classic-base-color: #191919;// Dark Gray
|
||||||
|
$classic-primary-color: #E7E7E7;// Platinum
|
||||||
|
$classic-secondary-color: #FF8680; // Paler red
|
||||||
|
$classic-highlight-color: #850700; // Red highlights
|
||||||
|
|
||||||
|
// Differences
|
||||||
|
$success-green: lighten(#3c754d, 8%);
|
||||||
|
|
||||||
|
$base-overlay-background: $white !default;
|
||||||
|
$valid-value-color: $success-green !default;
|
||||||
|
|
||||||
|
$ui-base-color: $classic-primary-color !default;
|
||||||
|
$ui-base-lighter-color: #b0c0cf;
|
||||||
|
$ui-primary-color: #9bcbed;
|
||||||
|
$ui-secondary-color: $classic-base-color !default;
|
||||||
|
$ui-highlight-color: $classic-highlight-color !default;
|
||||||
|
|
||||||
|
$primary-text-color: $black !default;
|
||||||
|
$darker-text-color: $classic-base-color !default;
|
||||||
|
$highlight-text-color: darken($ui-highlight-color, 8%) !default;
|
||||||
|
$dark-text-color: #444b5d;
|
||||||
|
$action-button-color: #606984;
|
||||||
|
|
||||||
|
$inverted-text-color: $black !default;
|
||||||
|
$lighter-text-color: $classic-base-color !default;
|
||||||
|
$light-text-color: #444b5d;
|
||||||
|
|
||||||
|
// Newly added colors
|
||||||
|
$account-background-color: $white !default;
|
||||||
|
|
||||||
|
// Invert darkened and lightened colors
|
||||||
|
@function darken($color, $amount) {
|
||||||
|
@return hsl(hue($color), saturation($color), lightness($color) + $amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
@function lighten($color, $amount) {
|
||||||
|
@return hsl(hue($color), saturation($color), lightness($color) - $amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
$emojis-requiring-inversion: 'chains';
|
4
app/javascript/styles/wobbl-old-light.scss
Normal file
4
app/javascript/styles/wobbl-old-light.scss
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
@import 'wobbl-old-light/variables';
|
||||||
|
@import 'application';
|
||||||
|
@import 'mastodon-light/diff';
|
||||||
|
|
44
app/javascript/styles/wobbl-old-light/variables.scss
Normal file
44
app/javascript/styles/wobbl-old-light/variables.scss
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
// Dependent colors
|
||||||
|
$black: #000000;
|
||||||
|
$white: #ffffff;
|
||||||
|
|
||||||
|
$classic-base-color: #191919;// Dark Gray
|
||||||
|
$classic-primary-color: #E7E7E7;// Platinum
|
||||||
|
$classic-secondary-color: #8c562a; // Paler red
|
||||||
|
$classic-highlight-color: #c45302; // Red highlights
|
||||||
|
|
||||||
|
// Differences
|
||||||
|
$success-green: lighten(#3c754d, 8%);
|
||||||
|
|
||||||
|
$base-overlay-background: $white !default;
|
||||||
|
$valid-value-color: $success-green !default;
|
||||||
|
|
||||||
|
$ui-base-color: $classic-primary-color !default;
|
||||||
|
$ui-base-lighter-color: #b0c0cf;
|
||||||
|
$ui-primary-color: #9bcbed;
|
||||||
|
$ui-secondary-color: $classic-base-color !default;
|
||||||
|
$ui-highlight-color: $classic-highlight-color !default;
|
||||||
|
|
||||||
|
$primary-text-color: $black !default;
|
||||||
|
$darker-text-color: $classic-base-color !default;
|
||||||
|
$highlight-text-color: darken($ui-highlight-color, 8%) !default;
|
||||||
|
$dark-text-color: #444b5d;
|
||||||
|
$action-button-color: #606984;
|
||||||
|
|
||||||
|
$inverted-text-color: $black !default;
|
||||||
|
$lighter-text-color: $classic-base-color !default;
|
||||||
|
$light-text-color: #444b5d;
|
||||||
|
|
||||||
|
// Newly added colors
|
||||||
|
$account-background-color: $white !default;
|
||||||
|
|
||||||
|
// Invert darkened and lightened colors
|
||||||
|
@function darken($color, $amount) {
|
||||||
|
@return hsl(hue($color), saturation($color), lightness($color) + $amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
@function lighten($color, $amount) {
|
||||||
|
@return hsl(hue($color), saturation($color), lightness($color) - $amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
$emojis-requiring-inversion: 'chains';
|
2
app/javascript/styles/wobbl-old.scss
Normal file
2
app/javascript/styles/wobbl-old.scss
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
@import 'wobbl-old/variables';
|
||||||
|
@import 'application';
|
60
app/javascript/styles/wobbl-old/variables.scss
Normal file
60
app/javascript/styles/wobbl-old/variables.scss
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// Commonly used web colors
|
||||||
|
$black: #000000; // Black
|
||||||
|
$white: #ffffff; // White
|
||||||
|
$success-green: #79bd9a !default; // Padua
|
||||||
|
$error-red: #df405a !default; // Cerise
|
||||||
|
$warning-red: #ff5050 !default; // Sunset Orange
|
||||||
|
$gold-star: #ca8f04 !default; // Dark Goldenrod
|
||||||
|
|
||||||
|
$red-bookmark: $warning-red;
|
||||||
|
|
||||||
|
// Values from the classic Mastodon UI
|
||||||
|
$classic-base-color: #37210f;// Dark Brown
|
||||||
|
$classic-primary-color: #E7E7E7;// Platinum
|
||||||
|
$classic-secondary-color: #E7E7E7; // Paler red
|
||||||
|
$classic-highlight-color: #c45302; // Red highlights
|
||||||
|
|
||||||
|
// Variables for defaults in UI
|
||||||
|
$base-shadow-color: $black !default;
|
||||||
|
$base-overlay-background: $black !default;
|
||||||
|
$base-border-color: $white !default;
|
||||||
|
$simple-background-color: $white !default;
|
||||||
|
$valid-value-color: $success-green !default;
|
||||||
|
$error-value-color: $error-red !default;
|
||||||
|
|
||||||
|
// Tell UI to use selected colors
|
||||||
|
$ui-base-color: $classic-base-color !default; // Darkest
|
||||||
|
$ui-base-lighter-color: lighten($ui-base-color, 26%) !default; // Lighter darkest
|
||||||
|
$ui-primary-color: $classic-primary-color !default; // Lighter
|
||||||
|
$ui-secondary-color: $classic-secondary-color !default; // Lightest
|
||||||
|
$ui-highlight-color: $classic-highlight-color !default;
|
||||||
|
|
||||||
|
// Variables for texts
|
||||||
|
$primary-text-color: $white !default;
|
||||||
|
$darker-text-color: $ui-primary-color !default;
|
||||||
|
$dark-text-color: $ui-base-lighter-color !default;
|
||||||
|
$secondary-text-color: $ui-secondary-color !default;
|
||||||
|
$highlight-text-color: lighten($ui-highlight-color, 8%) !default;
|
||||||
|
$action-button-color: $ui-base-lighter-color !default;
|
||||||
|
$passive-text-color: $gold-star !default;
|
||||||
|
$active-passive-text-color: $success-green !default;
|
||||||
|
|
||||||
|
// For texts on inverted backgrounds
|
||||||
|
$inverted-text-color: $ui-base-color !default;
|
||||||
|
$lighter-text-color: $ui-base-lighter-color !default;
|
||||||
|
$light-text-color: $ui-primary-color !default;
|
||||||
|
|
||||||
|
// Language codes that uses CJK fonts
|
||||||
|
$cjk-langs: ja, ko, zh-CN, zh-HK, zh-TW;
|
||||||
|
|
||||||
|
// Variables for components
|
||||||
|
$media-modal-media-max-width: 100%;
|
||||||
|
|
||||||
|
// put margins on top and bottom of image to avoid the screen covered by image.
|
||||||
|
$media-modal-media-max-height: 80%;
|
||||||
|
|
||||||
|
$no-gap-breakpoint: 1175px;
|
||||||
|
|
||||||
|
$font-sans-serif: 'mastodon-font-sans-serif' !default;
|
||||||
|
$font-display: 'mastodon-font-display' !default;
|
||||||
|
$font-monospace: 'mastodon-font-monospace' !default;
|
2
app/javascript/styles/wobbl.scss
Normal file
2
app/javascript/styles/wobbl.scss
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
@import 'wobbl/variables';
|
||||||
|
@import 'application';
|
60
app/javascript/styles/wobbl/variables.scss
Normal file
60
app/javascript/styles/wobbl/variables.scss
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// Commonly used web colors
|
||||||
|
$black: #000000; // Black
|
||||||
|
$white: #ffffff; // White
|
||||||
|
$success-green: #79bd9a !default; // Padua
|
||||||
|
$error-red: #df405a !default; // Cerise
|
||||||
|
$warning-red: #ff5050 !default; // Sunset Orange
|
||||||
|
$gold-star: #ca8f04 !default; // Dark Goldenrod
|
||||||
|
|
||||||
|
$red-bookmark: $warning-red;
|
||||||
|
|
||||||
|
// Values from the classic Mastodon UI
|
||||||
|
$classic-base-color: #191919;// Dark Gray
|
||||||
|
$classic-primary-color: #E7E7E7;// Platinum
|
||||||
|
$classic-secondary-color: #FF8680; // Paler red
|
||||||
|
$classic-highlight-color: #850700; // Red highlights
|
||||||
|
|
||||||
|
// Variables for defaults in UI
|
||||||
|
$base-shadow-color: $black !default;
|
||||||
|
$base-overlay-background: $black !default;
|
||||||
|
$base-border-color: $white !default;
|
||||||
|
$simple-background-color: $white !default;
|
||||||
|
$valid-value-color: $success-green !default;
|
||||||
|
$error-value-color: $error-red !default;
|
||||||
|
|
||||||
|
// Tell UI to use selected colors
|
||||||
|
$ui-base-color: $classic-base-color !default; // Darkest
|
||||||
|
$ui-base-lighter-color: lighten($ui-base-color, 26%) !default; // Lighter darkest
|
||||||
|
$ui-primary-color: $classic-primary-color !default; // Lighter
|
||||||
|
$ui-secondary-color: $classic-secondary-color !default; // Lightest
|
||||||
|
$ui-highlight-color: $classic-highlight-color !default;
|
||||||
|
|
||||||
|
// Variables for texts
|
||||||
|
$primary-text-color: $white !default;
|
||||||
|
$darker-text-color: $ui-primary-color !default;
|
||||||
|
$dark-text-color: $ui-base-lighter-color !default;
|
||||||
|
$secondary-text-color: $ui-secondary-color !default;
|
||||||
|
$highlight-text-color: lighten($ui-highlight-color, 8%) !default;
|
||||||
|
$action-button-color: $ui-base-lighter-color !default;
|
||||||
|
$passive-text-color: $gold-star !default;
|
||||||
|
$active-passive-text-color: $success-green !default;
|
||||||
|
|
||||||
|
// For texts on inverted backgrounds
|
||||||
|
$inverted-text-color: $ui-base-color !default;
|
||||||
|
$lighter-text-color: $ui-base-lighter-color !default;
|
||||||
|
$light-text-color: $ui-primary-color !default;
|
||||||
|
|
||||||
|
// Language codes that uses CJK fonts
|
||||||
|
$cjk-langs: ja, ko, zh-CN, zh-HK, zh-TW;
|
||||||
|
|
||||||
|
// Variables for components
|
||||||
|
$media-modal-media-max-width: 100%;
|
||||||
|
|
||||||
|
// put margins on top and bottom of image to avoid the screen covered by image.
|
||||||
|
$media-modal-media-max-height: 80%;
|
||||||
|
|
||||||
|
$no-gap-breakpoint: 1175px;
|
||||||
|
|
||||||
|
$font-sans-serif: 'mastodon-font-sans-serif' !default;
|
||||||
|
$font-display: 'mastodon-font-display' !default;
|
||||||
|
$font-monospace: 'mastodon-font-monospace' !default;
|
@ -60,7 +60,7 @@ class TextFormatter
|
|||||||
suffix = url[prefix.length + 30..-1]
|
suffix = url[prefix.length + 30..-1]
|
||||||
cutoff = url[prefix.length..-1].length > 30
|
cutoff = url[prefix.length..-1].length > 30
|
||||||
|
|
||||||
<<~HTML.squish
|
<<~HTML.squish.html_safe # rubocop:disable Rails/OutputSafety
|
||||||
<a href="#{h(url)}" target="_blank" rel="#{rel.join(' ')}"><span class="invisible">#{h(prefix)}</span><span class="#{cutoff ? 'ellipsis' : ''}">#{h(display_url)}</span><span class="invisible">#{h(suffix)}</span></a>
|
<a href="#{h(url)}" target="_blank" rel="#{rel.join(' ')}"><span class="invisible">#{h(prefix)}</span><span class="#{cutoff ? 'ellipsis' : ''}">#{h(display_url)}</span><span class="invisible">#{h(suffix)}</span></a>
|
||||||
HTML
|
HTML
|
||||||
rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError
|
rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError
|
||||||
|
@ -24,7 +24,7 @@ module Attachmentable
|
|||||||
def self.has_attached_file(name, options = {}) # rubocop:disable Naming/PredicateName
|
def self.has_attached_file(name, options = {}) # rubocop:disable Naming/PredicateName
|
||||||
super(name, options)
|
super(name, options)
|
||||||
|
|
||||||
send(:"before_#{name}_validate") do
|
send(:"before_#{name}_validate", prepend: true) do
|
||||||
attachment = send(name)
|
attachment = send(name)
|
||||||
check_image_dimension(attachment)
|
check_image_dimension(attachment)
|
||||||
set_file_content_type(attachment)
|
set_file_content_type(attachment)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class StatusLengthValidator < ActiveModel::Validator
|
class StatusLengthValidator < ActiveModel::Validator
|
||||||
MAX_CHARS = 500
|
MAX_CHARS = 1500
|
||||||
URL_PLACEHOLDER_CHARS = 23
|
URL_PLACEHOLDER_CHARS = 23
|
||||||
URL_PLACEHOLDER = 'x' * 23
|
URL_PLACEHOLDER = 'x' * 23
|
||||||
|
|
||||||
|
@ -1596,8 +1596,18 @@ en:
|
|||||||
does_not_match_previous_name: does not match the previous name
|
does_not_match_previous_name: does not match the previous name
|
||||||
themes:
|
themes:
|
||||||
contrast: Mastodon (High contrast)
|
contrast: Mastodon (High contrast)
|
||||||
default: Mastodon (Dark)
|
dark: Mastodon (Dark)
|
||||||
mastodon-light: Mastodon (Light)
|
mastodon-light: Mastodon (Light)
|
||||||
|
wobbl: Mastodon (Dark - Wobbl theme)
|
||||||
|
wobbl-light: Mastodon (Light - Wobbl theme)
|
||||||
|
wobbl-old: Mastodon (Dark - Original Wobbl Theme)
|
||||||
|
wobbl-old-light: Mastodon (Light - Original Wobbl Theme)
|
||||||
|
modern-dark: Modern (Dark)
|
||||||
|
modern-light: Modern (Light)
|
||||||
|
default: Modern (Dark - Wobbl theme) (Default)
|
||||||
|
modern-light-wobbl: Modern (Light - Wobbl theme)
|
||||||
|
modern-dark-wobbl-old: Modern (Dark - Original Wobbl Theme)
|
||||||
|
modern-light-wobbl-old: Modern (Light - Original Wobbl Theme)
|
||||||
time:
|
time:
|
||||||
formats:
|
formats:
|
||||||
default: "%b %d, %Y, %H:%M"
|
default: "%b %d, %Y, %H:%M"
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
default: styles/application.scss
|
dark: styles/application.scss
|
||||||
contrast: styles/contrast.scss
|
contrast: styles/contrast.scss
|
||||||
mastodon-light: styles/mastodon-light.scss
|
mastodon-light: styles/mastodon-light.scss
|
||||||
|
wobbl: styles/wobbl.scss
|
||||||
|
wobbl-light: styles/wobbl-light.scss
|
||||||
|
modern-dark: styles/modern-dark.scss
|
||||||
|
modern-light: styles/modern-light.scss
|
||||||
|
modern-light-wobbl: styles/modern-light-wobbl.scss
|
||||||
|
default: styles/modern-dark-wobbl.scss
|
||||||
|
wobbl-old: styles/wobbl-old.scss
|
||||||
|
wobbl-old-light: styles/wobbl-old-light.scss
|
||||||
|
modern-dark-wobbl-old: styles/modern-dark-wobbl-old.scss
|
||||||
|
modern-light-wobbl-old: styles/modern-light-wobbl-old.scss
|
||||||
|
5
config/themes.yml.save
Normal file
5
config/themes.yml.save
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<div class="fields-group">
|
||||||
|
|
||||||
|
<div class="input with_label boolean optional form_admin_settings_trends field_with_hint"><div class="label_input"><label class="boolean optional" for="form_admin_settings_trends">Enable trends</label><div class="label_input__wrapper"><input value="0" autocomplete="off" type="hidden" name="form_admin_settings[trends]"><label class="checkbox"><input class="boolean optional" type="checkbox" value="1" checked="checked" name="form_admin_settings[trends]" id="form_admin_settings_trends"></label></div></div><span class="hint">Trends show which posts, hashtags and news stories are gaining traction on your server.</span></div>
|
||||||
|
|
||||||
|
</div>
|
@ -13,7 +13,7 @@ module Mastodon
|
|||||||
end
|
end
|
||||||
|
|
||||||
def patch
|
def patch
|
||||||
3
|
4
|
||||||
end
|
end
|
||||||
|
|
||||||
def flags
|
def flags
|
||||||
|
@ -40,7 +40,7 @@ namespace :branding do
|
|||||||
output_dest = Rails.root.join('app', 'javascript', 'icons')
|
output_dest = Rails.root.join('app', 'javascript', 'icons')
|
||||||
|
|
||||||
rsvg_convert = Terrapin::CommandLine.new('rsvg-convert', '-w :size -h :size --keep-aspect-ratio :input -o :output')
|
rsvg_convert = Terrapin::CommandLine.new('rsvg-convert', '-w :size -h :size --keep-aspect-ratio :input -o :output')
|
||||||
convert = Terrapin::CommandLine.new('convert', ':input :output')
|
convert = Terrapin::CommandLine.new('convert', ':input :output', environment: { 'MAGICK_CONFIGURE_PATH' => nil })
|
||||||
|
|
||||||
favicon_sizes = [16, 32, 48]
|
favicon_sizes = [16, 32, 48]
|
||||||
apple_icon_sizes = [57, 60, 72, 76, 114, 120, 144, 152, 167, 180, 1024]
|
apple_icon_sizes = [57, 60, 72, 76, 114, 120, 144, 152, 167, 180, 1024]
|
||||||
|
BIN
spec/fixtures/files/attachment-jpg.123456_abcd
vendored
Normal file
BIN
spec/fixtures/files/attachment-jpg.123456_abcd
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
18
spec/requests/api/v2/media_spec.rb
Normal file
18
spec/requests/api/v2/media_spec.rb
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe 'Media API', paperclip_processing: true do
|
||||||
|
let(:user) { Fabricate(:user) }
|
||||||
|
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
|
||||||
|
let(:scopes) { 'write' }
|
||||||
|
let(:headers) { { 'Authorization' => "Bearer #{token.token}" } }
|
||||||
|
|
||||||
|
describe 'POST /api/v2/media' do
|
||||||
|
it 'returns http success' do
|
||||||
|
post '/api/v2/media', headers: headers, params: { file: fixture_file_upload('attachment-jpg.123456_abcd', 'image/jpeg') }
|
||||||
|
expect(File.exist?(user.account.media_attachments.first.file.path(:small))).to be true
|
||||||
|
expect(response).to have_http_status(200)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Reference in New Issue
Block a user