-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
beautified unlock-success/error, added some whitespaces to other code…
… for readability, related to #16
- Loading branch information
1 parent
4bb0648
commit 2108874
Showing
11 changed files
with
86 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
<template> | ||
<h1>Unlock failed</h1> | ||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8"> | ||
<div class="pt-8 pb-4 flex-shrink-0 flex items-center"> | ||
<img src="/logo.svg" class="h-8" alt="Logo"/> | ||
<span class="font-headline font-bold text-primary ml-2 pb-px">CRYPTOMATOR HUB</span> | ||
</div> | ||
|
||
<div class="relative shadow-xl sm:rounded-2xl sm:overflow-hidden"> | ||
<div class="absolute inset-0"> | ||
<div class="absolute inset-0 bg-gradient-to-r from-primary-l1 to-primary mix-blend-multiply" /> | ||
</div> | ||
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8"> | ||
<h1 class="text-center text-4xl font-extrabold tracking-tight sm:text-5xl lg:text-6xl text-white"> | ||
Unlock failed | ||
</h1> | ||
<p class="mt-6 max-w-lg mx-auto text-center text-xl text-primary-l2 sm:max-w-3xl"> | ||
Your unlock failed unexpectedly. Please try again. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,59 @@ | ||
<template> | ||
<h1 v-if="me != null" class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:truncate">Welcome Back, {{ me.name }}!</h1> | ||
<p>You have access to this vault on the following devices:</p> | ||
<ul v-if="me != null" class="list-disc list-inside p-2"> | ||
<li v-for="(device) in me.devices" :key="device.id">{{ device.name }}</li> | ||
</ul> | ||
<p class="mt-4">You can now close this page and return to your device.</p> | ||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8"> | ||
<div v-if="me == null"> | ||
Loading… | ||
</div> | ||
|
||
<div v-else> | ||
<div class="pt-8 pb-4 flex-shrink-0 flex items-center"> | ||
<img src="/logo.svg" class="h-8" alt="Logo"/> | ||
<span class="font-headline font-bold text-primary ml-2 pb-px">CRYPTOMATOR HUB</span> | ||
</div> | ||
|
||
<div class="relative shadow-xl sm:rounded-2xl sm:overflow-hidden"> | ||
<div class="absolute inset-0"> | ||
<div class="absolute inset-0 bg-gradient-to-r from-primary-l1 to-primary mix-blend-multiply" /> | ||
</div> | ||
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8"> | ||
<h1 class="text-center text-4xl font-extrabold tracking-tight sm:text-5xl lg:text-6xl text-white"> | ||
Welcome back, {{ me.name }}! | ||
</h1> | ||
<!-- TODO: can we figure out if the _current_ device is on the device list? --> | ||
<div v-if="me.devices.length == 0" class="max-w-lg mx-auto text-center text-xl text-primary-l2 sm:max-w-3xl"> | ||
<p class="mt-6"> | ||
You have no registered devices. | ||
</p> | ||
<p class="mt-3"> | ||
Please return to Cryptomator and register your device. | ||
</p> | ||
</div> | ||
|
||
<div v-else class="max-w-lg mx-auto text-center text-xl text-primary-l2 sm:max-w-3xl"> | ||
<p class="mt-6"> | ||
Your unlock was successful. | ||
</p> | ||
<p class="mt-3"> | ||
You can now close this page and continue using Cryptomator. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { onMounted, ref } from 'vue'; | ||
import backend, { UserDto } from '../common/backend'; | ||
const me = ref<UserDto | null>(null); | ||
const me = ref<UserDto>(); | ||
onMounted(async () => { | ||
me.value = await backend.users.me(true); | ||
try { | ||
me.value = await backend.users.me(true, true); | ||
} catch (error) { | ||
// TODO: error handling | ||
console.error('Retrieving user information failed.', error); | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters