mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-22 17:45:36 +01:00
Fix error display on launcher pages
This commit is contained in:
parent
5d31fd0129
commit
6272c294c8
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="column has-padding">
|
<div class="column" v-bind:class="{ 'has-padding': !$root.$data.metadata.is_launcher }">
|
||||||
<b-message title="An error occurred" type="is-danger" :closable="false">
|
<b-message title="An error occurred" type="is-danger" :closable="false">
|
||||||
<span id="error_msg">{{ msg }}</span>
|
<div id="error_msg" v-html="msg"></div>
|
||||||
</b-message>
|
</b-message>
|
||||||
<div class="field is-grouped is-right-floating is-bottom-floating">
|
<div class="field is-grouped is-right-floating is-bottom-floating">
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<a class="button is-primary is-medium" v-if="remaining && !is_launcher" v-on:click="go_back">Back</a>
|
<a class="button is-primary is-medium" v-if="remaining && !$root.$data.metadata.is_launcher" v-on:click="go_back">Back</a>
|
||||||
<a class="button is-primary is-medium" v-if="is_launcher" v-on:click="exit">Exit</a>
|
<a class="button is-primary is-medium" v-if="$root.$data.metadata.is_launcher" v-on:click="exit">Exit</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -36,7 +36,14 @@ export default {
|
|||||||
name: 'ErrorView',
|
name: 'ErrorView',
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
msg: this.$route.params.msg,
|
// https://stackoverflow.com/questions/6234773/can-i-escape-html-special-chars-in-javascript
|
||||||
|
msg: this.$route.params.msg
|
||||||
|
.replace(/&/g, "&")
|
||||||
|
.replace(/</g, "<")
|
||||||
|
.replace(/>/g, ">")
|
||||||
|
.replace(/"/g, """)
|
||||||
|
.replace(/'/g, "'")
|
||||||
|
.replace(/\n/g, "<br />"),
|
||||||
remaining: window.history.length > 1
|
remaining: window.history.length > 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user