Skip to content

Commit

Permalink
Merge pull request ava-labs#136 from ava-labs/feat/activity_tab
Browse files Browse the repository at this point in the history
Feat/activity tab
  • Loading branch information
kanatliemre authored Jan 15, 2021
2 parents 7ab963c + d863481 commit c42e75d
Show file tree
Hide file tree
Showing 35 changed files with 1,923 additions and 127 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"vue-i18n": "8.15.4",
"vue-property-decorator": "8.4.2",
"vue-router": "3.1.3",
"vue-virtual-scroll-list": "^2.3.2",
"vuetify": "2.3.9",
"vuex": "3.1.2",
"web3": "^1.3.0",
Expand Down
14 changes: 13 additions & 1 deletion src/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ $l-size-mobile: 22px;
$m-size-mobile: 18px;
$s-size-mobile: 14px;


@mixin highlight-border{
transition-duration: 0.1s;
border: 1px solid transparent;
Expand All @@ -84,7 +85,7 @@ $s-size-mobile: 14px;
}

&:focus-within{
border-color: var(--secondary-color);
border-color: var(--selection-color);
}
}

Expand Down Expand Up @@ -402,6 +403,8 @@ html[data-theme='day']{
--primary-color-light: #867E89;
--secondary-color: #E84970;

--selection-color: #6a91d8;

--link-secondary: #6E7479;
--error:#f00;
--success: #6BC688;
Expand All @@ -423,6 +426,8 @@ html[data-theme='night']{
--primary-color-light: #6E7479;
--secondary-color: #E84970;

--selection-color: #6a91d8;

--link-secondary: #6E7479;
--error:#E84970;
--success: #6BC688;
Expand All @@ -440,3 +445,10 @@ p.err{
font-size: 0.9rem;
margin: 4px 0;
}


@include medium-device{
h1{
font-size: 25px;
}
}
3 changes: 3 additions & 0 deletions src/assets/sidebar/activity_nav.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/sidebar/activity_nav_night.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 17 additions & 2 deletions src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@
</div>
<template v-if="isAuth">
<router-link to="/wallet">{{ $t('wallet.sidebar.portfolio') }}</router-link>
<router-link to="/wallet/keys">{{ $t('wallet.sidebar.manage') }}</router-link>
<router-link to="/wallet/transfer">{{ $t('wallet.sidebar.send') }}</router-link>
<router-link to="/wallet/cross_chain">
{{ $t('wallet.sidebar.export') }}
</router-link>
<router-link to="/wallet/earn">{{ $t('wallet.sidebar.earn') }}</router-link>
<router-link to="/wallet/activity">Activity</router-link>
<router-link to="/wallet/keys">{{ $t('wallet.sidebar.manage') }}</router-link>
<router-link to="/wallet/advanced" data-cy="wallet_advanced">
{{ $t('wallet.sidebar.advanced') }}
</router-link>
Expand Down Expand Up @@ -174,7 +178,18 @@ button {
margin: 0;
}
@media only screen and (max-width: main.$mobile_width) {
@include main.medium-device {
img {
max-height: 18px;
}
.buts_right {
button {
font-size: 11px;
}
}
}
@include main.mobile-device {
.lang_web {
display: none;
}
Expand Down
95 changes: 95 additions & 0 deletions src/components/SidePanels/History/TxHistoryValueFunctional.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<template functional>
<div class="utxo" :income="props.amount > 0">
<p class="action">
{{ $options.getActionText(props.type, props.amount, props.operationDirection) }}
</p>
<p
class="amount"
:style="{
color: $options.getColor(props.type, props.amount),
}"
>
{{ props.amount }}
<!-- {{ amountText }} {{ symbolText }}-->
</p>
</div>
</template>
<script>
export default {
props: {
amount: Number,
assetId: String,
type: String,
operationDirection: String,
},
getColor(type, amount) {
// if (this.type === 'operation') return this.operationColor
if (type === 'add_validator') return '#008dc5'
if (type === 'add_delegator') return '#008dc5'
if (amount > 0) {
return '#6BC688'
} else if (amount === 0) {
return '#999'
} else {
return '#d04c4c'
}
},
getActionText(type, amount, operationDirection) {
let isIncome = amount > 0
switch (type) {
case 'base':
if (isIncome) {
return 'Received'
}
return 'Sent'
case 'operation':
return operationDirection
default:
// Capitalize first letter
return type
.split('_')
.map((value) => value[0].toUpperCase() + value.substring(1))
.join(' ')
}
},
}
</script>
<style scoped lang="scss">
@use '../../../main';
.utxo {
display: grid;
grid-template-columns: max-content 1fr;
column-gap: 10px;
> * {
align-self: center;
}
&:not(:first-child) {
.action {
visibility: hidden;
}
}
}
.action {
font-size: 12px;
color: main.$primary-color-light;
}
.amount {
text-align: right;
white-space: nowrap;
font-size: 15px;
}
@include main.medium-device {
.amount {
font-size: 14px;
}
}
</style>
Loading

0 comments on commit c42e75d

Please sign in to comment.