Skip to content

Commit

Permalink
Resolve remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelzahn committed Jul 18, 2024
1 parent 18b2ec2 commit 94d26c5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 33 deletions.
1 change: 1 addition & 0 deletions loama/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_DEFAULT_IDP=https://css12.onto-deside.ilabt.imec.be/
21 changes: 8 additions & 13 deletions loama/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,36 @@
</script>

<style>
h1,
h2,
h3 {
font-family: "JetBrains Mono", system-ui;
font-style: normal;
line-height: normal;
}
h1 {
font-family: "JetBrains Mono";
font-size: calc(var(--base-unit)*8);
font-style: normal;
font-weight: 700;
line-height: normal;
color: var(--solid-purple);
text-transform: uppercase;
}
h2 {
color: var(--Solid-Purple);
font-family: "JetBrains Mono";
font-style: normal;
font-weight: 700;
line-height: normal;
}
h3 {
font-family: "JetBrains Mono";
font-size: calc(var(--base-unit)*4);
font-style: normal;
font-weight: 700;
line-height: normal;
color: var(--off-black);
}
label,
input,
p {
font-family: Raleway;
font-size: calc(var(--base-unit)*2);
font-style: normal;
font-weight: 400;
line-height: normal;
}
/* Variables */
Expand Down
Binary file removed loama/src/assets/bg-login.jpg
Binary file not shown.
6 changes: 3 additions & 3 deletions loama/src/components/InfoPopup.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div>
<span>
<h3>Solid Pod URL</h3>
<p>A URL that links to the pod that you want to use.</p>
<aside>
<PhQuestion :size="24" />In order to authenticate, you'll be redirected to the provider's website.
</aside>
</div>
</span>
</template>

<script setup lang="ts">
Expand All @@ -14,7 +14,7 @@ import { PhQuestion } from '@phosphor-icons/vue';
</script>

<style scoped>
div {
span {
position: absolute;
left: calc(var(--base-unit) * 4);
border: .2em solid var(--solid-purple);
Expand Down
25 changes: 8 additions & 17 deletions loama/src/components/LoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@
</header>
<form @submit.prevent="login">
<fieldset>
<legend>Solid Pod URL
<legend>
Solid Pod URL
<PhQuestion :size="24" @mouseover="showPopup = true;" @mouseleave="showPopup = false" />
</legend>
<label for="solid-pod-url">
<PhLink :size="24" class="icon" />
<input type="url" id="solid-pod-url" v-model="solidPodUrl" required placeholder="https://pod.pod/pod/card#me" />
<input type="url" id="solid-pod-url" v-model="solidPodUrl" :placeholder="defaultSolidPodUrl" />
</label>
<p v-if="showWarning" class="warning">Invalid Solid Pod URL. Please check and try again.</p>
</fieldset>
<fieldset>
<button @click.prevent="setDefaultIdp" :disabled="isLoading" class="outlined">
<button :disabled="isLoading" class="outlined">
<PhQuestion :size="24" /> No Pod?
</button>
<button type="submit" :disabled="isLoading">
Expand All @@ -37,18 +38,14 @@ defineProps<{ title: string, subtitle?: string }>();
const showPopup = defineModel<boolean>('showPopup');
const emit = defineEmits<{
toggleProvider: []
}>()
const solidPodUrl = ref<string>('');
const idp = ref<string>('https://css12.onto-deside.ilabt.imec.be/');
const defaultSolidPodUrl = import.meta.env.VITE_DEFAULT_IDP;
const showWarning = ref<boolean>(false);
const isLoading = ref<boolean>(false);
const login = () => {
isLoading.value = true;
const issuer = solidPodUrl.value.trim() || idp.value;
const issuer = solidPodUrl.value.trim() || defaultSolidPodUrl;
store.session.login({
oidcIssuer: issuer,
Expand All @@ -64,17 +61,11 @@ const login = () => {
isLoading.value = false;
});
};
const setDefaultIdp = () => {
idp.value = 'https://css12.onto-deside.ilabt.imec.be/';
emit('toggleProvider');
};
</script>

<style scoped>
.tagline {
color: var(--Off-Black, #170D33);
font-family: Raleway;
color: var(--off-black);
font-size: calc(var(--base-unit)*4);
font-style: normal;
font-weight: 600;
Expand Down Expand Up @@ -127,7 +118,7 @@ input[type="url"] {
label,
p,
input {
color: var(--Off-Black, #170D33);
color: var(--off-black, #170D33);
}
h1,
Expand Down

0 comments on commit 94d26c5

Please sign in to comment.