Skip to content

Commit

Permalink
feat: add info message
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo committed Jun 30, 2023
1 parent 8d1acfb commit 44ce999
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ function onCloseModal() {

<template v-if="!(isLoading || dynamicDataLoading)">
<BalAlert
v-if="warningMessage.title"
v-if="warningMessage"
:title="warningMessage.title"
type="warning"
class="mb-4"
>
{{ warningMessage.text }}
</BalAlert>
<BalAlert
v-else-if="infoMessage.title"
v-else-if="infoMessage"
:title="infoMessage.title"
type="tip"
class="mb-4"
Expand Down
22 changes: 13 additions & 9 deletions src/providers/cross-chain-sync.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,22 @@ export const crossChainSyncProvider = () => {
};
}

return {
title: '',
text: '',
};
return null;
});

// TODO: add info message
const infoMessage = computed(() => {
return {
title: '',
text: '',
};
if (warningMessage.value) {
return null;
}

if (networksBySyncState.value.synced.length > 0) {
return {
title: t('crossChainBoost.updateGauge.title'),
text: t('crossChainBoost.updateGauge.description'),
};
}

return null;
});

async function sync(network: Network) {
Expand Down

0 comments on commit 44ce999

Please sign in to comment.