Skip to content

Commit

Permalink
Merge branch 'release/1.12.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
garethfuller committed Aug 9, 2021
2 parents 24dc116 + c74aba6 commit 58c8bab
Show file tree
Hide file tree
Showing 136 changed files with 3,967 additions and 4,659 deletions.
1,899 changes: 200 additions & 1,699 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 6 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer-labs/frontend-v2",
"version": "1.11.5",
"version": "1.12.0",
"engines": {
"node": "14.x",
"npm": ">=7"
Expand All @@ -22,28 +22,15 @@
"dependencies": {
"@balancer-labs/assets": "github:balancer-labs/assets#master",
"@balancer-labs/sor": "github:balancer-labs/balancer-sor#john/v1-consideringFees-package",
"@balancer-labs/sor2": "github:balancer-labs/balancer-sor#develop-V2",
"@balancer-labs/sor2": "github:balancer-labs/balancer-sor#john/ui-629-sor-integrate-sdk-maths",
"@ensdomains/content-hash": "^2.5.3",
"@ethersproject/abi": "^5.0.1",
"@ethersproject/abstract-signer": "^5.3.0",
"@ethersproject/address": "^5.0.1",
"@ethersproject/bignumber": "^5.2.0",
"@ethersproject/bytes": "^5.0.5",
"@ethersproject/constants": "^5.0.1",
"@ethersproject/contracts": "^5.0.1",
"@ethersproject/hash": "^5.0.6",
"@ethersproject/providers": "^5.0.12",
"@ethersproject/strings": "^5.0.5",
"@ethersproject/units": "^5.0.1",
"@ethersproject/wallet": "^5.0.1",
"@gnosis.pm/gp-v2-contracts": "^0.0.1-alpha.19",
"@metamask/detect-provider": "^1.2.0",
"@popperjs/core": "^2.9.2",
"@portis/web3": "^3.0.3",
"@sentry/browser": "^6.3.2",
"@sentry/tracing": "^6.3.2",
"@tailwindcss/postcss7-compat": "^2.0.4",
"@toruslabs/torus-embed": "^1.9.4",
"@types/animejs": "^3.1.3",
"@vue/cli-plugin-babel": "^4.4.0",
"@vue/cli-plugin-eslint": "^4.4.0",
Expand All @@ -52,39 +39,30 @@
"@vueuse/core": "^4.3.4",
"@walletconnect/web3-provider": "^1.5.2",
"animejs": "^3.2.1",
"apexcharts": "^3.23.1",
"autoprefixer": "^9.8.6",
"axios": "0.21.1",
"bnc-sdk": "^3.4.1",
"bs58": "^4.0.1",
"core-js": "^3.6.5",
"d3": "^6.5.0",
"date-fns": "^2.21.1",
"echarts": "^5.1.0",
"eslint": "^6.7.2",
"ethereumjs-util": "^7.0.7",
"ethers": "^5.4.1",
"feather-icons": "^4.28.0",
"fortmatic": "^2.0.6",
"json-to-graphql-query": "^2.0.0",
"lodash": "^4.17.15",
"numeral": "^2.0.4",
"parse-filepath": "1.0.2",
"postcss": "^7.0.35",
"postcss-nesting": "^7.0.1",
"pretty-ms": "^7.0.0",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.4",
"typescript": "~3.9.3",
"vue": "^3.1.5",
"vue-echarts": "^6.0.0-rc.4",
"vue-i18n": "^9.0.0-rc.1",
"vue-query": "^1.6.0",
"vue-router": "^4.0.0-alpha.6",
"vue-router": "^4.0.10",
"vue-slider-component": "^4.0.0-beta.3",
"vue3-apexcharts": "^1.2.1",
"vue3-jazzicon": "^0.1.2",
"vue3-virtual-scroller": "^0.2.1",
"vuex": "^4.0.0-alpha.1",
"vuex": "^4.0.2",
"walletlink": "^2.1.5",
"web3-utils": "^1.3.1"
},
Expand All @@ -111,11 +89,13 @@
"@vue/eslint-config-typescript": "^5.0.2",
"@vue/test-utils": "^2.0.0-alpha.1",
"babel-loader": "^8.2.2",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^7.0.0-alpha.0",
"husky": "^6.0.0",
"prettier": "^1.19.1",
"tailwind-config-viewer": "^1.5.0",
"typescript": "~3.9.3",
"vue-cli-plugin-webpack-bundle-analyzer": "^2.0.0",
"vue-loader": "^16.1.2"
},
Expand Down
31 changes: 31 additions & 0 deletions src/Root.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { defineComponent, h } from 'vue';
import App from './App.vue';
import * as providerMap from './providers';

const providers = Object.values(providerMap);

