mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-22 05:15:42 +01:00
ui: fix eslint errors
This commit is contained in:
parent
a9de893cca
commit
df0414b26e
@ -24,7 +24,7 @@ export const i18n = new VueI18n({
|
||||
// Borrowed from http://tobyho.com/2012/07/27/taking-over-console-log/
|
||||
function intercept (method) {
|
||||
console[method] = function () {
|
||||
var message = Array.prototype.slice.apply(arguments).join(' ')
|
||||
const message = Array.prototype.slice.apply(arguments).join(' ')
|
||||
window.external.invoke(
|
||||
JSON.stringify({
|
||||
Log: {
|
||||
@ -37,7 +37,7 @@ function intercept (method) {
|
||||
}
|
||||
|
||||
// See if we have access to the JSON interface
|
||||
var hasExternalInterface = false
|
||||
let hasExternalInterface = false
|
||||
try {
|
||||
window.external.invoke(JSON.stringify({
|
||||
Test: {}
|
||||
@ -60,8 +60,8 @@ if (hasExternalInterface) {
|
||||
)
|
||||
}
|
||||
|
||||
var methods = ['log', 'warn', 'error']
|
||||
for (var i = 0; i < methods.length; i++) {
|
||||
const methods = ['log', 'warn', 'error']
|
||||
for (let i = 0; i < methods.length; i++) {
|
||||
intercept(methods[i])
|
||||
}
|
||||
}
|
||||
@ -97,7 +97,7 @@ function selectFileCallback (name) {
|
||||
|
||||
window.selectFileCallback = selectFileCallback
|
||||
|
||||
var app = new Vue({
|
||||
const app = new Vue({
|
||||
i18n: i18n,
|
||||
router: router,
|
||||
data: {
|
||||
@ -125,7 +125,8 @@ var app = new Vue({
|
||||
methods: {
|
||||
exit: function () {
|
||||
axios.get('/api/exit').catch(function (msg) {
|
||||
var searchLocation = (app.metadata.install_path && app.metadata.install_path.length > 0) ? app.metadata.install_path
|
||||
const searchLocation = (app.metadata.install_path && app.metadata.install_path.length > 0)
|
||||
? app.metadata.install_path
|
||||
: i18n.t('error.location_unknown')
|
||||
|
||||
app.$router.replace({
|
||||
|
@ -39,13 +39,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
install: function () {
|
||||
var that = this
|
||||
var app = this.$root
|
||||
const that = this
|
||||
const app = this.$root
|
||||
|
||||
var results = {}
|
||||
const results = {}
|
||||
|
||||
for (var package_index = 0; package_index < app.config.packages.length; package_index++) {
|
||||
var current_package = app.config.packages[package_index]
|
||||
for (let package_index = 0; package_index < app.config.packages.length; package_index++) {
|
||||
const current_package = app.config.packages[package_index]
|
||||
if (current_package.default != null) {
|
||||
results[current_package.name] = current_package.default
|
||||
}
|
||||
@ -57,7 +57,7 @@ export default {
|
||||
results.mode = 'force'
|
||||
}
|
||||
|
||||
var targetUrl = '/api/start-install'
|
||||
let targetUrl = '/api/start-install'
|
||||
if (this.is_uninstall) {
|
||||
targetUrl = '/api/uninstall'
|
||||
}
|
||||
|
@ -116,9 +116,9 @@ export default {
|
||||
this.$router.push('/install/regular')
|
||||
return
|
||||
}
|
||||
var my = this
|
||||
const my = this
|
||||
this.$http.post('/api/verify-path', `path=${this.$root.$data.install_location}`).then(function (resp) {
|
||||
var data = resp.data || {}
|
||||
const data = resp.data || {}
|
||||
if (!data.exists) {
|
||||
my.$router.push('/install/regular')
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user