-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag static files from a theme-gem with a sticker #406
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,18 @@ export default class FilePreview extends Component { | |
} | ||
return ( | ||
<div className="file-preview"> | ||
{ | ||
file.from_theme && | ||
<span className="theme-indicator"> | ||
<i className="fa fa-diamond" aria-hidden="true" title="Theme Asset" /> | ||
</span> | ||
} | ||
{nodeLink} | ||
<span className="filename">{file.path}</span> | ||
<button onClick={() => this.handleClickDelete(file.path)} className="delete" title="Delete file">x</button> | ||
{ | ||
!file.from_theme && | ||
<button onClick={() => this.handleClickDelete(file.path)} className="delete" title="Delete file">x</button> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why should we not allow deleting theme files? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
While I was greatly surprised that you asked this question, on reflecting further, I'm assuming you were talking about removing the To answer otherwise, three things to consider:
There's no valid use-case to allow write-access to the theme-gem in future either |
||
} | ||
</div> | ||
); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I've put a few inline conditions in the front-end but it's better to pull them out of return statement which makes it more readable.