Skip to content

Commit

Permalink
Branding fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ascensionist committed Oct 23, 2024
1 parent 148602a commit ff9e68b
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 127 deletions.
8 changes: 4 additions & 4 deletions app/client/src/views/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,22 @@
<v-list-item-subtitle>Developer</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-list-item @click='bw86Dialog = true'>
<v-list-item>
<v-list-item-content>
<v-list-item-title class='font-weight-bold'>bw86</v-list-item-title>
<v-list-item-subtitle>Logo Designer, Developer</v-list-item-subtitle>
<v-list-item-subtitle>Logo Designer, Former Developer</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-list-item>
<v-list-item-content>
<v-list-item-title class='font-weight-bold'>exttex, Xandar Null, Francesco, Tobs</v-list-item-title>
<v-list-item-subtitle>Original Saturn App</v-list-item-subtitle>
<v-list-item-subtitle>Original Freezer App</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
</v-list>

<div class='text-center text-h5 font-weight-bold my-4'>
Translations provided by Crowdin supporters of the original Saturn app
Translations provided by Crowdin supporters of the original Freezer app
</div>

<v-dialog v-model='bw86Dialog' max-width='512'>
Expand Down
246 changes: 123 additions & 123 deletions app/client/src/views/Login.vue
Original file line number Diff line number Diff line change
@@ -1,131 +1,131 @@
<template>
<v-overlay opacity='1.0' z-index='666'>

<!-- Fullscreen loader -->
<div v-if='authorizing && !error'>
<v-progress-circular indeterminate>
</v-progress-circular>
</div>

<!-- Error -->
<v-card class='text-center pa-4' v-if='error'>
<h1 class='text--red'>{{$t("Error logging in!")}}</h1>
<h3>{{$t("Please try again later, or try another account.")}}</h3>
<v-btn large class='my-4' @click='logout'>
<v-icon left>mdi-logout-variant</v-icon>
{{$t("Logout")}}
</v-btn>
</v-card>

<!-- Login form -->
<div v-if='showForm' class='text-center'>
<v-img id:banner contain max-width='400px' class='py-8'></v-img>

<h3>{{$t("Please login using your Deezer account:")}}</h3>
<v-btn large class='my-2 mb-4 primary' @click='browserLogin'>
<v-icon left>mdi-open-in-app</v-icon>
{{$t("Login using browser")}}
</v-btn>

<h3 class='mt-4'>{{$t("...or paste your ARL/Token below:")}}</h3>
<v-text-field :label='$t("ARL/Token")' v-model='arl'>
</v-text-field>

<v-btn large class='my-4 primary' :loading='authorizing' @click='login'>
<v-icon left>mdi-login-variant</v-icon>
{{$t("Login")}}
</v-btn>

<br>
<span class='mt-8 text-caption'>
{{$t("2k24 saturn")}}
</span>
</div>


</v-overlay>
</template>

<script>
export default {
name: 'Login',
data() {
return {
error: false,
arl: '',
showForm: false,
authorizing: false
}
},
methods: {
async login() {
this.showForm = false;
this.authorizing = true;
if (this.arl && this.arl != '') {
//Save arl
this.$root.settings.arl = this.arl;
<v-overlay opacity='1.0' z-index='666'>

<!-- Fullscreen loader -->
<div v-if='authorizing && !error'>
<v-progress-circular indeterminate>
</v-progress-circular>
</div>

<!-- Error -->
<v-card class='text-center pa-4' v-if='error'>
<h1 class='text--red'>{{$t("Error logging in!")}}</h1>
<h3>{{$t("Please try again later, or try another account.")}}</h3>
<v-btn large class='my-4' @click='logout'>
<v-icon left>mdi-logout-variant</v-icon>
{{$t("Logout")}}
</v-btn>
</v-card>

<!-- Login form -->
<div v-if='showForm' class='text-center'>
<v-img src='banner.png' contain max-width='400px' class='py-8'></v-img>

<h3>{{$t("Please login using your Deezer account:")}}</h3>
<v-btn large class='my-2 mb-4 primary' @click='browserLogin'>
<v-icon left>mdi-open-in-app</v-icon>
{{$t("Login using browser")}}
</v-btn>

<h3 class='mt-4'>{{$t("...or paste your ARL/Token below:")}}</h3>
<v-text-field :label='$t("ARL/Token")' v-model='arl'>
</v-text-field>

<v-btn large class='my-4 primary' :loading='authorizing' @click='login'>
<v-icon left>mdi-login-variant</v-icon>
{{$t("Login")}}
</v-btn>

<br>
<span class='mt-8 text-caption'>
{{$t("2k24 saturn.kim")}}
</span>
</div>


</v-overlay>
</template>

<script>
export default {
name: 'Login',
data() {
return {
error: false,
arl: '',
showForm: false,
authorizing: false
}
//Authorize
try {
await this.$axios.post('/authorize', {arl: this.$root.settings.arl});
this.$root.authorized = true;
},
methods: {
async login() {
this.showForm = false;
this.authorizing = true;
if (this.arl && this.arl != '') {
//Save arl
this.$root.settings.arl = this.arl;
}
//Authorize
try {
await this.$axios.post('/authorize', {arl: this.$root.settings.arl});
this.$root.authorized = true;
} catch (e) {
this.error = true;
}
//Get profile on sucess
if (this.$root.authorized) {
//Save
await this.$root.saveSettings();
//Load profile
let res = await this.$axios.get('/profile');
this.$root.profile = res.data;
//Auth rooms
this.$rooms.setProfile(this.$root.profile);
this.$router.push('/home');
//Cache library
this.$root.cacheLibrary();
}
} catch (e) {
this.error = true;
}
//Get profile on sucess
if (this.$root.authorized) {
//Save
await this.$root.saveSettings();
//Load profile
let res = await this.$axios.get('/profile');
this.$root.profile = res.data;
//Auth rooms
this.$rooms.setProfile(this.$root.profile);
this.$router.push('/home');
//Cache library
this.$root.cacheLibrary();
this.authorizing = false;
},
//Log out, show login form
logout() {
this.error = false;
this.arl = '';
this.$root.settings.arl = '';
this.showForm = true;
},
//Login using browser
browserLogin() {
if (!this.$root.settings.electron) return alert(this.$t('Only in Electron version!'));
const {ipcRenderer} = window.require('electron');
ipcRenderer.on('browserLogin', (event, newArl) => {
this.arl = newArl;
this.login();
});
ipcRenderer.send('browserLogin');
}
this.authorizing = false;
},
//Log out, show login form
logout() {
this.error = false;
this.arl = '';
this.$root.settings.arl = '';
async mounted() {
//Wait for settings to load
if (this.$root.loadingPromise) {
this.authorizing = true;
await this.$root.loadingPromise;
this.authorizing = false;
}
this.showForm = true;
},
//Login using browser
browserLogin() {
if (!this.$root.settings.electron) return alert(this.$t('Only in Electron version!'));
const {ipcRenderer} = window.require('electron');
ipcRenderer.on('browserLogin', (event, newArl) => {
this.arl = newArl;
if (this.$root.settings.arl) {
this.login();
});
ipcRenderer.send('browserLogin');
}
},
async mounted() {
//Wait for settings to load
if (this.$root.loadingPromise) {
this.authorizing = true;
await this.$root.loadingPromise;
this.authorizing = false;
}
this.showForm = true;
if (this.$root.settings.arl) {
this.login();
}
}
}
};
</script>
};
</script>

0 comments on commit ff9e68b

Please sign in to comment.