-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Interim dashboard draft commit * updated redirect * removed commented out styles Signed-off-by: Kial Jinnah <[email protected]>
- Loading branch information
Showing
41 changed files
with
783 additions
and
115 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,5 +1,6 @@ | ||
export default defineAppConfig({ | ||
ui: { | ||
strategy: 'merge', | ||
button: { | ||
color: { | ||
red: { | ||
|
20 changes: 20 additions & 0 deletions
20
strr-platform-web/app/components/connect/DashboardSection.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,20 @@ | ||
<script setup lang="ts"> | ||
defineProps<{ title: string, loading: boolean }>() | ||
</script> | ||
<template> | ||
<div class="space-y-2"> | ||
<slot name="header"> | ||
<ConnectTypographyH2 :text="title" /> | ||
</slot> | ||
<div class="rounded bg-white"> | ||
<slot v-if="loading" name="loading"> | ||
<div class="min-w-[300px] animate-pulse space-y-2 p-5"> | ||
<div class="h-5 w-full rounded bg-gray-200" /> | ||
<div class="h-5 w-full rounded bg-gray-200" /> | ||
<div class="h-5 w-full rounded bg-gray-200" /> | ||
</div> | ||
</slot> | ||
<slot v-else name="default" /> | ||
</div> | ||
</div> | ||
</template> |
108 changes: 108 additions & 0 deletions
108
strr-platform-web/app/components/connect/DetailsHeader.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,108 @@ | ||
<script setup lang="ts"> | ||
const { | ||
loading, | ||
title, | ||
subtitles, | ||
details, | ||
sideDetails, | ||
bottomButtons | ||
} = storeToRefs(useConnectDetailsHeaderStore()) | ||
</script> | ||
|
||
<template> | ||
<div class="bg-white py-5" data-testid="connect-details-header"> | ||
<div class="app-inner-container"> | ||
<div v-if="loading" class="flex animate-pulse flex-col gap-2 sm:flex-row"> | ||
<div class="grow space-y-2"> | ||
<div class="h-9 w-[400px] rounded bg-gray-200" /> | ||
<div class="h-5 w-[250px] rounded bg-gray-200" /> | ||
<div class="h-5 w-[200px] rounded bg-gray-200" /> | ||
<div class="h-5 w-[150px] rounded bg-gray-200" /> | ||
</div> | ||
<div class="space-y-2"> | ||
<div class="h-5 w-[300px] rounded bg-gray-200" /> | ||
<div class="h-5 w-[300px] rounded bg-gray-200" /> | ||
<div class="h-5 w-[300px] rounded bg-gray-200" /> | ||
<div class="h-5 w-[300px] rounded bg-gray-200" /> | ||
</div> | ||
</div> | ||
<div v-else class="flex flex-col gap-2 sm:flex-row"> | ||
<div class="grow space-y-4"> | ||
<div class="space-y-2"> | ||
<ConnectTypographyH1 v-if="title" :text="title" /> | ||
<div v-if="subtitles.length" class="flex divide-x *:border-gray-500 *:px-2 first:*:pl-0"> | ||
<p v-for="subtitle in subtitles" :key="subtitle" class="text-sm"> | ||
{{ subtitle }} | ||
</p> | ||
</div> | ||
</div> | ||
<div class="space-y-2"> | ||
<slot name="details"> | ||
<p v-if="details" class="text-sm"> | ||
{{ details }} | ||
</p> | ||
</slot> | ||
<slot name="buttons"> | ||
<div v-if="bottomButtons.length" class="flex flex-wrap gap-2"> | ||
<UButton | ||
v-for="btn in bottomButtons" | ||
:key="btn.label" | ||
:label="btn.label" | ||
:icon="btn.icon" | ||
class="pl-0" | ||
color="primary" | ||
variant="link" | ||
@click="btn.action()" | ||
/> | ||
</div> | ||
</slot> | ||
</div> | ||
</div> | ||
<dl class="mr-14 space-y-1 text-sm"> | ||
<template v-for="detail in sideDetails" :key="detail.label"> | ||
<div> | ||
<UTooltip | ||
:close-delay="100" | ||
:popper="{ placement: 'right', arrow: false, offsetDistance: 0 }" | ||
:ui="{ background: 'bg-transparent', container: 'opacity-100', shadow: 'shadow-none' }" | ||
> | ||
<div class="flex flex-row flex-wrap gap-2"> | ||
<dt class="font-bold" :class="[detail.edit?.isEditing && 'mt-1']"> | ||
{{ detail.label }}: | ||
</dt> | ||
<dd v-if="!detail.edit?.isEditing"> | ||
{{ detail.value }} | ||
</dd> | ||
<UFormGroup | ||
v-else | ||
:name="detail.label" | ||
:error="detail.edit?.validation?.error || undefined" | ||
size="xs" | ||
> | ||
<UInput | ||
v-model="detail.value" | ||
size="2xs" | ||
@change="detail.edit.validation | ||
? detail.edit.validation.error = detail.edit?.validation?.validate($event) | ||
: console.info('no validation')" | ||
/> | ||
</UFormGroup> | ||
</div> | ||
<template #text> | ||
<UButton | ||
v-if="detail.edit" | ||
icon="i-mdi-edit" | ||
:label="!detail.edit.isEditing ? $t('word.Edit') : $t('word.Save')" | ||
:padded="false" | ||
variant="link" | ||
@click="detail.edit.isEditing = !detail.edit.isEditing" | ||
/> | ||
</template> | ||
</UTooltip> | ||
</div> | ||
</template> | ||
</dl> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
33 changes: 33 additions & 0 deletions
33
strr-platform-web/app/components/connect/accordion/Index.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,33 @@ | ||
<script setup lang="ts"> | ||
defineProps<{ items: ConnectAccordionItem[], multiple?: boolean }>() | ||
</script> | ||
|
||
<template> | ||
<UAccordion :items="items" :multiple="multiple"> | ||
<template #default="{ item, open }"> | ||
<UButton | ||
ref="accordionButton" | ||
variant="ghost" | ||
class="p-4 text-sm font-bold text-gray-900 hover:bg-transparent" | ||
:class="item.class || ''" | ||
> | ||
<template #leading> | ||
<div v-if="item.showAvatar" class="flex size-6 items-center justify-center rounded-full"> | ||
<UAvatar size="xs" class="bg-blue-500" :ui="{text: 'text-white'}" :text="item.label.substring(0,1)" /> | ||
</div> | ||
</template> | ||
<span class="text-left" :class="item.showAvatar ? 'pl-2' : ''">{{ item.label }}</span> | ||
<template #trailing> | ||
<UIcon | ||
name="i-heroicons-chevron-down-20-solid" | ||
class="ms-auto size-5 text-gray-700 transition-transform duration-200" | ||
:class="[open && '-rotate-180', item.icon]" | ||
/> | ||
</template> | ||
</UButton> | ||
</template> | ||
<template #item="{ item }"> | ||
<ConnectAccordionItem class="px-4" :class="item.class" :item="item" :pad-left="item.showAvatar" /> | ||
</template> | ||
</UAccordion> | ||
</template> |
21 changes: 21 additions & 0 deletions
21
strr-platform-web/app/components/connect/accordion/Item.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,21 @@ | ||
<script setup lang="ts"> | ||
defineProps<{ item: ConnectAccordionItem, padLeft?: boolean }>() | ||
</script> | ||
<template> | ||
<div class="space-y-3"> | ||
<div v-for="info, i in item.values" :key="`connect-accordian-info-${i}`"> | ||
<div class="flex gap-2" :class="[padLeft && 'pl-10', info.class || '']"> | ||
<UIcon v-if="info.icon" :name="info.icon" class="text-2xl" :class="info.iconClass ?? ''" /> | ||
<div class="space-y-1"> | ||
<p v-if="info.label" class="text-gray-950"> | ||
{{ info.label }} | ||
</p> | ||
<p v-if="info.text" class="break-all text-sm"> | ||
{{ info.text }} | ||
</p> | ||
<ConnectFormAddressDisplay v-if="info.address" :address="info.address" /> | ||
</div> | ||
</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
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
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
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.