mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-06 20:02:38 +00:00
add readme about losehu firmware
This commit is contained in:
parent
c6e917f1b9
commit
d10bc7f354
4 changed files with 19112 additions and 1574 deletions
17382
package-lock.json
generated
Normal file
17382
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -23,9 +23,11 @@
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"chinese-s2t": "^1.0.0",
|
"chinese-s2t": "^1.0.0",
|
||||||
"dayjs": "^1.11.5",
|
"dayjs": "^1.11.5",
|
||||||
|
"dompurify": "^3.1.7",
|
||||||
"echarts": "^5.4.0",
|
"echarts": "^5.4.0",
|
||||||
"electron-squirrel-startup": "^1.0.0",
|
"electron-squirrel-startup": "^1.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
|
"marked": "^14.1.2",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.0.23",
|
"pinia": "^2.0.23",
|
||||||
|
@ -52,6 +54,7 @@
|
||||||
"@electron-forge/maker-zip": "^7.2.0",
|
"@electron-forge/maker-zip": "^7.2.0",
|
||||||
"@electron-forge/plugin-auto-unpack-natives": "^7.2.0",
|
"@electron-forge/plugin-auto-unpack-natives": "^7.2.0",
|
||||||
"@rabbitholesyndrome/electron-forge-maker-portable": "^0.2.0",
|
"@rabbitholesyndrome/electron-forge-maker-portable": "^0.2.0",
|
||||||
|
"@types/dompurify": "^3.0.5",
|
||||||
"@types/lodash": "^4.14.186",
|
"@types/lodash": "^4.14.186",
|
||||||
"@types/mockjs": "^1.0.7",
|
"@types/mockjs": "^1.0.7",
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.0",
|
||||||
|
|
|
@ -18,6 +18,11 @@
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
<a-row :gutter="20" align="stretch" style="margin-top: 10px;">
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-card style="padding: 20px;" class="general-card" v-html="state.readme"></a-card>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -26,6 +31,8 @@ import { reactive, onMounted, watch } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { marked } from 'marked';
|
||||||
|
import DOMPurify from 'dompurify';
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -56,13 +63,15 @@ const state: {
|
||||||
flag: any,
|
flag: any,
|
||||||
disMatrix: any,
|
disMatrix: any,
|
||||||
disName: any,
|
disName: any,
|
||||||
showSort: any
|
showSort: any,
|
||||||
|
readme: any
|
||||||
} = reactive({
|
} = reactive({
|
||||||
versions: [],
|
versions: [],
|
||||||
flag: [],
|
flag: [],
|
||||||
disMatrix: [],
|
disMatrix: [],
|
||||||
disName: [],
|
disName: [],
|
||||||
showSort: [],
|
showSort: [],
|
||||||
|
readme: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => [...state.flag], () => { updateMatrix() })
|
watch(() => [...state.flag], () => { updateMatrix() })
|
||||||
|
@ -116,6 +125,14 @@ onMounted(async () => {
|
||||||
state.versions = JSON.parse(versions)
|
state.versions = JSON.parse(versions)
|
||||||
updateMatrix()
|
updateMatrix()
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
|
if(t('menu.dashboard') == 'CPS'){
|
||||||
|
state.readme = DOMPurify.sanitize(await marked.parse(await (await fetch('https://k5.vicicode.cn/diyapi/README_en.md?v=' + (new Date()).getTime())).text()))
|
||||||
|
}else{
|
||||||
|
state.readme = DOMPurify.sanitize(await marked.parse(await (await fetch('https://k5.vicicode.cn/diyapi/README.md?v=' + (new Date()).getTime())).text()))
|
||||||
|
}
|
||||||
|
state.readme = state.readme.replaceAll('href="./README_en.md"', '')
|
||||||
|
state.readme = state.readme.replaceAll('href="./README.md"', '')
|
||||||
|
state.readme = state.readme.replaceAll('losehu/uv-k5-firmware-chinese/blob/main/payment/show.png', 'losehu/uv-k5-firmware-chinese/blob/main/payment/show.png?raw=true')
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue