mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-22 11:25:41 +01:00
Polish Vue UI split
This commit is contained in:
parent
27d0a05ade
commit
341a6a6537
11
Cargo.lock
generated
11
Cargo.lock
generated
@ -646,6 +646,7 @@ dependencies = [
|
|||||||
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"web-view 0.4.1 (git+https://github.com/j-selby/web-view.git?rev=752106e4637356cbdb39a0bf1113ea3ae8a14243)",
|
"web-view 0.4.1 (git+https://github.com/j-selby/web-view.git?rev=752106e4637356cbdb39a0bf1113ea3ae8a14243)",
|
||||||
|
"which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"winres 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winres 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"xz2 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"xz2 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -1914,6 +1915,15 @@ dependencies = [
|
|||||||
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "which"
|
||||||
|
version = "2.0.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winapi"
|
name = "winapi"
|
||||||
version = "0.2.8"
|
version = "0.2.8"
|
||||||
@ -2209,6 +2219,7 @@ dependencies = [
|
|||||||
"checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3"
|
"checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3"
|
||||||
"checksum web-view 0.4.1 (git+https://github.com/j-selby/web-view.git?rev=752106e4637356cbdb39a0bf1113ea3ae8a14243)" = "<none>"
|
"checksum web-view 0.4.1 (git+https://github.com/j-selby/web-view.git?rev=752106e4637356cbdb39a0bf1113ea3ae8a14243)" = "<none>"
|
||||||
"checksum webview-sys 0.1.2 (git+https://github.com/j-selby/web-view.git?rev=752106e4637356cbdb39a0bf1113ea3ae8a14243)" = "<none>"
|
"checksum webview-sys 0.1.2 (git+https://github.com/j-selby/web-view.git?rev=752106e4637356cbdb39a0bf1113ea3ae8a14243)" = "<none>"
|
||||||
|
"checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164"
|
||||||
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
||||||
"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770"
|
"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770"
|
||||||
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
||||||
|
@ -43,6 +43,7 @@ walkdir = "2.2.7"
|
|||||||
serde = "1.0.89"
|
serde = "1.0.89"
|
||||||
serde_derive = "1.0.89"
|
serde_derive = "1.0.89"
|
||||||
toml = "0.5.0"
|
toml = "0.5.0"
|
||||||
|
which = "2.0.1"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
winapi = { version = "0.3", features = ["psapi", "winbase", "winioctl", "winnt"] }
|
winapi = { version = "0.3", features = ["psapi", "winbase", "winioctl", "winnt"] }
|
||||||
|
@ -33,8 +33,8 @@ apt install -y build-essential libwebkit2gtk-4.0-dev libssl-dev
|
|||||||
|
|
||||||
In order to build yourself an installer, as a bare minimum, you need to:
|
In order to build yourself an installer, as a bare minimum, you need to:
|
||||||
|
|
||||||
- Add your favicon to `static/favicon.ico`
|
- Add your favicon to `ui/public/favicon.ico`
|
||||||
- Add your logo to `static/logo.png`
|
- Add your logo to `ui/src/assets/logo.png`
|
||||||
- Modify the bootstrap configuration file as needed (`config.PLATFORM.toml`).
|
- Modify the bootstrap configuration file as needed (`config.PLATFORM.toml`).
|
||||||
- Have the main configuration file somewhere useful, reachable over HTTP.
|
- Have the main configuration file somewhere useful, reachable over HTTP.
|
||||||
- Run:
|
- Run:
|
||||||
|
15
build.rs
15
build.rs
@ -9,6 +9,8 @@ extern crate serde;
|
|||||||
extern crate serde_derive;
|
extern crate serde_derive;
|
||||||
extern crate toml;
|
extern crate toml;
|
||||||
|
|
||||||
|
extern crate which;
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
@ -30,7 +32,7 @@ pub struct BaseAttributes {
|
|||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
fn handle_binary(config: &BaseAttributes) {
|
fn handle_binary(config: &BaseAttributes) {
|
||||||
let mut res = winres::WindowsResource::new();
|
let mut res = winres::WindowsResource::new();
|
||||||
res.set_icon("static/favicon.ico");
|
res.set_icon("ui/public/favicon.ico");
|
||||||
res.set(
|
res.set(
|
||||||
"FileDescription",
|
"FileDescription",
|
||||||
&format!("Interactive installer for {}", config.name),
|
&format!("Interactive installer for {}", config.name),
|
||||||
@ -85,18 +87,21 @@ 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")
|
||||||
|
.expect("Failed to find yarn - please go ahead and install it!");
|
||||||
|
|
||||||
// Build and deploy frontend files
|
// Build and deploy frontend files
|
||||||
Command::new("yarn")
|
Command::new(&yarn_binary)
|
||||||
.arg("--version")
|
.arg("--version")
|
||||||
.spawn()
|
.spawn()
|
||||||
.expect("Please install Yarn");
|
.expect("Yarn could not be launched");
|
||||||
Command::new("yarn")
|
Command::new(&yarn_binary)
|
||||||
.arg("--cwd")
|
.arg("--cwd")
|
||||||
.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");
|
||||||
Command::new("yarn")
|
Command::new(&yarn_binary)
|
||||||
.args(&[
|
.args(&[
|
||||||
"--cwd",
|
"--cwd",
|
||||||
ui_dir.to_str().expect("Unable to covert path"),
|
ui_dir.to_str().expect("Unable to covert path"),
|
||||||
|
@ -25,7 +25,7 @@ pub fn handle(service: &WebService, _req: Request) -> Future {
|
|||||||
Response::new()
|
Response::new()
|
||||||
.with_status(StatusCode::InternalServerError)
|
.with_status(StatusCode::InternalServerError)
|
||||||
.with_header(ContentType::plaintext())
|
.with_header(ContentType::plaintext())
|
||||||
.with_body("Failed to complete framework shutdown"),
|
.with_body(format!("Failed to complete framework shutdown - {}", e)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(../fonts/roboto-v18-latin-regular.eot);src:local("Roboto"),local("Roboto-Regular"),url(../fonts/roboto-v18-latin-regular.woff2) format("woff2"),url(../fonts/roboto-v18-latin-regular.woff) format("woff")}body,html{overflow:hidden;height:100%}body,div,h1,h2,h3,h4,h5,h6,span{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}pre{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:text}.tile.is-child>.box{height:100%}.has-padding{padding:2rem;position:relative}.clickable-box{cursor:pointer}.clickable-box label{pointer-events:none}.is-max-height{height:100%}.is-bottom-floating{position:absolute;bottom:0}.is-right-floating{position:absolute;right:0}.has-padding .is-right-floating{right:1rem}.is-left-floating{position:absolute;left:0}.has-padding .is-left-floating{left:1rem}.fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:9999;padding:20px;background:#fff}body.has-background-black-ter .column>div,body.has-background-black-ter .subtitle{color:#f5f5f5}
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 6.2 KiB |
@ -1,3 +0,0 @@
|
|||||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><script src=/api/attrs></script><link rel=icon href=/favicon.ico><title id=window-title>... Installer</title><link href=/css/app.css rel=preload as=style><link href=/css/chunk-vendors.css rel=preload as=style><link href=/js/app.js rel=preload as=script><link href=/js/chunk-vendors.js rel=preload as=script><link href=/css/chunk-vendors.css rel=stylesheet><link href=/css/app.css rel=stylesheet></head><body><div class=fullscreen id=ie-blackout style="display: none"><div class=title>Your computer is out of date.</div><div class=subtitle>Make sure that your computer is up to date, and that you have Internet Explorer 11 installed.</div><div class=subtitle>Please note we do not support pirated or unsupported versions of Windows.</div></div><script>if (!document.__proto__) {
|
|
||||||
document.getElementById("ie-blackout").style.display = "block";
|
|
||||||
}</script><noscript><strong>We're sorry but ui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.js></script><script src=/js/app.js></script></body></html>
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -26,8 +26,9 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<noscript>
|
<noscript>
|
||||||
<strong>We're sorry but ui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
<strong>You need JavaScript enabled in your Windows Internet Options to install this application.</strong>
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="container is-max-height">
|
<div class="container is-max-height">
|
||||||
<div class="columns is-max-height">
|
<div class="columns is-max-height">
|
||||||
<div class="column is-one-third has-padding" v-if="!$root.$data.metadata.is_launcher">
|
<div class="column is-one-third has-padding" v-if="!$root.$data.metadata.is_launcher">
|
||||||
<img src="./assets/logo.png" width="60%" />
|
<img src="./assets/logo.png" width="60%" alt="Application icon" />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
@ -80,8 +80,8 @@ var app = new Vue({
|
|||||||
preexisting_install: false
|
preexisting_install: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
render: function (h) {
|
render: function (caller) {
|
||||||
return h(App)
|
return caller(App)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
exit: function () {
|
exit: function () {
|
||||||
@ -90,7 +90,7 @@ var app = new Vue({
|
|||||||
function () {},
|
function () {},
|
||||||
function (msg) {
|
function (msg) {
|
||||||
alert(
|
alert(
|
||||||
'LiftInstall encountered and error while exiting: ' +
|
'LiftInstall encountered an error while exiting: ' +
|
||||||
msg +
|
msg +
|
||||||
'\nPlease upload the log file (in the same directory as the installer) to ' +
|
'\nPlease upload the log file (in the same directory as the installer) to ' +
|
||||||
'the respective maintainers for this application (where you got it from!)'
|
'the respective maintainers for this application (where you got it from!)'
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="column has-padding">
|
<div class="column has-padding">
|
||||||
<h4 class="subtitle">An error occurred:</h4>
|
<h4 class="subtitle">An error occurred:</h4>
|
||||||
|
|
||||||
<pre>{{ msg }}</pre>
|
<pre class="pre-wrap">{{ msg }}</pre>
|
||||||
|
|
||||||
<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">
|
||||||
@ -12,6 +12,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.pre-wrap {
|
||||||
|
/* https://css-tricks.com/snippets/css/make-pre-text-wrap/ */
|
||||||
|
white-space: pre-wrap; /* css-3 */
|
||||||
|
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||||
|
white-space: -pre-wrap; /* Opera 4-6 */
|
||||||
|
white-space: -o-pre-wrap; /* Opera 7 */
|
||||||
|
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'ErrorView',
|
name: 'ErrorView',
|
||||||
|
@ -43,10 +43,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
update: function () {
|
update: function () {
|
||||||
this.router.push('/install/update')
|
this.$router.push('/install/update')
|
||||||
},
|
},
|
||||||
modify_packages: function () {
|
modify_packages: function () {
|
||||||
this.router.push('/packages')
|
this.$router.push('/packages')
|
||||||
},
|
},
|
||||||
prepare_uninstall: function () {
|
prepare_uninstall: function () {
|
||||||
this.show_uninstall = true
|
this.show_uninstall = true
|
||||||
@ -55,7 +55,7 @@ export default {
|
|||||||
this.show_uninstall = false
|
this.show_uninstall = false
|
||||||
},
|
},
|
||||||
uninstall: function () {
|
uninstall: function () {
|
||||||
this.router.push('/install/uninstall')
|
this.$router.push('/install/uninstall')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user