-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from benjifs/feat/photo-and-options
Feat: Add photo post editor
- Loading branch information
Showing
16 changed files
with
172 additions
and
77 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import m from 'mithril' | ||
|
||
import { Modal } from '../Components/Modal' | ||
|
||
const EntryPreview = { | ||
view: ({ attrs: { buildPreview } }) => | ||
buildPreview && m('div.text-center', m('a', { | ||
onclick: () => Modal(m('pre', JSON.stringify(buildPreview(), null, 4))) | ||
}, 'preview')) | ||
} | ||
|
||
export default EntryPreview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import m from 'mithril' | ||
|
||
const SyndicateToOptions = { | ||
view: ({ attrs: { syndicateTo, onchange } }) => | ||
syndicateTo && syndicateTo.length > 0 && [ | ||
m('h5', 'Syndication Targets'), | ||
m('ul', [ | ||
syndicateTo.map(s => | ||
m('li', [ | ||
m('label', [ | ||
s.name, | ||
m('input.mp-syndicate-to', { | ||
type: 'checkbox', | ||
checked: s.checked, | ||
value: s.uid, | ||
onchange: e => { | ||
s.checked = e.target.checked | ||
onchange && onchange('mp-syndicate-to', syndicateTo | ||
.filter(element => element.checked) | ||
.map(element => element.uid)) | ||
} | ||
}) | ||
]) | ||
])) | ||
]) | ||
] | ||
} | ||
|
||
export default SyndicateToOptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.