minor fixes

This commit is contained in:
grimhilt 2023-04-16 15:22:49 +02:00
parent 614f7d9802
commit 0f063deff9
4 changed files with 22 additions and 3 deletions

View File

@ -122,7 +122,7 @@ export async function getMessages(roomId: number) {
WHERE msg.room_id = ?
GROUP BY msg.message_id
ORDER BY message.idate DESC;
ORDER BY message.idate ASC;
`;
const values = [roomId];
return await execQueryAsync(query, values);

View File

@ -235,6 +235,7 @@ function sendMessage() {
display: flex;
flex-direction: row;
padding: 0 10px 10px 10px;
max-height: 500px;
overflow: auto;
}

View File

@ -4,6 +4,7 @@ import { Message } from "@/store/models/model";
import API from "@/services/imapAPI";
import store from "@/store/store";
import { isSeenFc } from "@/utils/flagsUtils";
import SvgLoader from "@/components/utils/SvgLoader.vue";
const props = defineProps({
msg: Object as PropType<Message>,
@ -33,7 +34,7 @@ const setFlag = (flag: string) => {
};
</script>
<template>
<div>
<div id="main">
<div class="button" @click="setFlag('\\Seen')">
{{ isSeenFc(props.msg?.flags) ? "Mark as not read" : "Mark as read" }}
</div>
@ -44,14 +45,30 @@ const setFlag = (flag: string) => {
<div>transfer</div>
<div>see source</div>
<div>{{ props.msg?.flags }}</div>
<div class="icons">
<SvgLoader svg="flag-line" />
<SvgLoader svg="reply-line" />
<SvgLoader svg="delete-bin-4-line" />
<SvgLoader svg="delete-bin-6-line" />
<SvgLoader svg="share-forward-line" />
<SvgLoader svg="reply-all-line" />
<SvgLoader svg="mail-check-line" />
<SvgLoader svg="mail-unread-line" />
</div>
</div>
</template>
<style scoped>
div {
#main {
text-align: center;
}
.icons {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.button {
border: solid 1px;
border-radius: 6px;

View File

@ -77,5 +77,6 @@ provide("room", room);
.messages {
flex-grow: 1;
overflow: auto;
}
</style>