mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-12-09 06:32:43 +08:00
04b76cd453
Signed-off-by: MiniDigger <admin@minidigger.me>
37 lines
1.2 KiB
Vue
37 lines
1.2 KiB
Vue
<template>
|
|
<v-dialog v-model="dialog" max-width="700">
|
|
<template #activator="{ attrs, on }">
|
|
<slot name="activator" :attrs="attrs" :on="on" />
|
|
</template>
|
|
<v-card>
|
|
<v-card-title>{{ title }}</v-card-title>
|
|
<v-card-text>
|
|
<Markdown :raw="markdown"></Markdown>
|
|
</v-card-text>
|
|
<v-card-actions class="justify-end">
|
|
<v-btn text color="warning" @click="dialog = false">{{ $t('general.close') }}</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { Component, Prop } from 'nuxt-property-decorator';
|
|
import { PropType } from 'vue';
|
|
import { TranslateResult } from 'vue-i18n';
|
|
import { HangarFormModal } from '~/components/mixins';
|
|
import Markdown from '~/components/markdown/Markdown.vue';
|
|
@Component({
|
|
components: { Markdown },
|
|
})
|
|
export default class MarkdownModal extends HangarFormModal {
|
|
@Prop({ type: String as PropType<string | TranslateResult>, required: true })
|
|
title!: string | TranslateResult;
|
|
|
|
@Prop({ type: String, required: true })
|
|
markdown!: string;
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped></style>
|