export default defineComponent({
components: {
App,
...providerMap
},

render() {
function renderProviders(providers) {
if (!providers.length) return h(App);

const [provider, ...remainingProviders] = providers;
return h(
provider,
{},
{
default() {
return [renderProviders(remainingProviders)];
}
}
);
}

return renderProviders(providers);
}
});
32 changes: 23 additions & 9 deletions src/components/_global/BalAsset/BalAsset.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<img
v-if="iconURL && !error"
:src="_url(iconURL)"
v-if="iconSRC && !error"
:src="iconSRC"
:style="{
width: `${size}px`,
height: `${size}px`
Expand All @@ -16,6 +16,7 @@
import { defineComponent, toRefs, ref, computed, watch } from 'vue';
import useTokens from '@/composables/useTokens';
import Avatar from '../../images/Avatar.vue';
import useUrls from '@/composables/useUrls';
export default defineComponent({
name: 'BalAsset',
Expand All @@ -29,32 +30,45 @@ export default defineComponent({
type: String,
required: true
},
iconURI: { type: String },
size: {
type: Number,
default: 24
}
},
setup(props) {
// COMPOSABLES
/**
* COMPOSABLES
*/
const { tokens } = useTokens();
const { resolve } = useUrls();
// DATA
/**
* STATE
*/
const { address } = toRefs(props);
const error = ref(false);
// COMPUTED
const iconURL = computed(() => {
/**
* COMPUTED
*/
const iconSRC = computed(() => {
if (props.iconURI) return resolve(props.iconURI);
const token = tokens.value[address.value];
if (!token) return '';
return token.logoURI;
return resolve(token.logoURI);
});
watch(iconURL, newURL => {
/**
* WATCHERS
*/
watch(iconSRC, newURL => {
if (newURL !== '') error.value = false;
});
return {
iconURL,
iconSRC,
error
};
}
Expand Down
48 changes: 43 additions & 5 deletions src/components/_global/BalLoadingBlock/BalLoadingBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,28 @@ export default defineComponent({
props: {
white: { type: Boolean, default: false },
square: { type: Boolean, default: false }
darker: { type: Boolean, default: false },
rounded: {
type: String,
default: 'lg',
validator: (val: string): boolean => ['sm', 'md', 'lg'].includes(val)
}
},
setup(props) {
const { darkMode } = useDarkMode();
const bgClass = computed(() => {
if (props.white) return 'shimmer-white';
return darkMode.value ? 'shimmer-dark' : 'shimmer';
if (darkMode.value) {
return props.darker ? 'shimmer-dark-mode-darker' : 'shimmer-dark-mode';
}
return props.darker ? 'shimmer-light-mode-darker' : 'shimmer-light-mode';
});
const classes = computed(() => {
return {
['rounded-lg']: !props.square,
[`rounded-${props.rounded}`]: true,
[bgClass.value]: true
};
});
Expand Down Expand Up @@ -63,7 +71,7 @@ export default defineComponent({
background-size: 1000px 100%;
}
.shimmer {
.shimmer-light-mode {
--startColor: theme('colors.gray.50');
--midColor: theme('colors.gray.100');
--endColor: theme('colors.gray.50');
Expand All @@ -78,7 +86,22 @@ export default defineComponent({
background-size: 1000px 100%;
}
.shimmer-dark {
.shimmer-light-mode-darker {
--startColor: theme('colors.gray.100');
--midColor: theme('colors.gray.200');
--endColor: theme('colors.gray.100');
animation: shimmerBackground 10s infinite;
background: linear-gradient(
to right,
var(--startColor) 4%,
var(--midColor) 25%,
var(--endColor) 36%
);
background-size: 1000px 100%;
}
.shimmer-dark-mode {
--startColor: theme('colors.gray.850');
--midColor: theme('colors.gray.800');
--endColor: theme('colors.gray.850');
Expand All @@ -92,4 +115,19 @@ export default defineComponent({
);
background-size: 1000px 100%;
}
.shimmer-dark-mode-darker {
--startColor: theme('colors.gray.700');
--midColor: theme('colors.gray.600');
--endColor: theme('colors.gray.700');
animation: shimmerBackground 10s infinite;
background: linear-gradient(
to right,
var(--startColor) 4%,
var(--midColor) 25%,
var(--endColor) 36%
);
background-size: 1000px 100%;
}
</style>
62 changes: 62 additions & 0 deletions src/components/_global/BalLoadingNumber/BalLoadingNumber.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<template>
<div class="flex items-center">
<template v-if="type === 'token'">
<BalLoadingBlock :class="blockClasses" rounded="sm" darker />
<BalLoadingBlock :class="blockClasses" rounded="sm" darker />
<span class="text-gray-300 dark:text-gray-500">.</span>
<BalLoadingBlock :class="blockClasses" rounded="sm" darker />
<BalLoadingBlock :class="blockClasses" rounded="sm" darker />
<BalLoadingBlock :class="blockClasses" rounded="sm" darker />
<BalLoadingBlock :class="blockClasses" rounded="sm" darker />
</template>
<template v-else-if="type === 'fiat'">
<span class="text-gray-300 dark:text-gray-500 mr-px">
{{ currencySymbol }}
</span>
<BalLoadingBlock :class="blockClasses" rounded="sm" darker />
<BalLoadingBlock :class="blockClasses" rounded="sm" darker />
<span class="text-gray-300 dark:text-gray-500">.</span>
<BalLoadingBlock :class="blockClasses" rounded="sm" darker />
<BalLoadingBlock :class="blockClasses" rounded="sm" darker />
</template>
</div>
</template>

<script lang="ts">
import useUserSettings from '@/composables/useUserSettings';
import { FiatSymbol } from '@/constants/currency';
import { defineComponent, computed } from 'vue';
import BalLoadingBlock from '../BalLoadingBlock/BalLoadingBlock.vue';
export default defineComponent({
name: 'BalLoadingNumber',
components: {
BalLoadingBlock
},
props: {
type: {
type: String,
default: 'token',
validator: (val: string): boolean => ['token', 'fiat'].includes(val)
},
numberWidth: { type: String, default: '3' },
numberHeight: { type: String, default: '5' }
},
setup(props) {
const { currency } = useUserSettings();
const currencySymbol = computed(() => FiatSymbol[currency.value]);
const blockClasses = computed(() => [
`w-${props.numberWidth}`,
`h-${props.numberHeight}`,
'mr-px'
]);
return { blockClasses, currencySymbol };
}
});
</script>
Loading

3 comments on commit 58c8bab

@vercel
Copy link

@vercel vercel bot commented on 58c8bab Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 58c8bab Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 58c8bab Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

app – ./

app-balancer.vercel.app
pm2.vercel.app
app-git-master-balancer.vercel.app
app.balancer.fi

Please sign in to comment.