diff --git a/app/router.scrollBehavior.js b/app/router.scrollBehavior.js new file mode 100644 index 0000000..58c8c89 --- /dev/null +++ b/app/router.scrollBehavior.js @@ -0,0 +1,9 @@ +const routerScrollBehavior = (to, from, savedPosition) => { + if (to.name === 'governance-id') { + return { x: 0, y: 0 } + } + + return savedPosition || { x: 0, y: 0 } +} + +export default routerScrollBehavior diff --git a/assets/styles/components/_proposals.scss b/assets/styles/components/_proposals.scss index 5eb88b0..c9886ab 100644 --- a/assets/styles/components/_proposals.scss +++ b/assets/styles/components/_proposals.scss @@ -73,13 +73,17 @@ padding: 1.429rem; background: #1f1f1f; border-radius: 6px; - cursor: pointer; - .title { + &.is-link { + cursor: pointer; + } + + &--title { color: #fff; font-size: 1.143rem; margin-bottom: 1rem; line-height: 1.286; + font-weight: 600; } &--info { @@ -105,6 +109,7 @@ margin-right: 0.714rem; + &.tag, .tag { color: #fff; background: #363636; diff --git a/components/ProposalCommentFormModal.vue b/components/ProposalCommentFormModal.vue new file mode 100644 index 0000000..d4255c4 --- /dev/null +++ b/components/ProposalCommentFormModal.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/components/governance/Proposal.vue b/components/governance/Proposal.vue index 1c66e79..c7690e3 100644 --- a/components/governance/Proposal.vue +++ b/components/governance/Proposal.vue @@ -4,150 +4,159 @@

{{ data.title }}

-

{{ data.description }}

+

{{ data.description }}

+
-
-
{{ $t('castYourVote') }}
- -
- {{ $t('for') }} - {{ $t('against') }} -
-
- - - -
-
-
{{ $t('executeProposal') }}
- - {{ $t('execute') }} - -
-
-
{{ $t('currentResults') }}
-
- {{ $t('for') }} - TORN / {{ calculatePercent('for') }}% -
- -
- {{ $t('against') }} - TORN / - {{ calculatePercent('against') }}% -
- -
- {{ $t('quorum') }} +
+
+
{{ $t('castYourVote') }}
- +
+ {{ $t('for') }} + {{ $t('against') }} +
- TORN / - {{ quorumPercent }}% + +
- -
-
-
{{ $t('information') }}
-
-
- {{ $t('proposalAddress') }} -
- - {{ data.target }} - +
+
{{ $t('executeProposal') }}
+ + {{ $t('execute') }} + +
+ +
+
{{ $t('currentResults') }}
+
+ {{ $t('for') }} + TORN / {{ calculatePercent('for') }}% +
+ +
+ {{ $t('against') }} + TORN / + {{ calculatePercent('against') }}% +
+ +
+ {{ $t('quorum') }} + + + + TORN + / {{ quorumPercent }}% +
+ +
+
+
{{ $t('information') }}
+
+
+ {{ $t('proposalAddress') }} +
-
-
- {{ $t('id') }} -
{{ data.id }}
-
-
- {{ $t('status') }} -
- {{ $t(data.status) }} +
+ {{ $t('id') }} +
{{ data.id }}
-
-
- {{ $t('startDate') }} -
{{ $moment.unix(data.startTime).format('llll') }}
-
-
- {{ $t('endDate') }} -
{{ $moment.unix(data.endTime).format('llll') }}
-
-
- {{ $t(timerLabel) }} -
- {{ countdown }} +
+ {{ $t('status') }} +
+ {{ $t(data.status) }} +
+
+
+ {{ $t('startDate') }} +
{{ $moment.unix(data.startTime).format('llll') }}
+
+
+ {{ $t('endDate') }} +
{{ $moment.unix(data.endTime).format('llll') }}
+
+
+ {{ $t(timerLabel) }} +
+ {{ countdown }} +
@@ -160,11 +169,15 @@ + + diff --git a/components/governance/ProposalComment.vue b/components/governance/ProposalComment.vue new file mode 100644 index 0000000..a57eab2 --- /dev/null +++ b/components/governance/ProposalComment.vue @@ -0,0 +1,203 @@ + + + + + diff --git a/components/governance/ProposalComments.vue b/components/governance/ProposalComments.vue new file mode 100644 index 0000000..8a81ea8 --- /dev/null +++ b/components/governance/ProposalComments.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/components/governance/ProposalCommentsSkeleton.vue b/components/governance/ProposalCommentsSkeleton.vue new file mode 100644 index 0000000..0605df8 --- /dev/null +++ b/components/governance/ProposalCommentsSkeleton.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/components/governance/ProposalSkeleton.vue b/components/governance/ProposalSkeleton.vue index 2625255..c1fcbdc 100644 --- a/components/governance/ProposalSkeleton.vue +++ b/components/governance/ProposalSkeleton.vue @@ -10,6 +10,7 @@
+
@@ -77,3 +78,13 @@
+ + diff --git a/components/governance/ProposalsListItem.vue b/components/governance/ProposalsListItem.vue index b5772f1..3144a11 100644 --- a/components/governance/ProposalsListItem.vue +++ b/components/governance/ProposalsListItem.vue @@ -1,8 +1,8 @@