mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
Fix misc attachment styling / changed Chrome APIs
This commit is contained in:
parent
f0401a7ba1
commit
40e932074a
5 changed files with 6 additions and 6 deletions
|
@ -459,7 +459,7 @@ export default class ComposerView extends React.Component {
|
|||
// Ensure that you can't pick up a file and drop it on the same draft
|
||||
const nonNativeFilePath = this._nonNativeFilePathForDrop(event);
|
||||
|
||||
const hasNativeFile = event.dataTransfer.files.length > 0;
|
||||
const hasNativeFile = event.dataTransfer.types.includes('Files');
|
||||
const hasNonNativeFilePath = nonNativeFilePath !== null;
|
||||
|
||||
return hasNativeFile || hasNonNativeFilePath;
|
||||
|
|
|
@ -450,7 +450,7 @@ describe "ComposerView", ->
|
|||
event =
|
||||
dataTransfer:
|
||||
files:[{'pretend':'imafile'}]
|
||||
types:[]
|
||||
types:['Files']
|
||||
expect(@composer._shouldAcceptDrop(event)).toBe(true)
|
||||
|
||||
it "should return true if the event is carrying a non-native file URL", ->
|
||||
|
|
|
@ -75,7 +75,7 @@ body.platform-win32 {
|
|||
|
||||
.nylas-attachment-item.image-attachment-item {
|
||||
margin: 0;
|
||||
max-width: 100%;
|
||||
max-width: calc(100% - 22px); // right margin of composer
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ export default class ConfigPersistenceManager {
|
|||
|
||||
_showLoadErrorDialog(error) {
|
||||
const message = `Failed to load "${path.basename(this.configFilePath)}"`;
|
||||
let detail = (error.location) ? error.stack : error.message;
|
||||
let detail = error.message;
|
||||
|
||||
if (error instanceof SyntaxError) {
|
||||
detail += `\n\nThe file ${this.configFilePath} has incorrect JSON formatting or is empty. Fix the formatting to resolve this error, or reset your settings to continue using N1.`
|
||||
|
|
|
@ -214,8 +214,8 @@ body.platform-win32 {
|
|||
.file-action-icon {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
right: -8px;
|
||||
top: -8px;
|
||||
right: 2px;
|
||||
top: -14px;
|
||||
width: 26px;
|
||||
border-radius: 0 0 0 3px;
|
||||
border: none;
|
||||
|
|
Loading…
Reference in a new issue