forked from bcgov/STRR
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from turb0c0w/sam/account-page
Sam/account page
- Loading branch information
Showing
23 changed files
with
263 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
<template> | ||
<div> | ||
<NuxtLayout> | ||
<NuxtPage /> | ||
</NuxtLayout> | ||
</div> | ||
<NuxtLayout /> | ||
</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 |
---|---|---|
|
@@ -84,5 +84,5 @@ body { | |
|
||
html, body { | ||
overflow-x: hidden; | ||
overflow-y: hidden; | ||
background-color: #F1F3F5; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<template> | ||
<div | ||
class="grid grid-cols-12 gap-1 p-4" | ||
:class="flavourContainerClass" | ||
:role="flavourRole" | ||
:data-cy="'alertsMessage:' + flavour" | ||
> | ||
<div class="py-3 px-0"> | ||
<slot name="icon"> | ||
<UIcon | ||
v-if="flavourIcon" | ||
:class="flavourIconClass" | ||
class="mt-[2px] text-2xl float-right" | ||
:name="flavourIcon" | ||
/> | ||
</slot> | ||
</div> | ||
<div class="p-2 col-span-11"> | ||
<slot name="default" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Ref } from 'vue' | ||
import { AlertsFlavourE } from '~/enums/alerts-e' | ||
const props = defineProps<{ | ||
flavour: AlertsFlavourE | ||
}>() | ||
const flavourIcon: Ref<string | null> = ref(null) | ||
const flavourContainerClass = ref('') | ||
const flavourIconClass = ref('') | ||
const flavourRole = ref('none') | ||
switch (props.flavour) { | ||
case AlertsFlavourE.ALERT: | ||
flavourIcon.value = 'i-mdi-alert' | ||
flavourIconClass.value = 'text-red-500' | ||
flavourContainerClass.value = 'border-2 border-red-500 bg-red-100' | ||
flavourRole.value = 'alert' | ||
break | ||
case AlertsFlavourE.SUCCESS: | ||
flavourIcon.value = 'i-mdi-success-circle' | ||
flavourContainerClass.value = 'border-2 border-green-500 bg-green-100' | ||
flavourRole.value = 'alert' | ||
break | ||
case AlertsFlavourE.WARNING: | ||
flavourIcon.value = 'i-mdi-alert' | ||
flavourIconClass.value = 'text-orange-500' | ||
flavourContainerClass.value = 'border-2 border-orange-500 bg-orange-100' | ||
flavourRole.value = 'alert' | ||
break | ||
case AlertsFlavourE.INFO: | ||
flavourIcon.value = 'i-mdi-alert' | ||
flavourIconClass.value = 'text-orange-500' | ||
flavourContainerClass.value = 'border-2 border-yellow-500 bg-yellow-50' | ||
flavourRole.value = 'note' | ||
break | ||
case AlertsFlavourE.MESSAGE: | ||
flavourIcon.value = null | ||
flavourContainerClass.value = 'border-2 border-solid border-black' | ||
break | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<div class="flex"> | ||
<slot> | ||
<UButton | ||
:class="classWithDefaultSpacing" | ||
:color="color || 'primary'" | ||
:icon="icon" | ||
:label="label" | ||
:loading="loading" | ||
:text="text" | ||
:trailing="trailing" | ||
:variant="variant" | ||
@click="action()" | ||
> | ||
{{ text }} | ||
</UButton> | ||
</slot> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ButtonVariant } from '@nuxt/ui/dist/runtime/types' | ||
const { action, color, className, icon, label, loading, text, trailing, variant } = defineProps<{ | ||
action: Function, | ||
className?: string, | ||
color?: string, | ||
icon: string, | ||
loading?: boolean, | ||
label: string, | ||
text: string, | ||
trailing?: boolean, | ||
variant?: ButtonVariant | ||
}>() | ||
const classWithDefaultSpacing = `${className} text-[16px] px-[28px] py-[10px]` | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<div class="flex h-full justify-center"> | ||
<div class="w-[848px]"> | ||
<NuxtPage /> | ||
</div> | ||
</div> | ||
</template> |
47 changes: 47 additions & 0 deletions
47
strr-web/components/bcros/existing-accounts-list/ExistingAccountsList.vue
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<template> | ||
<div class="flex flex-col justify-center mb-[32px]"> | ||
<div v-for="account in accounts" class="bg-white shadow-md"> | ||
<div :key="account.id" class="items-center h-[52px] flex flex-row justify-space-between mx-[32px] my-[24px] border-b border-bcGovColor-hairlinesOnWhite"> | ||
<div><BcrosLetterIcon letter="E" /></div> | ||
<div class="grow pl-[20px]"> | ||
<div class="text-[18px] font-bold"> | ||
{{ account.label }} | ||
</div> | ||
<div class="text-[14px]"> | ||
{{ account.address }} | ||
</div> | ||
</div> | ||
<div> | ||
<BcrosButtonsPrimary | ||
:action="buttonAction" | ||
icon="i-mdi-chevron-right" | ||
:label="buttonText" | ||
:text="buttonText" | ||
:trailing="true" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="flex justify-center"> | ||
<BcrosButtonsPrimary | ||
:action="buttonAction" | ||
icon="i-mdi-chevron-right" | ||
:label="buttonText" | ||
:text="createAccountButtonText" | ||
:trailing="true" | ||
variant="outline" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const { accounts } = defineProps<{ accounts: AccountI[] }>() | ||
const t = useNuxtApp().$i18n.t | ||
const buttonText = t('account.existing-account-section.use-account-button') | ||
const buttonAction = () => console.log('CLICKED') | ||
const createAccountButtonText = t('account.existing-account-section.create-account-button') | ||
</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
File renamed without changes.
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<template> | ||
<UButton | ||
:label="letter" | ||
color="primary" | ||
class="pointer-events-none bg-blue-350 h-[32px] w-[32px] flex font-bold justify-center" | ||
:inactive="true" | ||
/> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const { letter } = defineProps<{ letter: string }>() | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template> | ||
<h1 class="font-bold text-[32px] pb-[25px]" :data-cy="dataCy"> | ||
{{ t(text) }} | ||
</h1> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const t = useNuxtApp().$i18n.t | ||
const { text, dataCy } = defineProps<{ text: string, dataCy: string }>() | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template> | ||
<h2 class="font-bold text-[24px] py-[25px]" :data-cy="dataCy"> | ||
{{ t(text) }} | ||
</h2> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const t = useNuxtApp().$i18n.t | ||
const { text, dataCy } = defineProps<{ text: string, dataCy: string }>() | ||
</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
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
Oops, something went wrong.