diff options
Diffstat (limited to 'twittperator/twsidebar.tw')
-rw-r--r-- | twittperator/twsidebar.tw | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/twittperator/twsidebar.tw b/twittperator/twsidebar.tw index f0c0cba..ee8ba3b 100644 --- a/twittperator/twsidebar.tw +++ b/twittperator/twsidebar.tw @@ -126,7 +126,7 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () { let xml; let sbWidth = getSidebarWindow().document.width; let richlistitemClasses = [className('tweet-panel'), className('tweet-' + t.type)]; - let nameClass = t.protected ? className('tweet-protected') : ''; + let nameClass = className('item-name') + ' ' + (t.protected ? className('tweet-protected') : ''); xml = <richlistitem id={t.id} @@ -136,17 +136,21 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () { "width: " + px(sbWidth - 100) + ' !important' ].join(';')} xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - <hbox> - <vbox> + <hbox flex="1"> + <vbox width="48"> <image src={t.img} height="48" width="48" /> </vbox> - <vbox style={"width: " + (sbWidth - 48 - 35) + "px !important"}> + <vbox flex="1"> + <hbox flex="1"> + <label flex="2" class={nameClass}>{escapeBreakers(t.name)}</label> + <spacer hidden={!(t.sub || t.time)} /> + <description flex="1" class={className('item-time-and-sub')} hidden={!(t.sub || t.time)}>{escapeBreakers(t.sub || t.time)}</description> + </hbox> + <description flex="1" class={className('item-text')}>{escapeBreakers(t.text)}</description> <hbox> - <label class={nameClass} style="font-weight: bold">{escapeBreakers(t.name)}</label> - <spacer flex="1"/> - <label>{t.sub || ''}</label> + <description flex="1" class={className('item-sub')} hidden={!t.sub}>{escapeBreakers(t.sub || '')}</description> + <description flex="1" class={className('item-time')} hidden={!t.time}>{escapeBreakers(t.time || '')}</description> </hbox> - <description width="100%">{escapeBreakers(t.text)}</description> </vbox> </hbox> </richlistitem>; @@ -393,8 +397,8 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () { t.text += ' [\u5730\u57DF: ' + msg.user.location + ']'; } - if (!t.sub && msg.created_at) { - t.sub = new Date(msg.created_at).toLocaleTimeString().replace(/:\d+$/,'');; + if (msg.created_at) { + t.time = new Date(msg.created_at).toLocaleTimeString().replace(/:\d+$/,'');; } if (real && dummy) { |