You've already forked AstralRinth
forked from didirus/AstralRinth
Turn off dev mode in production, work on mod pages
This commit is contained in:
@@ -1,10 +1,30 @@
|
||||
<template>
|
||||
<div>{{ JSON.stringify(mod) }}</div>
|
||||
<div class="columns">
|
||||
<div class="content column-grow-5">
|
||||
<div class="mod-header">
|
||||
<img
|
||||
:src="
|
||||
mod.icon_url
|
||||
? mod.icon_url
|
||||
: 'https://cdn.modrinth.com/placeholder.png'
|
||||
"
|
||||
alt="mod-icon"
|
||||
/>
|
||||
</div>
|
||||
<div class="markdown-body" v-html="modBody"></div>
|
||||
</div>
|
||||
<section class="mod-info">
|
||||
<h3>Mod Name</h3>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
import xss from 'xss'
|
||||
import marked from 'marked'
|
||||
|
||||
export default {
|
||||
auth: false,
|
||||
/*
|
||||
@@ -41,12 +61,11 @@ export default {
|
||||
const mod = res.data
|
||||
|
||||
res = await axios.get(mod.body_url)
|
||||
|
||||
console.log(res.data)
|
||||
const body = xss(marked(res.data))
|
||||
|
||||
return {
|
||||
mod,
|
||||
modBody: res.data,
|
||||
modBody: body,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
:src="
|
||||
previewImage
|
||||
? previewImage
|
||||
: 'https://cdn.modrinth.com/file/modrinth/placeholder.png'
|
||||
: 'https://cdn.modrinth.com/placeholder.png'
|
||||
"
|
||||
alt="preview-image"
|
||||
/>
|
||||
@@ -283,7 +283,7 @@
|
||||
import axios from 'axios'
|
||||
import Multiselect from 'vue-multiselect'
|
||||
|
||||
import DOMPurify from 'dompurify'
|
||||
import xss from 'xss'
|
||||
import marked from 'marked'
|
||||
|
||||
import ExitIcon from '~/assets/images/utils/exit.svg?inline'
|
||||
@@ -434,7 +434,7 @@ export default {
|
||||
this.currentVersionIndex = -1
|
||||
},
|
||||
setMarkdownBody() {
|
||||
this.compiledBody = DOMPurify.sanitize(marked(this.body))
|
||||
this.compiledBody = xss(marked(this.body))
|
||||
},
|
||||
getFilesSelectedText(length, defaultText) {
|
||||
if (length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user