~emerson/clarityirc

b83d67a9906c45c1c3ce63b53bf9c145efa0f86d — emerson 1 year, 4 months ago a1ea1dd
message formatting
1 files changed, 18 insertions(+), 1 deletions(-)

M src/components/MessageScreen.vue
M src/components/MessageScreen.vue => src/components/MessageScreen.vue +18 -1
@@ 30,7 30,11 @@ function getChatHistory() {
      <li v-for="message in networks.get(metadata.focusedNetwork)?.serverMessages">{{ message.toString() }}</li>
    </ul>
    <ul class="channel-messages" v-if="metadata.hasFocusedChannel">
      <li v-for="message in channels.get(metadata.focusedNetwork)?.get(metadata.focusedChannel)?.messages"><span class="date">{{ message.time.toISOString() }}</span> <span class="sender">{{ message.sender }}</span> <span class="message-text">{{ message.text }}</span></li>
      <li v-for="message in channels.get(metadata.focusedNetwork)?.get(metadata.focusedChannel)?.messages">
        <span class="date">{{ message.time.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false }) }} </span>
        <span class="sender">{{ message.sender }} </span>
        <span class="message-text">{{ message.text }} </span>
      </li>
    </ul>
  </div>
  <InputBar />


@@ 55,4 59,17 @@ function getChatHistory() {
  justify-content: end;
  height: 100%;
}

.channel-messages li {
  display: flex;
}

.channel-messages span {
  display: inline-block;
  padding-right: 4px;
}

.channel-messages .sender {
  font-weight: bold;
}
</style>
\ No newline at end of file