Various fixes to various things

This commit is contained in:
James Rowe 2019-11-03 01:22:55 -06:00
parent 561f0071bd
commit d3c3b77e6b
7 changed files with 116 additions and 42 deletions

View File

@ -39,6 +39,8 @@ pub struct PackageDescription {
#[serde(default)]
pub requires_authorization: Option<bool>,
#[serde(default)]
pub is_new: Option<bool>,
#[serde(default)]
pub need_authentication_description: Option<String>,
#[serde(default)]
pub need_link_description: Option<String>,

View File

@ -18,7 +18,7 @@ use config::JWTValidation;
struct Auth {
username: String,
token: String,
jwt_token: JWTClaims,
jwt_token: Option<JWTClaims>,
}
/// claims struct, it needs to derive `Serialize` and/or `Deserialize`
@ -192,7 +192,7 @@ pub fn handle(service: &WebService, _req: Request) -> InternalFuture {
let out = Auth {
username: username_clone,
token: token_clone,
jwt_token: claims.clone(),
jwt_token: Some(claims.clone()),
};
// Convert the json to a string and return the json token
match serde_json::to_string(&out) {

View File

@ -17,7 +17,7 @@ enum CallbackType {
/// Starts the main web UI. Will return when UI is closed.
pub fn start_ui(app_name: &str, http_address: &str, is_launcher: bool) {
let size = (1024, 500);
let size = (1024, 550);
info!("Spawning web view instance");

View File

@ -71,6 +71,7 @@ pre {
.clickable-box {
cursor: pointer;
position: relative;
}
.clickable-box label {
@ -126,4 +127,48 @@ pre {
body.has-background-black-ter .subtitle, body.has-background-black-ter .column > div {
color: hsl(0, 0%, 96%);
}
.ribbon {
position: absolute;
right: -5px; top: -5px;
z-index: 1;
overflow: hidden;
width: 75px; height: 75px;
text-align: right;
}
.ribbon span {
font-size: 10px;
font-weight: bold;
color: #FFF;
text-transform: uppercase;
text-align: center;
line-height: 20px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
width: 100px;
display: block;
background: #79A70A;
background: linear-gradient(#FF3C28 0%, #FF3C28 100%);
box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
position: absolute;
top: 19px; right: -21px;
}
.ribbon span::before {
content: "";
position: absolute; left: 0px; top: 100%;
z-index: -1;
border-left: 3px solid #FF3C28;
border-right: 3px solid transparent;
border-bottom: 3px solid transparent;
border-top: 3px solid #FF3C28;
}
.ribbon span::after {
content: "";
position: absolute; right: 0px; top: 100%;
z-index: -1;
border-left: 3px solid transparent;
border-right: 3px solid #FF3C28;
border-bottom: 3px solid transparent;
border-top: 3px solid #FF3C28;
}
</style>

View File

@ -5,11 +5,14 @@
When you are done, enter the username and token below.
</b-message>
<p>
Before you can install this Early Access, you need to verify your account.
<a v-on:click="launch_browser('https://profile.yuzu-emu.org/')">Click here to link your yuzu-emu.org account</a>
and paste the token below.
</p>
The <strong>Early Access</strong> release channel lets you try out the latest experimental features and fixes, before they are merged into yuzu. This channel includes all regular yuzu daily updates, plus these exclusive features.
To be an Early Access member, you must be a Patreon Early Access Subscriber.
<br><br>
If you are a subscriber, <a v-on:click="launch_browser('https://profile.yuzu-emu.org/')">click here to link your yuzu-emu.org account</a>
<br><br>
If you are not already a subscriber, <a v-on:click="launch_browser('https://www.patreon.com/join/yuzuteam/checkout?rid=2822069')">click here to become one</a>
</p>
<br>
<div class="control">
@ -30,17 +33,17 @@
<b-message type="is-danger" :active.sync="unlinked_patreon">
Your credentials are valid, but you still need to link your patreon!
If this is an error, then <a v-on:click="launch_browser('https://profile.yuzu-emu.org/external/patreon/connect/')">click here to link your yuzu-emu.org account</a>
If this is an error, then <a v-on:click="launch_browser('https://profile.yuzu-emu.org/')">click here to link your yuzu-emu.org account</a>
</b-message>
<b-message type="is-danger" :active.sync="no_subscription">
Your patreon is linked, but you are not a current subscriber.
<a v-on:click="launch_browser('https://profile.yuzu-emu.org/')">Log into your patreon account</a> and support the project!
Your patreon is linked, but you are not a current subscriber!
<a v-on:click="launch_browser('https://www.patreon.com/join/yuzuteam/checkout?rid=2822069')">Log into your patreon account</a> and support the project!
</b-message>
<b-message type="is-danger" :active.sync="tier_not_selected">
Your patreon is linked, and you are supporting the project, but you must first join the Early Access reward tier!
<a v-on:click="launch_browser('https://profile.yuzu-emu.org/')">Log into your patreon account</a> and choose to back the Early Access reward tier.
<a v-on:click="launch_browser('https://www.patreon.com/join/yuzuteam/checkout?rid=2822069')">Log into your patreon account</a> and choose to back the Early Access reward tier.
</b-message>
<div class="is-left-floating is-bottom-floating">

View File

@ -23,7 +23,7 @@
<h4 class="subtitle">Thanks for installing {{ $root.$data.attrs.name }}!</h4>
<p>You can find your installed applications in your start menu.</p>
<br>
<img src="../assets/how-to-open.png" alt="Where yuzu is installed"/>
</div>
<div v-else>

View File

@ -7,30 +7,43 @@
<div class="tile is-parent" v-for="Lpackage in $root.$data.config.packages" :key="Lpackage.name" :index="Lpackage.name">
<div class="tile is-child">
<div class="box clickable-box" v-if="Lpackage.requires_authorization && !$root.$data.is_authenticated" v-on:click="show_authentication">
<p>{{ Lpackage.name }}</p>
<div class="ribbon" v-if="Lpackage.is_new"><span>New!</span></div>
<b-checkbox>
{{ Lpackage.name }}
</b-checkbox>
<p>
{{Lpackage.need_authentication_description}}
</p>
</div>
<div class="box clickable-box" v-else-if="Lpackage.requires_authorization && !$root.$data.is_linked" v-on:click="show_authorization">
<p>{{ Lpackage.name }}</p>
<div class="ribbon" v-if="Lpackage.is_new"><span>New!</span></div>
<b-checkbox>
{{ Lpackage.name }}
</b-checkbox>
<p>
{{Lpackage.need_link_description}}
</p>
</div>
<div class="box clickable-box" v-else-if="Lpackage.requires_authorization && !$root.$data.is_subscribed" v-on:click="show_authorization">
<p>{{ Lpackage.name }}</p>
<div class="ribbon" v-if="Lpackage.is_new"><span>New!</span></div>
<b-checkbox>
{{ Lpackage.name }}
</b-checkbox>
<p>
{{Lpackage.need_subscription_description}}
</p>
</div>
<div class="box clickable-box" v-else-if="Lpackage.requires_authorization && !$root.$data.has_reward_tier" v-on:click="show_authorization">
<p>{{ Lpackage.name }}</p>
<div class="ribbon" v-if="Lpackage.is_new"><span>New!</span></div>
<b-checkbox>
{{ Lpackage.name }}
</b-checkbox>
<p>
{{Lpackage.need_reward_tier_description}}
</p>
</div>
<div class="box clickable-box" v-else v-on:click.capture.stop="Lpackage.default = !Lpackage.default">
<div class="ribbon" v-if="Lpackage.is_new"><span>New!</span></div>
<label class="checkbox">
<b-checkbox v-model="Lpackage.default">
{{ Lpackage.name }}
@ -87,6 +100,17 @@
<script>
export default {
name: 'SelectPackages',
created: function() {
if (this.$root.$data.has_reward_tier) {
for (var package_index = 0; package_index < app.config.packages.length; package_index++) {
var current_package = app.config.packages[package_index];
// If they are authorized, make the packages that require authorization default
if (current_package.requires_authorization) {
current_package.default = true;
}
}
}
},
data: function () {
return {
advanced: false