Skip to content

Commit

Permalink
Merge pull request #4273 from balancer/release/1.127.0
Browse files Browse the repository at this point in the history
Release 1.127.0
  • Loading branch information
alter-eggo authored Oct 3, 2023
2 parents b10a00f + 3652cf7 commit f48a749
Show file tree
Hide file tree
Showing 22 changed files with 906 additions and 397 deletions.
5 changes: 5 additions & 0 deletions src/assets/images/icons/hourglass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/images/icons/lock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/images/icons/rank.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/images/icons/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/images/icons/unlock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 28 additions & 4 deletions src/components/_global/BalChart/BalChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ type AxisMoveEvent = {
type ChartData = {
name: string;
values: (readonly [string, number])[];
hoverColor?: string;
hoverBorderColor?: string;
};
type AxisLabelFormat = {
Expand All @@ -36,6 +38,7 @@ type AreaStyle = {
type Props = {
data: ChartData[];
chartType: string;
lineStyles?: any[];
onAxisMoved?: undefined | ((value: readonly [string, number]) => void);
isLoading?: boolean;
hideYAxis?: boolean;
Expand All @@ -59,6 +62,9 @@ type Props = {
showTooltipLayer?: boolean; // hides tooltip floating layer
useMinMax?: boolean; // whether to constrain the y-axis based on the min and max values of the data passed in
areaStyle?: AreaStyle;
symbolSize?: number;
reverseParams?: boolean;
paramsLabel?: string;
};
const emit = defineEmits([
Expand All @@ -80,6 +86,7 @@ const props = withDefaults(defineProps<Props>(), {
showTooltip: true,
showTooltipLayer: true,
useMinMax: false,
symbolSize: 5,
});
const chartInstance = ref<echarts.ECharts>();
Expand Down Expand Up @@ -191,16 +198,31 @@ const chartConfig = computed(() => ({
? tailwind.theme.colors.gray['900']
: tailwind.theme.colors.white,
formatter: params => {
let processedParams = params;
// if veBAL, reverse the order of the params to meet the design requirements
if (props.reverseParams) {
processedParams = [...params.reverse()];
// filter equal values in same date
processedParams = processedParams.filter((param, index) => {
if (index === 0) return true;
return param.value[1] !== processedParams[index - 1].value[1];
});
}
return `
<div class='flex flex-col font-body bg-white dark:bg-gray-850 dark:text-white'>
<span>${params[0].value[0]}</span>
${params
${processedParams
.map(
param => `
<span>
${param.marker} ${param.seriesName}
<span class='font-semibold'>
${fNum(param.value[1], props.axisLabelFormatter.yAxis)}
${fNum(
param.value[1],
props.axisLabelFormatter.yAxis
)} ${props.paramsLabel || ''}
</span>
</span>
`
Expand All @@ -222,17 +244,19 @@ const chartConfig = computed(() => ({
},
lineStyle: {
width: 2,
...props.lineStyles?.[i],
},
areaStyle: props.areaStyle,
itemStyle: {
borderRadius: 100,
},
emphasis: {
itemStyle: {
color: props.hoverColor,
borderColor: props.hoverBorderColor,
color: d.hoverColor || props.hoverColor,
borderColor: d.hoverBorderColor || props.hoverBorderColor,
},
},
symbolSize: props.symbolSize,
// This is a retrofitted option to show the small pill with the
// latest value of the series at the end of the line on the RHS
// the line is hidden, but the label is shown with extra styles
Expand Down
2 changes: 1 addition & 1 deletion src/components/_global/BalLoadingBlock/BalLoadingBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const bgClass = computed(() => {
if (darkMode.value) {
return props.darker ? 'shimmer-dark-mode-darker' : 'shimmer-dark-mode';
}
return props.darker ? 'shimmer-light-mode-darker' : 'shimmer-light-mode';
return props.darker ? 'shimmer-dark-mode' : 'shimmer-light-mode';
});
const classes = computed(() => {
Expand Down
256 changes: 0 additions & 256 deletions src/components/contextual/pages/vebal/Hero.vue

This file was deleted.

Loading

1 comment on commit f48a749

@vercel
Copy link

@vercel vercel bot commented on f48a749 Oct 3, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.