Browse Source

data, logs, logs-content, story, story-content: Fixed form inconsistencies.

1.0
Gisle Aune 6 years ago
parent
commit
659bde02a0
  1. 4
      marko/components/modal/style.less
  2. 2
      marko/page/data/components/add-character-modal/index.marko
  3. 1
      marko/page/data/components/channels-page/index.marko
  4. 1
      marko/page/data/components/characters-page/index.marko
  5. 2
      marko/page/data/components/remove-character-modal/index.marko
  6. 3
      marko/page/logs-content/components/edit-log-modal/index.marko
  7. 2
      marko/page/logs-content/components/edit-post-modal/index.marko
  8. 2
      marko/page/logs-content/components/remove-log-modal/index.marko
  9. 2
      marko/page/logs-content/components/remove-post-modal/index.marko
  10. 12
      marko/page/logs/components/add-log-modal/index.marko
  11. 11
      marko/page/story-content/components/create-chapter-modal/index.marko
  12. 5
      marko/page/story-content/components/edit-chapter-modal/index.marko
  13. 2
      marko/page/story/components/story-menu/index.marko
  14. 9
      marko/page/story/components/tags-page/component.js
  15. 6
      marko/page/story/components/tags-page/index.marko
  16. 6
      marko/page/story/tag-list.marko

4
marko/components/modal/style.less

