diff --git a/client/src/assets/styles/_variables.scss b/client/src/assets/styles/_variables.scss
index cf48adf9..f74ac679 100644
--- a/client/src/assets/styles/_variables.scss
+++ b/client/src/assets/styles/_variables.scss
@@ -26,5 +26,5 @@ $style-error: #d32f2f;
$menu-height: 40px;
$controls-height: 125px;
-$side-width: 300px;
+$side-width: 400px;
diff --git a/client/src/components/chat.vue b/client/src/components/chat.vue
index b59a9923..79651343 100644
--- a/client/src/components/chat.vue
+++ b/client/src/components/chat.vue
@@ -11,15 +11,14 @@
{{ member(message.id).username }}
{{ timestamp(message.created) }}
-
-
-
+
- You
{{ member(message.id).username }}
{{ message.content }}
-
+
@@ -37,6 +36,7 @@
@@ -84,12 +84,13 @@
li {
flex: 1;
border-top: 1px solid var(--border-color);
- padding: 10px 10px 0px 10px;
+ padding: 10px 5px 0px 10px;
display: flex;
flex-direction: row;
+ flex-wrap: nowrap;
overflow: hidden;
- user-select: contain;
- max-width: 100%;
+ user-select: text;
+ word-wrap: break-word;
&.message {
.author {
@@ -100,7 +101,7 @@
height: 40px;
border-radius: 50%;
background: $style-primary;
- margin: 5px 10px 10px 0px;
+ margin: 0px 10px 10px 0px;
img {
width: 100%;
@@ -111,34 +112,41 @@
flex: 1;
display: flex;
flex-direction: column;
- line-height: 22px;
+ box-sizing: border-box;
+ word-wrap: break-word;
+ min-width: 0;
.content-head {
cursor: default;
+ width: 100%;
+ margin-bottom: 3px;
+ display: block;
span {
+ display: inline-block;
color: $text-normal;
font-weight: 500;
- float: left;
+ font-size: 16px;
}
.timestamp {
- margin-left: 5px;
color: $text-muted;
- float: left;
- font-size: 0.8em;
- line-height: 1.7em;
+ font-size: 0.7rem;
+ font-weight: 500;
+ margin-left: 0.3rem;
+ line-height: 12px;
+
+ &::first-letter {
+ text-transform: uppercase;
+ }
}
}
- ::v-deep .content-body {
- display: flex;
- color: $text-normal;
- line-height: 22px;
- * {
- word-wrap: break-word;
- max-width: 225px;
- }
+ ::v-deep .content-body {
+ color: $text-normal;
+ line-height: 20px;
+ word-wrap: break-word;
+ overflow-wrap: break-word;
a {
color: $text-link;
@@ -157,19 +165,22 @@
padding-left: 3px;
}
- .spoiler {
- background: $background-tertiary;
- padding: 0 2px;
- border-radius: 4px;
- cursor: pointer;
+ span {
+ &.spoiler {
+ background: $background-tertiary;
+ padding: 0 2px;
+ border-radius: 4px;
+ cursor: pointer;
- span {
- opacity: 0;
+ span {
+ opacity: 0;
+ }
}
- &.active {
+ &.spoiler.active {
background: $background-secondary;
cursor: default;
+
span {
opacity: 1;
}
@@ -189,22 +200,19 @@
white-space: pre-wrap;
}
- div {
+ pre {
+ flex: 1;
+ color: $interactive-normal;
+ border: 1px solid $background-tertiary;
+ background: $background-secondary;
+ padding: 8px 6px;
+ margin: 4px 0;
+ border-radius: 4px;
+ display: block;
flex: 1;
- pre {
- color: $interactive-normal;
- border: 1px solid $background-tertiary;
- background: $background-secondary;
- padding: 8px 6px;
- margin: 4px 0;
- border-radius: 4px;
+ code {
display: block;
- flex: 1;
-
- code {
- display: block;
- }
}
}
}
@@ -212,26 +220,22 @@
}
&.event {
- flex: 1;
- overflow: hidden;
- display: flex;
- height: 15px;
color: $text-muted;
cursor: default;
- span {
- white-space: nowrap;
- max-width: 250px;
- text-overflow: ellipsis;
- overflow: hidden;
- height: 15px;
+ .content {
+ min-width: 0;
+ box-sizing: border-box;
+ word-wrap: break-word;
+ display: inline-block;
+ vertical-align: baseline;
+ line-height: 20px;
strong {
font-weight: 600;
}
i {
- float: right;
font-style: italic;
font-size: 10px;
}
@@ -263,6 +267,13 @@
border-radius: 5px;
display: flex;
+ .emoji {
+ width: 20px;
+ height: 20px;
+ // background: #fff;
+ margin: 3px 3px 0 0;
+ }
+
textarea {
flex: 1;
font-family: $text-family;
@@ -364,7 +375,8 @@
}
timestamp(time: Date) {
- return formatRelative(time, new Date())
+ const str = formatRelative(time, new Date())
+ return `${str.charAt(0).toUpperCase()}${str.slice(1)}`
}
onContext(event: MouseEvent, data: any) {
diff --git a/client/src/components/markdown.ts b/client/src/components/markdown.ts
index ce4bb042..719d6581 100644
--- a/client/src/components/markdown.ts
+++ b/client/src/components/markdown.ts
@@ -202,10 +202,10 @@ const rules: MarkdownRules = {
match: source => /^[\s\S]+?(?=[^0-9A-Za-z\s\u00c0-\uffff-]|\n\n|\n|\w+:\S|$)/.exec(source),
html(node, output, state) {
if (state.escapeHTML) {
- return htmlTag('span', md.sanitizeText(node.content), {}, state)
+ return md.sanitizeText(node.content)
}
- return htmlTag('span', node.content, {}, state)
+ return node.content
},
},
br: {
@@ -234,7 +234,7 @@ const rules: MarkdownRules = {
}
},
html(node, output, state) {
- return htmlTag('span', output(node.content, state), { class: 'spoiler' }, state) //htmlTag('span', , { }, state)
+ return htmlTag('span', htmlTag('span', output(node.content, state), {}, state), { class: 'spoiler' }, state) //htmlTag('span', , { }, state)
},
},
}