Merge remote-tracking branch 'origin/master' into gs-master
This commit is contained in:
commit
dd28b94cf0
5 changed files with 36 additions and 18 deletions
|
@ -175,7 +175,9 @@ export default class ColumnHeader extends React.PureComponent {
|
|||
<div className={wrapperClassName}>
|
||||
<h1 tabIndex={focusable ? 0 : null} role='button' className={buttonClassName} aria-label={title} onClick={this.handleTitleClick}>
|
||||
<i className={`fa fa-fw fa-${icon} column-header__icon`} />
|
||||
<span className='column-header__title'>
|
||||
{title}
|
||||
</span>
|
||||
<div className='column-header__buttons'>
|
||||
{backButton}
|
||||
{ notifCleaning ? (
|
||||
|
|
|
@ -2503,6 +2503,7 @@ button.icon-button.active i.fa-retweet {
|
|||
}
|
||||
|
||||
.column-header {
|
||||
display: flex;
|
||||
padding: 15px;
|
||||
font-size: 16px;
|
||||
background: lighten($ui-base-color, 4%);
|
||||
|
@ -2528,12 +2529,10 @@ button.icon-button.active i.fa-retweet {
|
|||
}
|
||||
|
||||
.column-header__buttons {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
height: 48px;
|
||||
display: flex;
|
||||
margin: -15px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.column-header__button {
|
||||
|
@ -2692,6 +2691,14 @@ button.icon-button.active i.fa-retweet {
|
|||
}
|
||||
}
|
||||
|
||||
.column-header__title {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.text-btn {
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
|
@ -3465,7 +3472,6 @@ button.icon-button.active i.fa-retweet {
|
|||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba($base-overlay-background, 0.7);
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.modal-root__container {
|
||||
|
|
|
@ -10,6 +10,7 @@ module Paperclip
|
|||
unless options[:style] == :original && num_frames > 1
|
||||
tmp_file = Paperclip::TempfileFactory.new.generate(attachment.instance.file_file_name)
|
||||
tmp_file << file.read
|
||||
tmp_file.flush
|
||||
return tmp_file
|
||||
end
|
||||
|
||||
|
|
BIN
spec/fixtures/files/mini-static.gif
vendored
Normal file
BIN
spec/fixtures/files/mini-static.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -20,7 +20,14 @@ RSpec.describe MediaAttachment, type: :model do
|
|||
end
|
||||
|
||||
describe 'non-animated gif non-conversion' do
|
||||
let(:media) { MediaAttachment.create(account: Fabricate(:account), file: attachment_fixture('attachment.gif')) }
|
||||
fixtures = [
|
||||
{ filename: 'attachment.gif', width: 600, height: 400, aspect: 1.5 },
|
||||
{ filename: 'mini-static.gif', width: 32, height: 32, aspect: 1.0 },
|
||||
]
|
||||
|
||||
fixtures.each do |fixture|
|
||||
context fixture[:filename] do
|
||||
let(:media) { MediaAttachment.create(account: Fabricate(:account), file: attachment_fixture(fixture[:filename])) }
|
||||
|
||||
it 'sets type to image' do
|
||||
expect(media.type).to eq 'image'
|
||||
|
@ -31,9 +38,11 @@ RSpec.describe MediaAttachment, type: :model do
|
|||
end
|
||||
|
||||
it 'sets meta' do
|
||||
expect(media.file.meta["original"]["width"]).to eq 600
|
||||
expect(media.file.meta["original"]["height"]).to eq 400
|
||||
expect(media.file.meta["original"]["aspect"]).to eq 1.5
|
||||
expect(media.file.meta["original"]["width"]).to eq fixture[:width]
|
||||
expect(media.file.meta["original"]["height"]).to eq fixture[:height]
|
||||
expect(media.file.meta["original"]["aspect"]).to eq fixture[:aspect]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue