diff --git a/site/src/components/alert/style.styl b/site/src/components/alert/style.styl index 890aac3..edd1c93 100644 --- a/site/src/components/alert/style.styl +++ b/site/src/components/alert/style.styl @@ -7,6 +7,15 @@ height 40px background #24263A + .stroke + position absolute + top 0 + left 0 + right 0 + height 1px + background #FD4141 + display none + .icon position absolute top 10px @@ -24,4 +33,7 @@ display none &.hover - display inline-block \ No newline at end of file + display inline-block + + .stroke + display block \ No newline at end of file diff --git a/site/src/components/alert/template.html b/site/src/components/alert/template.html index cbe7c89..77a49a0 100644 --- a/site/src/components/alert/template.html +++ b/site/src/components/alert/template.html @@ -1,4 +1,5 @@ + \ No newline at end of file diff --git a/site/src/components/chat/script.js b/site/src/components/chat/script.js index 52deff8..4dbcf2f 100644 --- a/site/src/components/chat/script.js +++ b/site/src/components/chat/script.js @@ -31,6 +31,11 @@ export default user() { return this.$store.state.chat.user + }, + + scrollbarWidth() + { + return this.$store.state.scrollbarWidth } }, @@ -152,6 +157,9 @@ export default // Reset question this.$store.commit('setQuestion', null) + + // Scroll to bottom + this.scrollToBottom() } } }, @@ -197,6 +205,25 @@ export default scrollToBottom() { this.$messages.scrollTop = this.$innerMessages.offsetHeight - this.$messages.offsetHeight + }, + + formatMinutes(time) + { + const date = new Date(time) + + let minutes = '' + date.getMinutes() + if(minutes.length === 1) + { + minutes = `0${minutes}` + } + + let hours = '' + date.getHours() + if(hours.length === 1) + { + hours = `0${hours}` + } + + return `${hours}:${minutes}` } } } \ No newline at end of file diff --git a/site/src/components/chat/style.styl b/site/src/components/chat/style.styl index f93f950..e000975 100644 --- a/site/src/components/chat/style.styl +++ b/site/src/components/chat/style.styl @@ -16,6 +16,15 @@ font-size 14px white-space nowrap + .stroke + position absolute + top 0 + left 0 + right 0 + height 1px + background #4BD1C5 + display none + .icon margin-left 4px @@ -31,12 +40,153 @@ color #4BD1C5 &:hover - color #4BD1C5 + .stroke + display block -.user-name - outline none - border none +.content + position relative + background #24263A + height 450px + width 300px + overflow hidden -.messages - height 300px - overflow-y scroll \ No newline at end of file + .header + position absolute + top 0 + left 0 + width 100% + height 40px + padding-left 14px + line-height 40px + font-size 14px + + .stroke + position absolute + top 0 + left 0 + right 0 + height 1px + background #4BD1C5 + display none + + .dash + position absolute + top calc(50% - 1px) + right 14px + height 2px + width 12px + background #fff + + &:hover + .stroke + display block + + .messages + position absolute + top 40px + left 0 + right 0 + height 330px + padding-top 4px + overflow-y scroll + background #393855 + font-size 12px + + .message + position relative + padding-left 21px + margin-bottom 10px + + .stroke + position absolute + top 0px + left 10px + width 2px + bottom 2px + + .message-user + padding-bottom 3px + + .message-date + display inline-block + opacity 0 + padding-left 4px + padding-bottom 3px + + .message-file + display block + padding-bottom 3px + opacity 0.7 + + &:hover + opacity 1 + color #4BD1C5 + + &:hover + .message-date + opacity 0.4 + + + .user + position absolute + top 374px + left 0 + font-size 12px + padding-left 8px + + .user-label + opacity 0.7 + + .user-name + outline none + border none + + .question + position absolute + bottom 0 + right 0 + padding 4px + font-size 12px + + .question-file + position absolute + bottom 5px + right 22px + opacity 0.7 + white-space nowrap + pointer-events none + + .remove + position absolute + bottom 0 + right 0 + width 20px + height 20px + padding-top 4px + padding-left 3px + + .icon + &.default + display block + + &.hover + display none + + &:hover + .icon + &.default + display none + + &.hover + display block + + textarea + position absolute + bottom 0 + left 0 + font-size 12px + width 100% + height 58px + padding-left 8px + resize none + // opacity 0.8 \ No newline at end of file diff --git a/site/src/components/chat/template.html b/site/src/components/chat/template.html index 08543ba..caa8258 100644 --- a/site/src/components/chat/template.html +++ b/site/src/components/chat/template.html @@ -1,5 +1,6 @@
+ Discussions @@ -7,34 +8,37 @@
+ +
Discussions
-
+
-
- {{ message.time }} -
-
+
+ {{ message.user.name }} -
- + + + {{ formatMinutes(message.time) }} + + {{ message.file }}:{{ message.line }} -
+
-
- Your nickname is +
+ Your nickname is
+
- Question: {{ question.file }}:{{ question.line }} - x -
-
\ No newline at end of file diff --git a/site/static/svg/cross-hover.svg b/site/static/svg/cross-hover.svg index 74d9bda..9966877 100644 --- a/site/static/svg/cross-hover.svg +++ b/site/static/svg/cross-hover.svg @@ -4,7 +4,7 @@ croix Created with Sketch. - + diff --git a/site/static/svg/cross.svg b/site/static/svg/cross.svg index be30c07..b26acec 100644 --- a/site/static/svg/cross.svg +++ b/site/static/svg/cross.svg @@ -4,7 +4,7 @@ croix Created with Sketch. - +