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

View File

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