mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2025-01-09 01:15:38 +00:00
lint: automated lint
This commit is contained in:
parent
ca6ac320c2
commit
713b85b59a
7
build.rs
7
build.rs
|
@ -87,8 +87,8 @@ fn main() {
|
||||||
// Copy for the main build
|
// Copy for the main build
|
||||||
copy(&target_config, output_dir.join("bootstrap.toml")).expect("Unable to copy config file");
|
copy(&target_config, output_dir.join("bootstrap.toml")).expect("Unable to copy config file");
|
||||||
|
|
||||||
let yarn_binary = which::which("yarn")
|
let yarn_binary =
|
||||||
.expect("Failed to find yarn - please go ahead and install it!");
|
which::which("yarn").expect("Failed to find yarn - please go ahead and install it!");
|
||||||
|
|
||||||
// Build and deploy frontend files
|
// Build and deploy frontend files
|
||||||
Command::new(&yarn_binary)
|
Command::new(&yarn_binary)
|
||||||
|
@ -100,7 +100,8 @@ fn main() {
|
||||||
.arg(ui_dir.to_str().expect("Unable to covert path"))
|
.arg(ui_dir.to_str().expect("Unable to covert path"))
|
||||||
.spawn()
|
.spawn()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.wait().expect("Unable to install Node.JS dependencies using Yarn");
|
.wait()
|
||||||
|
.expect("Unable to install Node.JS dependencies using Yarn");
|
||||||
let return_code = Command::new(&yarn_binary)
|
let return_code = Command::new(&yarn_binary)
|
||||||
.args(&[
|
.args(&[
|
||||||
"--cwd",
|
"--cwd",
|
||||||
|
|
|
@ -22,8 +22,8 @@ use futures::sink::Sink;
|
||||||
|
|
||||||
mod attributes;
|
mod attributes;
|
||||||
mod config;
|
mod config;
|
||||||
mod default_path;
|
|
||||||
mod dark_mode;
|
mod dark_mode;
|
||||||
|
mod default_path;
|
||||||
mod exit;
|
mod exit;
|
||||||
mod install;
|
mod install;
|
||||||
mod installation_status;
|
mod installation_status;
|
||||||
|
|
|
@ -12,7 +12,7 @@ use log::Level;
|
||||||
enum CallbackType {
|
enum CallbackType {
|
||||||
SelectInstallDir { callback_name: String },
|
SelectInstallDir { callback_name: String },
|
||||||
Log { msg: String, kind: String },
|
Log { msg: String, kind: String },
|
||||||
Test {}
|
Test {},
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Starts the main web UI. Will return when UI is closed.
|
/// Starts the main web UI. Will return when UI is closed.
|
||||||
|
|
|
@ -38,9 +38,9 @@ extern crate chrono;
|
||||||
|
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
extern crate winapi;
|
|
||||||
#[cfg(windows)]
|
|
||||||
extern crate widestring;
|
extern crate widestring;
|
||||||
|
#[cfg(windows)]
|
||||||
|
extern crate winapi;
|
||||||
|
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
extern crate slug;
|
extern crate slug;
|
||||||
|
|
|
@ -300,7 +300,7 @@ mod natives {
|
||||||
Ok(file) => file,
|
Ok(file) => file,
|
||||||
Err(e) => return Err(format!("Unable to create desktop file: {}", e)),
|
Err(e) => return Err(format!("Unable to create desktop file: {}", e)),
|
||||||
};
|
};
|
||||||
let mut desktop_f = desktop_f.write_all(desktop_file.as_bytes());
|
let desktop_f = desktop_f.write_all(desktop_file.as_bytes());
|
||||||
match desktop_f {
|
match desktop_f {
|
||||||
Ok(_) => Ok("".to_string()),
|
Ok(_) => Ok("".to_string()),
|
||||||
Err(e) => Err(format!("Unable to write desktop file: {}", e)),
|
Err(e) => Err(format!("Unable to write desktop file: {}", e)),
|
||||||
|
|
|
@ -24,14 +24,14 @@ function intercept (method) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// See if we have access to the JSON interface
|
// See if we have access to the JSON interface
|
||||||
var has_external_interface = false;
|
var has_external_interface = false
|
||||||
try {
|
try {
|
||||||
window.external.invoke(JSON.stringify({
|
window.external.invoke(JSON.stringify({
|
||||||
Test: {}
|
Test: {}
|
||||||
}))
|
}))
|
||||||
has_external_interface = true;
|
has_external_interface = true
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn("Running without JSON interface - unexpected behaviour may occur!")
|
console.warn('Running without JSON interface - unexpected behaviour may occur!')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overwrite loggers with the logging backend
|
// Overwrite loggers with the logging backend
|
||||||
|
@ -101,13 +101,14 @@ var app = new Vue({
|
||||||
'/api/exit',
|
'/api/exit',
|
||||||
function () {},
|
function () {},
|
||||||
function (msg) {
|
function (msg) {
|
||||||
var search_location = app.metadata.install_path.length > 0 ? app.metadata.install_path :
|
var search_location = app.metadata.install_path.length > 0 ? app.metadata.install_path
|
||||||
"the location where this installer is";
|
: 'the location where this installer is'
|
||||||
|
|
||||||
app.$router.replace({ name: 'showerr', params: { msg: msg +
|
app.$router.replace({ name: 'showerr',
|
||||||
|
params: { msg: msg +
|
||||||
'\n\nPlease upload the log file (in ' + search_location + ') to ' +
|
'\n\nPlease upload the log file (in ' + search_location + ') to ' +
|
||||||
'the ' + app.attrs.name + ' team'
|
'the ' + app.attrs.name + ' team'
|
||||||
}});
|
} })
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
@ -116,4 +117,4 @@ var app = new Vue({
|
||||||
}
|
}
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
||||||
|
|
||||||
console.log("Vue started")
|
console.log('Vue started')
|
||||||
|
|
|
@ -38,12 +38,12 @@ export default {
|
||||||
return {
|
return {
|
||||||
// https://stackoverflow.com/questions/6234773/can-i-escape-html-special-chars-in-javascript
|
// https://stackoverflow.com/questions/6234773/can-i-escape-html-special-chars-in-javascript
|
||||||
msg: this.$route.params.msg
|
msg: this.$route.params.msg
|
||||||
.replace(/&/g, "&")
|
.replace(/&/g, '&')
|
||||||
.replace(/</g, "<")
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, ">")
|
.replace(/>/g, '>')
|
||||||
.replace(/"/g, """)
|
.replace(/"/g, '"')
|
||||||
.replace(/'/g, "'")
|
.replace(/'/g, ''')
|
||||||
.replace(/\n/g, "<br />"),
|
.replace(/\n/g, '<br />'),
|
||||||
remaining: window.history.length > 1
|
remaining: window.history.length > 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue