Skip to content

Commit

Permalink
Merge pull request #1519 from rommapp/romm-1482
Browse files Browse the repository at this point in the history
[ROMM-1482] Display game summary with mdeditor
  • Loading branch information
gantoine authored Jan 23, 2025
2 parents 90e5665 + 8d294bf commit fcd5b78
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions frontend/src/components/Details/Info/GameInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import type { DetailedRom } from "@/stores/roms";
import { storeToRefs } from "pinia";
import { ref } from "vue";
import { useRouter } from "vue-router";
import { useDisplay } from "vuetify";
import { useDisplay, useTheme } from "vuetify";
import { useI18n } from "vue-i18n";
import { MdPreview } from "md-editor-v3";
// Props
const { t } = useI18n();
const props = defineProps<{ rom: DetailedRom }>();
const { xs } = useDisplay();
const theme = useTheme();
const show = ref(false);
const carousel = ref(0);
const router = useRouter();
Expand Down Expand Up @@ -119,7 +121,13 @@ function onFilterClick(filter: FilterType, value: string) {
<v-divider class="mx-2 my-4" />
<v-row no-gutters>
<v-col class="text-caption">
<span>{{ rom.summary }}</span>
<MdPreview
:model-value="rom.summary ?? ''"
:theme="theme.name.value == 'dark' ? 'dark' : 'light'"
preview-theme="vuepress"
code-theme="github"
:readonly="true"
/>
</v-col>
</v-row>
</template>
Expand Down

0 comments on commit fcd5b78

Please sign in to comment.