revert messaging room

This commit is contained in:
ThatOneCalculator 2023-04-24 15:45:34 -07:00
parent df8294bde3
commit b2e80db219
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
2 changed files with 111 additions and 111 deletions

View File

@ -76,7 +76,9 @@ export function apiMastodonCompatible(router: Router): void {
} }
}); });
router.post<{ Params: { id: string } }>("/v1/announcements/:id/dismiss", async (ctx) => { router.post<{ Params: { id: string } }>(
"/v1/announcements/:id/dismiss",
async (ctx) => {
const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`;
const accessTokens = ctx.request.headers.authorization; const accessTokens = ctx.request.headers.authorization;
const client = getClient(BASE_URL, accessTokens); const client = getClient(BASE_URL, accessTokens);
@ -88,7 +90,8 @@ export function apiMastodonCompatible(router: Router): void {
ctx.status = 401; ctx.status = 401;
ctx.body = e.response.data; ctx.body = e.response.data;
} }
}); },
);
router.get("/v1/filters", async (ctx) => { router.get("/v1/filters", async (ctx) => {
const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`;

View File

@ -1,12 +1,12 @@
<template> <template>
<MkStickyContainer> <div
<template #header ref="rootEl"
><MkPageHeader class="_section"
:actions="headerActions" @dragover.prevent.stop="onDragover"
:tabs="headerTabs" @drop.prevent.stop="onDrop"
:display-back-button="true" >
/></template> <div class="_content mk-messaging-room">
<MkSpacer :content-max="800" class="mk-messaging-room"> <MkSpacer :content-max="800">
<div class="body"> <div class="body">
<MkPagination <MkPagination
v-if="pagination" v-if="pagination"
@ -72,7 +72,7 @@
@click="onIndicatorClick" @click="onIndicatorClick"
> >
<i <i
class="fas ph-fw ph-lg ph-arrow-circle-down ph-bold ph-lg" class="fas ph-fw ph-lg ph-arrow-circle-down-bold ph-lg"
></i ></i
>{{ i18n.ts.newMessageExists }} >{{ i18n.ts.newMessageExists }}
</button> </button>
@ -87,7 +87,8 @@
/> />
</footer> </footer>
</MkSpacer> </MkSpacer>
</MkStickyContainer> </div>
</div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -327,12 +328,14 @@ function onVisibilitychange() {
} }
} }
const headerActions = $computed(() => []);
const headerTabs = $computed(() => []);
onMounted(() => { onMounted(() => {
fetch(); fetch();
definePageMetadata(
computed(() => ({
title: group != null ? group.name : user?.name,
icon: "ph-chats-teardrop-bold ph-lg",
}))
);
}); });
onBeforeUnmount(() => { onBeforeUnmount(() => {
@ -340,15 +343,6 @@ onBeforeUnmount(() => {
document.removeEventListener("visibilitychange", onVisibilitychange); document.removeEventListener("visibilitychange", onVisibilitychange);
if (scrollRemove) scrollRemove(); if (scrollRemove) scrollRemove();
}); });
await fetch();
definePageMetadata(
computed(() => ({
title: group != null ? group.name : user?.name,
icon: "ph-chats-teardrop ph-bold ph-lg",
avatar: group != null ? null : user,
}))
);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -357,6 +351,9 @@ XMessage:last-of-type {
} }
.mk-messaging-room { .mk-messaging-room {
position: relative;
overflow: auto;
> .body { > .body {
.more { .more {
display: block; display: block;