Skip to content

Commit

Permalink
fix: long ft names go outside borders
Browse files Browse the repository at this point in the history
  • Loading branch information
imollov committed Feb 4, 2021
1 parent 705e5fa commit 1a512a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="details">
<div>
<div class="title text-ellipsis" :title="tokenData.name">
{{ tokenData.name }}
{{ ellipseStringMid(tokenData.name, 30) }}
</div>
<div>
<label>{{ $t('pages.fungible-tokens.mcap') }}</label>
Expand Down Expand Up @@ -42,6 +42,7 @@

<script>
import { mapGetters } from 'vuex';
import { ellipseStringMid } from '../../../utils/helper';
import Avatar from '../Avatar';
import TokenAmount from '../TokenAmount';
Expand All @@ -52,6 +53,7 @@ export default {
name: String,
},
computed: mapGetters(['formatCurrency']),
methods: { ellipseStringMid },
};
</script>

Expand Down
8 changes: 6 additions & 2 deletions src/popup/router/pages/FungibleTokens/TokenDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<script>
import { pick } from 'lodash-es';
import { mapGetters, mapState } from 'vuex';
import { ellipseStringMid } from '../../../utils/helper';
import TabsMenu from '../../components/TabsMenu';
import Avatar from '../../components/Avatar';
import TokenAmount from '../../components/TokenAmount';
Expand Down Expand Up @@ -96,12 +97,15 @@ export default {
created() {
this.$store.commit(
'setPageTitle',
this.availableTokens[this.id] ? this.availableTokens[this.id].name : 'Aeternity',
this.fungibleToken ? ellipseStringMid(this.fungibleToken.name, 22) : 'Aeternity',
);
},
computed: {
...mapGetters(['tippingSupported', 'formatCurrency']),
...mapState('fungibleTokens', ['tokenBalances', 'availableTokens', 'aePublicData']),
fungibleToken() {
return this.availableTokens[this.id];
},
tokenData() {
if (this.id === 'aeternity') {
return {
Expand All @@ -114,7 +118,7 @@ export default {
}
return (
this.tokenBalances.find(({ contract }) => contract === this.id) || {
...this.availableTokens[this.id],
...this.fungibleToken,
contract: this.id,
}
);
Expand Down

0 comments on commit 1a512a5

Please sign in to comment.