mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-12-26 00:15:15 +11:00
1.0.27
Usability improvements, fix Firefox message hovering.
This commit is contained in:
parent
7125909046
commit
d6f64de95e
6 changed files with 594 additions and 797 deletions
|
@ -992,13 +992,24 @@ router.delete("/:id/message/:mId", auth, async (req, res, next) => {
|
|||
]
|
||||
})
|
||||
if (chat) {
|
||||
const message = await Message.findOne({
|
||||
where: {
|
||||
id: req.params.mId,
|
||||
chatId: chat.chat.id,
|
||||
userId: req.user.id
|
||||
let options
|
||||
if (chat.rank === "admin") {
|
||||
options = {
|
||||
where: {
|
||||
id: req.params.mId,
|
||||
chatId: chat.chat.id
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
options = {
|
||||
where: {
|
||||
id: req.params.mId,
|
||||
chatId: chat.chat.id,
|
||||
userId: req.user.id
|
||||
}
|
||||
}
|
||||
}
|
||||
const message = await Message.findOne(options)
|
||||
if (message) {
|
||||
await message.destroy()
|
||||
chat.chat.users.forEach((user) => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "colubrina",
|
||||
"version": "1.0.26",
|
||||
"version": "1.0.27",
|
||||
"description": "Simple instant communication.",
|
||||
"private": true,
|
||||
"author": "Troplo <troplo@troplo.com>",
|
||||
|
|
|
@ -753,6 +753,8 @@ export default {
|
|||
}
|
||||
},
|
||||
async mounted() {
|
||||
if (localStorage.getItem("forceEnableDevMode"))
|
||||
this.$store.state.release = "dev"
|
||||
await this.$store.dispatch("doInit")
|
||||
if (this.$vuetify.breakpoint.mobile) {
|
||||
this.$store.state.drawer = false
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
right: 0;
|
||||
margin-top: -15px;
|
||||
margin-right: 5px;
|
||||
visibility: hidden;
|
||||
}
|
||||
/* large codeblock */
|
||||
code {
|
||||
|
@ -23,13 +24,25 @@ code {
|
|||
display: block;
|
||||
padding: 20px;
|
||||
}
|
||||
.message-hover {
|
||||
.message:hover {
|
||||
background-color: var(--v-bg-lighten1);
|
||||
border-radius: 5px;
|
||||
}
|
||||
.message-toast {
|
||||
background-color: rgba(47, 47, 47, 0.9) !important;
|
||||
}
|
||||
.message-date {
|
||||
visibility: hidden;
|
||||
}
|
||||
.message:hover .message-date {
|
||||
visibility: visible;
|
||||
}
|
||||
.message:hover .message-action-card {
|
||||
visibility: visible;
|
||||
}
|
||||
.message:hover .hide-on-hover {
|
||||
visibility: hidden;
|
||||
}
|
||||
img.emoji {
|
||||
/* Since we are using SVGs, you have to change the width using CSS */
|
||||
height: 1.4em;
|
||||
|
|
|
@ -601,9 +601,27 @@
|
|||
</v-tooltip>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-toolbar-title>
|
||||
{{ $route.name }}
|
||||
</v-toolbar-title>
|
||||
<v-toolbar-title
|
||||
v-if="!$vuetify.breakpoint.mobile"
|
||||
id="bettercompass-title"
|
||||
:style="
|
||||
'color: ' +
|
||||
$vuetify.theme.themes[$vuetify.theme.dark ? 'dark' : 'light']
|
||||
.primary
|
||||
"
|
||||
class="troplo-title"
|
||||
@click="$router.push('/')"
|
||||
style="cursor: pointer"
|
||||
>{{ $store.state.site.name }}</v-toolbar-title
|
||||
><v-app-bar-nav-icon
|
||||
v-if="
|
||||
!$vuetify.breakpoint.mobile &&
|
||||
$store.state.site.release !== 'stable'
|
||||
"
|
||||
style="z-index: 1000"
|
||||
disabled
|
||||
>{{ $store.state.site.release }}</v-app-bar-nav-icon
|
||||
>
|
||||
<v-spacer></v-spacer>
|
||||
<v-tooltip bottom>
|
||||
<template v-slot:activator="{ on }">
|
||||
|
@ -954,6 +972,12 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
goToRoute() {
|
||||
if (this.route.value === "forceEnableDevMode") {
|
||||
this.$store.state.site.release = "dev"
|
||||
localStorage.setItem("forceEnableDevMode", "true")
|
||||
this.$toast.success("OK")
|
||||
return
|
||||
}
|
||||
this.$router.push(this.route.value)
|
||||
this.route.modal = false
|
||||
this.route.value = ""
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue