Skip to content
Snippets Groups Projects
Commit 307d2b7a authored by syuilo's avatar syuilo
Browse files

Clean up

parent 18c4d01f
No related branches found
No related tags found
No related merge requests found
......@@ -32,11 +32,6 @@ boot(me => {
// Register mixins
mixins(me);
// Debug
if (me != null && me.data.debug) {
riot.mount(document.body.appendChild(document.createElement('mk-log-window')));
}
// Start routing
route(me);
});
......@@ -99,5 +99,3 @@ require './tags/user-followers-window.tag'
require './tags/list-user.tag'
require './tags/ui-notification.tag'
require './tags/signin-history.tag'
require './tags/log.tag'
require './tags/log-window.tag'
mk-log-window
mk-window@window(width={ '600px' }, height={ '400px' })
<yield to="header">
i.fa.fa-terminal
| Log
</yield>
<yield to="content">
mk-log
</yield>
style.
> mk-window
[data-yield='header']
> i
margin-right 4px
script.
@on \mount ~>
@refs.window.on \closed ~>
@unmount!
mk-log
header
button.follow(class={ following: following }, onclick={ follow }) Follow
div.logs@logs
code(each={ logs })
span.date { date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds() }
span.message { message }
style.
display block
height 100%
color #fff
background #000
> header
height 32px
background #343a42
> button
line-height 32px
> .follow
position absolute
top 0
right 0
&.following
color #ff0
> .logs
height calc(100% - 32px)
overflow auto
> code
display block
padding 4px 8px
&:hover
background rgba(#fff, 0.15)
> .date
margin-right 8px
opacity 0.5
script.
@mixin \log
@following = true
@on \mount ~>
@log-event.on \log @on-log
@on \unmount ~>
@log-event.off \log @on-log
@follow = ~>
@following = true
@on-log = ~>
@update!
if @following
@refs.logs.scroll-top = @refs.logs.scroll-height
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment