Skip to content

Commit

Permalink
Merge pull request #16 from Smaug6739/main
Browse files Browse the repository at this point in the history
Version 6.6.1
  • Loading branch information
Smaug6739 authored Jan 5, 2025
2 parents a2b475a + 31fa084 commit c33e6b1
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 35 deletions.
6 changes: 2 additions & 4 deletions frontend/composables/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ function logoutUser() {
.logout()
.then(() => {
useNotifications().add({ title: 'Success:', message: 'Logged out', type: 'success', timeout: 3000 });
setTimeout(() => {
store.post_logout();
useRouter().push('/login');
}, 3000);
store.post_logout();
useRouter().push('/login');
})
.catch(e => {
useNotifications().add({ title: 'Error:', message: e, type: 'error', timeout: 3000 });
Expand Down
1 change: 1 addition & 0 deletions frontend/pages/dashboard/settings/_views/backups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ watchEffect(() => (currentPage.value = route.query.p || 'profile'));
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
margin: 20px auto;
}
@keyframes spin {
Expand Down
5 changes: 5 additions & 0 deletions frontend/pages/dashboard/settings/_views/security.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,9 @@ p {
color: $red;
font-size: 0.9rem;
}
.err {
color: $red;
padding: 0.1rem 0.5rem;
font-size: 0.8rem;
}
</style>
23 changes: 0 additions & 23 deletions frontend/pages/dashboard/settings/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,6 @@ watchEffect(() => (currentPage.value = route.query.p || 'profile'));
background: none;
}
.err {
color: $red;
padding: 0.1rem 0.5rem;
font-size: 0.8rem;
}
.security_page {
.last_connection {
align-items: center;
padding: 0.3rem 0.5rem;
border-radius: 15px;
background-color: var(--bg-contrast-2);
}
p {
margin: 0.5rem;
font-size: 0.9rem;
}
.warning {
color: $red;
font-size: 0.9rem;
}
}
@media screen and (max-width: 920px) {
.component {
width: 100%;
Expand Down
9 changes: 7 additions & 2 deletions frontend/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="container">
<AppHeader />
<form @submit.prevent="login" class="body">
<NuxtLink to="/signup" class="signup-link">Need an account? Sign up</NuxtLink>
<h2>Connection</h2>
<div class="form-group">
<label for="username">Username</label>
<input type="username" id="username" v-model="username" :class="{ 'is-invalid': errors.username }" />
Expand All @@ -16,6 +16,7 @@
</div>
<p v-if="errors.password" class="invalid-feedback">{{ errors.password }}</p>
</div>
<NuxtLink to="/signup" class="signup-link">Need an account? Sign up</NuxtLink>
<button type="submit" class="btn">Login</button>
<p v-if="errors.general" class="invalid-feedback">{{ errors.general }}</p>
<p class="forgot-password-link">Forgot your password? <a href="mailto:rveauville@gmail.com">Click here</a></p>
Expand Down Expand Up @@ -53,6 +54,10 @@ async function connect(username: string, password: string) {
}
</script>
<style scoped lang="scss">
h2 {
margin-top: 0;
padding-top: 0;
}
.container {
height: 100%;
display: flex;
Expand Down Expand Up @@ -89,7 +94,7 @@ async function connect(username: string, password: string) {
margin-bottom: 1rem;
text-align: right;
text-decoration: none;
color: $primary-color;
&:hover {
text-decoration: underline;
}
Expand Down
13 changes: 8 additions & 5 deletions frontend/pages/signup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="container">
<AppHeader />
<form @submit.prevent="register" class="body">
<a href="/login" class="login-link">Already have an account? Log in</a>
<h2>Account Creation</h2>
<div class="form-group">
<label for="username">Username</label>
<input type="text" id="username" v-model="username" :class="{ 'is-invalid': errors.username }" />
Expand All @@ -29,6 +29,7 @@
</div>
<p v-if="errors.confirmPassword" class="invalid-feedback">{{ errors.confirmPassword }}</p>
</div>
<NuxtLink to="/login" class="login-link">Already have an account? Log in</NuxtLink>
<button type="submit" class="btn">Sign Up</button>
<p v-if="errors.general" class="invalid-feedback">{{ errors.general }}</p>
</form>
Expand Down Expand Up @@ -87,9 +88,7 @@ function register() {
errors.value.confirmPassword = '';
}
if (valid) {
createAccount(username.value, email.value, password.value);
}
if (valid) createAccount(username.value, email.value, password.value);
}
async function createAccount(username: string, email: string, password: string) {
Expand All @@ -105,6 +104,10 @@ async function createAccount(username: string, email: string, password: string)
</script>

<style scoped lang="scss">
h2 {
margin-top: 0;
padding-top: 0;
}
.container {
height: 100%;
display: flex;
Expand Down Expand Up @@ -141,7 +144,7 @@ async function createAccount(username: string, email: string, password: string)
margin-bottom: 1rem;
text-align: right;
text-decoration: none;
color: $primary-color;
&:hover {
text-decoration: underline;
}
Expand Down
1 change: 0 additions & 1 deletion frontend/styles/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
a {
text-decoration: none;
color: var(--font-color);
transition: color $transition-duration;

&:hover {
cursor: pointer;
Expand Down

0 comments on commit c33e6b1

Please sign in to comment.