mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 11:57:34 -07:00
chat button in mobile bar
This commit is contained in:
parent
35eaf74bd6
commit
d9fc088e21
4 changed files with 41 additions and 27 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.119.0-calc.9.1",
|
"version": "12.119.0-calc.9.2",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -3,43 +3,30 @@
|
||||||
<MkAvatar class="avatar" :user="message.user" :show-indicator="true"/>
|
<MkAvatar class="avatar" :user="message.user" :show-indicator="true"/>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="balloon" :class="{ noText: message.text == null }">
|
<div class="balloon" :class="{ noText: message.text == null }">
|
||||||
<button v-if="isMe" class="delete-button" :title="$ts.delete" @click="del">
|
<button v-if="isMe" class="delete-button" :title="i18n.ts.delete" @click="del">
|
||||||
<img src="/client-assets/remove.png" alt="Delete"/>
|
<img src="/client-assets/remove.png" alt="Delete"/>
|
||||||
</button>
|
</button>
|
||||||
<div v-if="!message.isDeleted" class="content">
|
<div v-if="!message.isDeleted" class="content">
|
||||||
<Mfm v-if="message.text" ref="text" class="text" :text="message.text" :i="$i"/>
|
<Mfm v-if="message.text" ref="text" class="text" :text="message.text" :i="$i"/>
|
||||||
<div v-if="message.file" class="file">
|
<div v-if="message.file" class="file">
|
||||||
<img v-if="message.file.type.split('/')[0] == 'image'" :src="message.file.url" :alt="message.file.name" max-width="400px" style="border-radius: 5px"/>
|
<XMediaList v-if="message.file.type.split('/')[0] == 'image' || message.file.type.split('/')[0] == 'video'" :media-list="[message.file]" max-width="400px" style="border-radius: 5px"/>
|
||||||
<VuePlyr v-else-if="message.file.type.split('/')[0] == 'video'">
|
|
||||||
<video
|
|
||||||
:alt="message.file.name"
|
|
||||||
:download="message.file.url"
|
|
||||||
preload="none"
|
|
||||||
controls
|
|
||||||
@contextmenu.stop
|
|
||||||
>
|
|
||||||
<source
|
|
||||||
:src="message.file.url"
|
|
||||||
>
|
|
||||||
</video>
|
|
||||||
</VuePlyr>
|
|
||||||
<a v-else :href="message.file.url" rel="noopener" target="_blank" :title="message.file.name">
|
<a v-else :href="message.file.url" rel="noopener" target="_blank" :title="message.file.name">
|
||||||
<p>{{ message.file.name }}</p>
|
<p>{{ message.file.name }}</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="content">
|
<div v-else class="content">
|
||||||
<p class="is-deleted">{{ $ts.deleted }}</p>
|
<p class="is-deleted">{{ i18n.ts.deleted }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
<MkUrlPreview v-for="url in urls" :key="url" :url="url" style="margin: 8px 0;"/>
|
<MkUrlPreview v-for="url in urls" :key="url" :url="url" style="margin: 8px 0;"/>
|
||||||
<footer>
|
<footer>
|
||||||
<template v-if="isGroup">
|
<template v-if="isGroup">
|
||||||
<span v-if="message.reads.length > 0" class="read">{{ $ts.messageRead }} {{ message.reads.length }}</span>
|
<span v-if="message.reads.length > 0" class="read">{{ i18n.ts.messageRead }} {{ message.reads.length }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span v-if="isMe && message.isRead" class="read">{{ $ts.messageRead }}</span>
|
<span v-if="isMe && message.isRead" class="read">{{ i18n.ts.messageRead }}</span>
|
||||||
</template>
|
</template>
|
||||||
<MkTime :time="message.createdAt"/>
|
<MkTime :time="message.createdAt"/>
|
||||||
<template v-if="message.is_edited"><i class="ph-pencil-bold ph-lg"></i></template>
|
<template v-if="message.is_edited"><i class="ph-pencil-bold ph-lg"></i></template>
|
||||||
|
@ -53,11 +40,12 @@ import { } from 'vue';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import VuePlyr from 'vue-plyr';
|
import VuePlyr from 'vue-plyr';
|
||||||
import type * as Misskey from 'misskey-js';
|
import type * as Misskey from 'misskey-js';
|
||||||
import XImage from '@/components/MkMediaImage.vue';
|
import XMediaList from '@/components/MkMediaList.vue';
|
||||||
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm';
|
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm';
|
||||||
import MkUrlPreview from '@/components/MkUrlPreview.vue';
|
import MkUrlPreview from '@/components/MkUrlPreview.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
message: Misskey.entities.MessagingMessage;
|
message: Misskey.entities.MessagingMessage;
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, defineComponent, ref, toRef, watch } from 'vue';
|
import { computed, defineAsyncComponent, defineComponent, ref, toRef, watch } from 'vue';
|
||||||
import { host } from '@/config';
|
import { host } from '@/config';
|
||||||
import { search } from '@/scripts/search';
|
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { navbarItemDef } from '@/navbar';
|
import { navbarItemDef } from '@/navbar';
|
||||||
import { openAccountMenu as openAccountMenu_ } from '@/account';
|
import { openAccountMenu as openAccountMenu_ } from '@/account';
|
||||||
|
|
|
@ -19,10 +19,31 @@
|
||||||
<button v-if="!isDesktop && !isMobile" class="widgetButton _button" @click="widgetsShowing = true"><i class="ph-stack-bold ph-lg"></i></button>
|
<button v-if="!isDesktop && !isMobile" class="widgetButton _button" @click="widgetsShowing = true"><i class="ph-stack-bold ph-lg"></i></button>
|
||||||
|
|
||||||
<div v-if="isMobile" class="buttons">
|
<div v-if="isMobile" class="buttons">
|
||||||
<button class="button nav _button" @click="drawerMenuShowing = true"><i class="ph-list-bold ph-lg"></i><span v-if="menuIndicated" class="indicator"><i class="ph-circle-fill"></i></span></button>
|
<button class="button nav _button" @click="drawerMenuShowing = true">
|
||||||
<button class="button home _button" @click="mainRouter.currentRoute.value.name === 'index' ? top() : mainRouter.push('/')"><i class="ph-house-bold ph-lg"></i></button>
|
<div class="button-wrapper">
|
||||||
<button class="button notifications _button" @click="mainRouter.push('/my/notifications')"><i class="ph-bell-bold ph-lg"></i><span v-if="$i?.hasUnreadNotification" class="indicator"><i class="ph-circle-fill"></i></span></button>
|
<i class="ph-list-bold ph-lg"></i><span v-if="menuIndicated" class="indicator"><i class="ph-circle-fill"></i></span>
|
||||||
<button class="button widget _button" @click="widgetsShowing = true"><i class="ph-stack-bold ph-lg"></i></button>
|
</div>
|
||||||
|
</button>
|
||||||
|
<button class="button home _button" @click="mainRouter.currentRoute.value.name === 'index' ? top() : mainRouter.push('/')">
|
||||||
|
<div class="button-wrapper">
|
||||||
|
<i class="ph-house-bold ph-lg"></i>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
<button class="button notifications _button" @click="mainRouter.push('/my/notifications')">
|
||||||
|
<div class="button-wrapper">
|
||||||
|
<i class="ph-bell-bold ph-lg"></i><span v-if="$i?.hasUnreadNotification" class="indicator"><i class="ph-circle-fill"></i></span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
<button class="button widget _button" @click="mainRouter.push('/my/messaging')">
|
||||||
|
<div class="button-wrapper">
|
||||||
|
<i class="ph-chats-teardrop-bold ph-lg"></i>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
<button class="button widget _button" @click="widgetsShowing = true">
|
||||||
|
<div class="button-wrapper">
|
||||||
|
<i class="ph-stack-bold ph-lg"></i>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button v-if="isMobile && mainRouter.currentRoute.value.name === 'index'" ref="postButton" class="postButton button post _button" @click="os.post()"><i class="ph-pencil-bold ph-lg"></i></button>
|
<button v-if="isMobile && mainRouter.currentRoute.value.name === 'index'" ref="postButton" class="postButton button post _button" @click="os.post()"><i class="ph-pencil-bold ph-lg"></i></button>
|
||||||
|
@ -68,7 +89,6 @@ import { defaultStore } from '@/store';
|
||||||
import { navbarItemDef } from '@/navbar';
|
import { navbarItemDef } from '@/navbar';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
import { Router } from '@/nirax';
|
|
||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
import { PageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
|
||||||
import { deviceKind } from '@/scripts/device-kind';
|
import { deviceKind } from '@/scripts/device-kind';
|
||||||
|
@ -340,7 +360,6 @@ const wallpaper = localStorage.getItem('wallpaper') != null;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
height: 3.5rem;
|
height: 3.5rem;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
/* background: var(--panel); */
|
|
||||||
background-position: center;
|
background-position: center;
|
||||||
transition: background 0.6s;
|
transition: background 0.6s;
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
|
@ -351,6 +370,14 @@ const wallpaper = localStorage.getItem('wallpaper') != null;
|
||||||
transition: background 0.1s;
|
transition: background 0.1s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> .button-wrapper:active {
|
||||||
|
background-color: var(--accentedBg);
|
||||||
|
width: 60%;
|
||||||
|
border-radius: 10px;
|
||||||
|
transform: translateY(-0.5em);
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue