mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-14 16:51:18 +10:00
slight ui/ux fixes and updates to auth protocol
This commit is contained in:
@ -10,12 +10,18 @@
|
|||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<nav class="inline-flex items-center mt-0.5">
|
<nav class="inline-flex items-center mt-0.5">
|
||||||
<ol class="inline-flex items-center gap-x-6">
|
<ol class="inline-flex items-center gap-x-6">
|
||||||
<li
|
<NuxtLink
|
||||||
class="transition text-zinc-300 hover:text-zinc-100 uppercase font-display font-semibold text-md"
|
|
||||||
v-for="(nav, navIdx) in navigation"
|
v-for="(nav, navIdx) in navigation"
|
||||||
|
:class="[
|
||||||
|
'transition uppercase font-display font-semibold text-md',
|
||||||
|
navIdx === currentPageIndex
|
||||||
|
? 'text-zinc-100'
|
||||||
|
: 'text-zinc-400 hover:text-zinc-200',
|
||||||
|
]"
|
||||||
|
:href="nav.route"
|
||||||
>
|
>
|
||||||
{{ nav.label }}
|
{{ nav.label }}
|
||||||
</li>
|
</NuxtLink>
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
@ -68,6 +74,8 @@ const navigation: Array<NavigationItem> = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const currentPageIndex = useCurrentNavigationIndex(navigation);
|
||||||
|
|
||||||
const quickActions: Array<QuickActionNav> = [
|
const quickActions: Array<QuickActionNav> = [
|
||||||
{
|
{
|
||||||
icon: UserGroupIcon,
|
icon: UserGroupIcon,
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<template>{{state}}</template>
|
<template />
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const state = useAppState();
|
const router = useRouter();
|
||||||
|
router.replace("/store");
|
||||||
</script>
|
</script>
|
||||||
3
pages/store/index.vue
Normal file
3
pages/store/index.vue
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
</template>
|
||||||
@ -1,8 +1,9 @@
|
|||||||
|
use core::time;
|
||||||
use std::{
|
use std::{
|
||||||
borrow::{Borrow, BorrowMut},
|
borrow::{Borrow, BorrowMut},
|
||||||
env,
|
env,
|
||||||
fmt::format,
|
fmt::format,
|
||||||
sync::Mutex,
|
sync::Mutex, time::{SystemTime, UNIX_EPOCH},
|
||||||
};
|
};
|
||||||
|
|
||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
@ -69,7 +70,12 @@ pub fn generate_authorization_header() -> String {
|
|||||||
db.auth.clone().unwrap()
|
db.auth.clone().unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
let nonce = Uuid::new_v4().to_string();
|
let start = SystemTime::now();
|
||||||
|
let timestamp = start
|
||||||
|
.duration_since(UNIX_EPOCH)
|
||||||
|
.expect("Time went backwards");
|
||||||
|
let nonce = timestamp.as_millis().to_string();
|
||||||
|
|
||||||
let signature = sign_nonce(certs.private, nonce.clone()).unwrap();
|
let signature = sign_nonce(certs.private, nonce.clone()).unwrap();
|
||||||
|
|
||||||
return format!("Nonce {} {} {}", certs.clientId, nonce, signature);
|
return format!("Nonce {} {} {}", certs.clientId, nonce, signature);
|
||||||
|
|||||||
Reference in New Issue
Block a user