@ -47,6 +47,8 @@ div.overlay {
background: none; background: none;
outline: none; outline: none;
opacity: 0.5; opacity: 0.5;
border-left: 0.25px dotted;
} }
input.big { input.big {
font-size: 1.5em; font-size: 1.5em;
@ -91,6 +93,8 @@ div.overlay {
resize: none; resize: none;
overflow-y: scroll; overflow-y: scroll;
border-left: 0.25px dotted;
} }
textarea.tall { textarea.tall {
height: 24em; height: 24em;

2
marko/page/data/components/add-character-modal/index.marko

@ -18,5 +18,5 @@
<label>Description</label> <label>Description</label>
<textarea key="description" placeholder="Description" on-change("change", "description") value=state.values.description /> <textarea key="description" placeholder="Description" on-change("change", "description") value=state.values.description />
<button disabled=state.loading on-click("save")>Save character!</button>
<button disabled=state.loading on-click("save")>Save</button>
</modal> </modal>

1
marko/page/data/components/channels-page/index.marko

@ -3,3 +3,4 @@
<channel-list channels=state.channels on-edited("channelEdited") /> <channel-list channels=state.channels on-edited("channelEdited") />
</main> </main>
<add-channel-modal enabled=(state.modal === "channel.add") user=input.user on-added("channelAdded") on-close("close") /> <add-channel-modal enabled=(state.modal === "channel.add") user=input.user on-added("channelAdded") on-close("close") />
<add-character-modal enabled=(state.modal === "character.add") user=input.user on-close("close") />

1
marko/page/data/components/characters-page/index.marko

@ -3,3 +3,4 @@
<character-list characters=state.characters on-removed("characterRemoved") on-edited("characterEdited") on-nicks("characterNicksChanged") /> <character-list characters=state.characters on-removed("characterRemoved") on-edited("characterEdited") on-nicks("characterNicksChanged") />
</main> </main>
<add-character-modal enabled=(state.modal === "character.add") user=input.user on-added("characterAdded") on-close("close") /> <add-character-modal enabled=(state.modal === "character.add") user=input.user on-added("characterAdded") on-close("close") />
<add-channel-modal enabled=(state.modal === "channel.add") user=input.user on-close("close") />

2
marko/page/data/components/remove-character-modal/index.marko

@ -5,5 +5,5 @@
<p class="color-danger">This is irreversible!</p> <p class="color-danger">This is irreversible!</p>
<button disabled=state.loading on-click("doIt")>Yes, do it!</button>
<button disabled=state.loading on-click("doIt")>Remove</button>
</modal> </modal>

3
marko/page/logs-content/components/edit-log-modal/index.marko

@ -9,11 +9,12 @@ import moment from "moment"
<input key="title" placeholder=(input.log.channel.name + " – " + moment(input.log.date).format("MMMM D, YYYY")) class="big" on-change("change", "title") value=state.values.title /> <input key="title" placeholder=(input.log.channel.name + " – " + moment(input.log.date).format("MMMM D, YYYY")) class="big" on-change("change", "title") value=state.values.title />
<label>Event Name</label> <label>Event Name</label>
<input key="event" placeholder="(Optional)" class="big" on-change("change", "event") value=state.values.event />
<input key="event" placeholder="(Optional)" on-change("change", "event") value=state.values.event />
<label>Description</label> <label>Description</label>
<textarea key="description" placeholder="(Optional)" on-change("change", "description") value=state.values.description /> <textarea key="description" placeholder="(Optional)" on-change("change", "description") value=state.values.description />
<label>Options</label>
<toggle value=state.values.open on="Open" off="Closed" <toggle value=state.values.open on="Open" off="Closed"
onDesc=("New posts in "+input.log.channel.name+" will end up here.") onDesc=("New posts in "+input.log.channel.name+" will end up here.")
offDesc="The logbot will not append to this log." offDesc="The logbot will not append to this log."

2
marko/page/logs-content/components/edit-post-modal/index.marko

@ -22,5 +22,5 @@
<label>Text</label> <label>Text</label>
<textarea key="text" placeholder="Text" class="tall" on-change("change", "text") value=state.values.text /> <textarea key="text" placeholder="Text" class="tall" on-change("change", "text") value=state.values.text />
<button disabled=state.loading on-click("save")>Alter History</button>
<button disabled=state.loading on-click("save")>Alter history</button>
</modal> </modal>

2
marko/page/logs-content/components/remove-log-modal/index.marko

@ -5,5 +5,5 @@
<p class="color-danger">Removal is final!</p> <p class="color-danger">Removal is final!</p>
<button disabled=state.loading on-click("doIt")>I will destroy you!</button>
<button disabled=state.loading on-click("doIt")>Yes, I'm really doing it!</button>
</modal> </modal>

2
marko/page/logs-content/components/remove-post-modal/index.marko

@ -12,5 +12,5 @@
<p><b>Text</b>: ${input.post.text}</p> <p><b>Text</b>: ${input.post.text}</p>
</div> </div>
<button disabled=state.loading on-click("doIt")>Yes, erase history!</button>
<button disabled=state.loading on-click("doIt")>Erase history</button>
</modal> </modal>

12
marko/page/logs/components/add-log-modal/index.marko

@ -5,17 +5,17 @@ import moment from "moment"
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Title</label>
<input key="title" placeholder="(Optional)" class="big" on-change("change", "title") value=state.values.title />
<label>Date</label> <label>Date</label>
<input key="date" placeholder="(Required)" class="big" on-change("change", "date") value=state.values.date />
<input key="date" placeholder="(Required)" on-change("change", "date") value=state.values.date />
<label>Channel</label> <label>Channel</label>
<input key="channel" placeholder="(Required)" class="big" on-change("change", "channel") value=state.values.channel />
<label>Title</label>
<input key="title" placeholder="(Optional)" class="big" on-change("change", "title") value=state.values.title />
<input key="channel" placeholder="(Required)" on-change("change", "channel") value=state.values.channel />
<label>Event Name</label> <label>Event Name</label>
<input key="event" placeholder="(Optional)" class="big" on-change("change", "event") value=state.values.event />
<input key="event" placeholder="(Optional)" on-change("change", "event") value=state.values.event />
<label>Description</label> <label>Description</label>
<textarea key="description" placeholder="(Optional)" on-change("change", "description") value=state.values.description /> <textarea key="description" placeholder="(Optional)" on-change("change", "description") value=state.values.description />

11
marko/page/story-content/components/create-chapter-modal/index.marko

@ -3,9 +3,14 @@
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<input key="title" placeholder="Title (Optional)" class="big" on-change("change", "title") value=state.values.title />
<input key="icdate" placeholder="IC Date (Optional)" on-change("change", "fictionalDate") value=state.values.fictionalDate />
<textarea key="source" placeholder="Content" class="tall" on-change("change", "source") value=state.values.source />
<label>Title</label>
<input key="title" placeholder="(Optional)" class="big" on-change("change", "title") value=state.values.title />
<label>IC Date</label>
<input key="icdate" placeholder="(Optional)" on-change("change", "fictionalDate") value=state.values.fictionalDate />
<label>Content</label>
<textarea key="source" placeholder="" class="tall" on-change("change", "source") value=state.values.source />
<button disabled=state.loading on-click("save")>Save</button> <button disabled=state.loading on-click("save")>Save</button>
</modal> </modal>

5
marko/page/story-content/components/edit-chapter-modal/index.marko

@ -3,8 +3,13 @@
<p key="error" class="color-error">${state.error}</p> <p key="error" class="color-error">${state.error}</p>
<label>Title</label>
<input key="title" placeholder="Title" class="big" on-change("change", "title") value=state.values.title /> <input key="title" placeholder="Title" class="big" on-change("change", "title") value=state.values.title />
<label>IC Date</label>
<input key="icdate" placeholder="IC Date" on-change("change", "fictionalDate") value=state.values.fictionalDate /> <input key="icdate" placeholder="IC Date" on-change("change", "fictionalDate") value=state.values.fictionalDate />
<label>Content</label>
<textarea key="source" placeholder="Content" class="tall" on-change("change", "source") value=state.values.source /> <textarea key="source" placeholder="Content" class="tall" on-change("change", "source") value=state.values.source />
<button disabled=state.loading on-click("save")>Save</button> <button disabled=state.loading on-click("save")>Save</button>

2
marko/page/story/components/story-menu/index.marko

@ -2,7 +2,7 @@
<menu-header>Story</menu-header> <menu-header>Story</menu-header>
<menu-link key="index" selected=input.selected.index icon="S" href="/story/">Stories</menu-link> <menu-link key="index" selected=input.selected.index icon="S" href="/story/">Stories</menu-link>
<menu-link selected=input.selected.tags icon="T" href="/story/tag-list/">Tags</menu-link> <menu-link selected=input.selected.tags icon="T" href="/story/tag-list/">Tags</menu-link>
<menu-gap />
<menu-gap if(input.menuAuthor || input.menuMonth || input.menuTags) />
<if(input.menuMonth != null)> <if(input.menuMonth != null)>
<menu-link selected=(input.selected.special === "month") icon="M" href=("/story/by-month/"+input.menuMonth.url)>${input.menuMonth.text}</menu-link> <menu-link selected=(input.selected.special === "month") icon="M" href=("/story/by-month/"+input.menuMonth.url)>${input.menuMonth.text}</menu-link>
</if> </if>

9
marko/page/story/components/tags-page/component.js

@ -8,11 +8,20 @@ module.exports = class {
this.state = { this.state = {
tags: [], tags: [],
groups: [], groups: [],
modal: null,
} }
this.update(input.tags) this.update(input.tags)
} }
open(modal) {
this.state.modal = modal
}
close() {
this.state.modal = null
}
update(newTags) { update(newTags) {
const tags = newTags.map(t => ({ const tags = newTags.map(t => ({
kind: t.kind, kind: t.kind,

6
marko/page/story/components/tags-page/index.marko

@ -1,3 +1,6 @@
<background src="/assets/images/bg.png" opacity=0.25 />
<story-menu categories=input.categories selected=(input.selected || {}) user=input.user on-open("open") />
<main>
<div class="tags-page"> <div class="tags-page">
<h1 class="color-primary">All Tags</h1> <h1 class="color-primary">All Tags</h1>
<p>These are all distinct tags that appear in at least one listed story.</p> <p>These are all distinct tags that appear in at least one listed story.</p>
@ -12,3 +15,6 @@
</div> </div>
</div> </div>
</div> </div>
<add-story-modal enabled=(state.modal === "story.add") stories=input.stories categories=input.categories on-close("close") />
</main>

6
marko/page/story/tag-list.marko

@ -1,9 +1,5 @@
<include("../layout", {title: "Stories", site: "story"})> <include("../layout", {title: "Stories", site: "story"})>
<@body> <@body>
<background src="/assets/images/bg.png" opacity=0.25 />
<story-menu categories=input.categories selected=(input.selected || {}) menuTags=input.menuTags user=input.user />
<main>
<tags-page tags=input.tags />
</main>
<tags-page tags=input.tags categories=input.categories selected=(input.selected || {}) menuTags=input.menuTags user=input.user />
</@body> </@body>
</include> </include>
Loading…
Cancel
Save