git ssb

16+

Dominic / patchbay



Commit ff22ecb5f91b9cb85bbe7039f533e92af2def543

mini message: click to goTo them, raw-content format fix

mixmix committed on 10/10/2018, 9:19:35 PM
Parent: 133fc7109eebd6afa6f7a9fe6ae197c95ca45184

Files changed

message/html/decorate/data-root.jschanged
message/html/layout/mini.jschanged
message/html/layout/mini.mcsschanged
message/html/decorate/data-root.jsView
@@ -4,7 +4,8 @@
44
55 exports.create = (api) => {
66 return nest('message.html.decorate', function (element, { msg }) {
77 if (msg.value.content.root) element.dataset.root = msg.value.content.root
8 + if (msg.value.content.about) element.dataset.root = msg.value.content.about
89 return element
910 })
1011 }
message/html/layout/mini.jsView
@@ -1,12 +1,13 @@
11 const nest = require('depnest')
22 const { h, Value } = require('mutant')
33
4-exports.needs = nest('message.html', {
5- backlinks: 'first',
6- author: 'first',
7- meta: 'map',
8- timestamp: 'first'
4 +exports.needs = nest({
5 + 'app.sync.goTo': 'first',
6 + 'message.html.backlinks': 'first',
7 + 'message.html.author': 'first',
8 + 'message.html.meta': 'map',
9 + 'message.html.timestamp': 'first'
910 })
1011
1112 exports.gives = nest('message.html.layout')
1213
@@ -25,9 +26,9 @@
2526 }, [
2627 h('section.timestamp', {}, api.message.html.timestamp(msg)),
2728 h('header.author', {}, api.message.html.author(msg, { size: 'mini' })),
2829 h('section.meta', {}, api.message.html.meta(msg, { rawMessage })),
29- h('section.content', {}, opts.content),
30 + h('section.content', { 'ev-click': () => api.app.sync.goTo(msg) }, opts.content),
3031 h('section.raw-content', rawMessage)
3132 ])
3233 }
3334 }
message/html/layout/mini.mcssView
@@ -4,8 +4,9 @@
44 padding: .25rem .5rem
55 min-height: inherit
66
77 display: flex
8 + flex-wrap: wrap
89
910 /* TODO - bring style inline with default.mcss */
1011
1112 section.timestamp {
@@ -29,8 +30,9 @@
2930 order: 2
3031 flex-basis: initial
3132 flex-grow: 1
3233
34 + cursor: pointer
3335 margin-top: 0
3436 }
3537
3638 section.meta {
@@ -48,6 +50,23 @@
4850
4951 section.raw-content {
5052 order: 4
5153 margin-left: 0
54 +
55 + pre {
56 + border: 1px gainsboro solid
57 + padding: .8rem
58 + background-color: #f5f5f5
59 + color: #c121dc
60 + padding: .3rem
61 + white-space: pre-wrap
62 + word-wrap: break-word
63 +
64 + span {
65 + font-weight: 600
66 + }
67 + a {
68 + word-break: break-all
69 + }
70 + }
5271 }
5372 }

Built with git-ssb-web