Use pre-rendered instance description

This commit is contained in:
silverpill 2022-12-01 21:54:21 +00:00
parent 8a911a5724
commit 7db6c4b18b
2 changed files with 3 additions and 3 deletions

View file

@ -28,6 +28,7 @@ export interface InstanceInfo {
title: string; title: string;
short_description: string; short_description: string;
description: string; description: string;
description_html: string;
version: string; version: string;
registrations: boolean; registrations: boolean;
login_message: string; login_message: string;

View file

@ -2,7 +2,7 @@
<sidebar-layout v-if="currentUser"> <sidebar-layout v-if="currentUser">
<template #content v-if="instance"> <template #content v-if="instance">
<h1>{{ instance.title }}</h1> <h1>{{ instance.title }}</h1>
<div class="description static-text" v-html="renderMarkdown(instance.description)"></div> <div class="description static-text" v-html="instance.description_html"></div>
<details class="technical-info static-text"> <details class="technical-info static-text">
<summary>Technical Info</summary> <summary>Technical Info</summary>
mitra version: {{ getMitraVersion(instance.version) }} mitra version: {{ getMitraVersion(instance.version) }}
@ -14,7 +14,7 @@
<static-page v-else-if="currentUser === null && instance" class="wide"> <static-page v-else-if="currentUser === null && instance" class="wide">
<template #heading>{{ instance.title }}</template> <template #heading>{{ instance.title }}</template>
<template #text> <template #text>
<div v-html="renderMarkdown(instance.description)"></div> <div v-html="instance.description_html"></div>
</template> </template>
</static-page> </static-page>
</template> </template>
@ -27,7 +27,6 @@ import SidebarLayout from "@/components/SidebarLayout.vue"
import StaticPage from "@/components/StaticPage.vue" import StaticPage from "@/components/StaticPage.vue"
import { useCurrentUser } from "@/store/user" import { useCurrentUser } from "@/store/user"
import { useInstanceInfo } from "@/store/instance" import { useInstanceInfo } from "@/store/instance"
import { renderMarkdown } from "@/utils/markdown"
const { currentUser } = $(useCurrentUser()) const { currentUser } = $(useCurrentUser())
const { instance } = $(useInstanceInfo()) const { instance } = $(useInstanceInfo())