git ssb

2+

mixmix / ticktack



Commit 35c2c3fcaf1c0c77cb3731f93319107382ec06de

alert user about no drafts in markdown-editor mode

mix irving committed on 6/27/2018, 12:33:52 AM
Parent: 999c774d09af674766d49b3cd7636a575006b27a

Files changed

app/page/blogNew.jschanged
app/page/blogNew.mcsschanged
translations/en.jschanged
app/page/blogNew.jsView
@@ -98,8 +98,9 @@
9898 'ev-input': e => meta.summary.set(e.target.value),
9999 placeholder: strings.blogNew.field.summary
100100 })
101101 ]),
102+ h('div.warning', strings.blogNew.markdownWarning),
102103 composer
103104 ])
104105 ])
105106 ])
@@ -133,8 +134,9 @@
133134 body: hasBody ? composer.innerHTML : null
134135 }
135136 api.drafts.sync.set(DRAFT_LOCATION, draft)
136137 }
138+
137139 function throttledSaveDraft ({ composer, meta, api }) {
138140 return throttle(() => saveDraft({ composer, meta, api }), 2000)
139141 }
140142
app/page/blogNew.mcssView
@@ -94,8 +94,12 @@
9494
9595 -channel {}
9696 }
9797
98+ div.warning {
99+ display: none
100+ }
101+
98102 div.editor.Markdown {
99103 $markdownBlog
100104
101105 background-color: #fff
@@ -129,13 +133,23 @@
129133 Page -blogNew -markdown {
130134 div.content {
131135 div.container {
132136 div.field {
137+ -summary {
138+ margin-bottom: 2rem
139+ }
140+
133141 -attachment {
134142 input { display: none }
135143 }
136144 }
137145
146+ div.warning {
147+ display: initial
148+ font-weight: bold
149+ margin: 1rem
150+ }
151+
138152 div.editor.Markdown {
139153 display: none
140154 /* $markdownBlog */
141155
@@ -163,8 +177,13 @@
163177 border: none
164178 border-radius: 0
165179 margin-top: .5rem
166180 }
181+
182+ section.actions {
183+ input { display: initial }
184+ div.Button { display: flex }
185+ }
167186 }
168187 }
169188 }
170189
translations/en.jsView
@@ -44,9 +44,10 @@
4444 actions: {
4545 edit: 'Edit',
4646 preview: 'Preview',
4747 writeBlog: 'Write your blog here'
48- }
48+ },
49+ markdownWarning: 'Markdown editor: auto-saving of drafts is not currently supported. You can change your editor in settings'
4950 },
5051 channel: 'Channel',
5152 loading: 'Loading...',
5253 optionalField: 'optional',

Built with git-ssb-web