-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/delegation #132
base: dev
Are you sure you want to change the base?
feature/delegation #132
Changes from 1 commit
e579526
ba709da
967c766
0393498
e93e84e
3485723
958457d
3e4e7e0
c7bb059
6471df8
993450a
44bcc87
2f9e72a
47b9cff
724ce65
0f409ef
0782005
4b6ebbe
2be8ad0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<template> | ||
<div class="table-sorting-header-column"> | ||
<span class="table-sorting-header-column__text"> | ||
{{ text }} | ||
</span> | ||
<div class="table-sorting-header-column__buttons"> | ||
<app-button | ||
class="table-sorting-header-column__button" | ||
size="none" | ||
scheme="link" | ||
@click="emit('sort', SORTING_ORDER.asc)" | ||
> | ||
<app-icon | ||
class="table-sorting-header-column__button-icon" | ||
:class="{ | ||
'table-sorting-header-column__button-icon--active': | ||
sorting === SORTING_ORDER.asc, | ||
}" | ||
:name="$icons.triangleTop" | ||
/> | ||
</app-button> | ||
<app-button | ||
class="table-sorting-header-column__button" | ||
size="none" | ||
scheme="link" | ||
@click="emit('sort', SORTING_ORDER.desc)" | ||
> | ||
<app-icon | ||
class="table-sorting-header-column__button-icon" | ||
:class="{ | ||
'table-sorting-header-column__button-icon--active': | ||
sorting === SORTING_ORDER.desc, | ||
}" | ||
:name="$icons.triangleTop" | ||
/> | ||
</app-button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { SORTING_ORDER } from '@/enums' | ||
import { AppButton, AppIcon } from '@/common/index' | ||
|
||
const emit = defineEmits<{ | ||
(e: 'sort', value: SORTING_ORDER): void | ||
}>() | ||
|
||
defineProps<{ | ||
text: string | ||
sorting: SORTING_ORDER | ||
}>() | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.table-sorting-header-column { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why column if it is in fact a row? |
||
display: flex; | ||
gap: toRem(12); | ||
align-items: center; | ||
} | ||
|
||
.table-sorting-header-column__text { | ||
font-size: toRem(16); | ||
color: var(--text-tertiary-main); | ||
|
||
@include respond-to(small) { | ||
font-size: toRem(14); | ||
} | ||
} | ||
|
||
.table-sorting-header-column__buttons { | ||
display: flex; | ||
flex-direction: column; | ||
gap: toRem(4); | ||
} | ||
|
||
.table-sorting-header-column__button { | ||
&:nth-child(2) { | ||
transform: rotate(180deg); | ||
} | ||
} | ||
|
||
.table-sorting-header-column__button-icon { | ||
width: toRem(10); | ||
height: toRem(5); | ||
color: var(--background-tertiary-light); | ||
|
||
&--active { | ||
color: var(--primary-main); | ||
} | ||
} | ||
</style> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export enum DELEGATION_RIGHTS { | ||
fullRights, | ||
providerRights, | ||
modelRights, | ||
sessionRights, | ||
marketplaceRights, | ||
} | ||
|
||
export enum DELEGATES_SORTING_TYPES { | ||
none, | ||
delegated, | ||
staked, | ||
delegationRights, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<template> | ||
<div class="delegation"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since it is page a component, let's make it more semantic: Also if app follows classes naming convention based on the component name - I guess it should be |
||
<delegation-description /> | ||
<delegation-providers /> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import DelegationDescription from './components/DelegationDescription.vue' | ||
import DelegationProviders from './components/DelegationProviders.vue' | ||
</script> | ||
|
||
<style scoped lang="scss"></style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Component name is rather too long. Also word
Column
doesn't really make sense to me, table header is generally a row.I'd rather make it just
TableHeader
with optional sorting