Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make all toasts compatible #1153

Merged
merged 11 commits into from
Oct 9, 2023
4 changes: 2 additions & 2 deletions packages/playground/src/components/deposit_dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ onMounted(async () => {
const DecimalDeposit = new Decimal(receivedDeposit);
const divisor = new Decimal(10000000);
createToast(`You have received ${DecimalDeposit.dividedBy(divisor)} TFT`, {
position: "bottom-right",
position: "top-right",
hideProgressBar: true,
toastBackgroundColor: "black",
timeout: 5000,
Expand All @@ -121,7 +121,7 @@ onMounted(async () => {
if (destroyed) return;
console.log(e);
createToast(e as string, {
position: "bottom-right",
position: "top-right",
hideProgressBar: true,
toastBackgroundColor: "red",
timeout: 5000,
Expand Down
6 changes: 3 additions & 3 deletions packages/playground/src/components/funds_card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default {
await grid?.balance.getMoreFunds();
await ProfileManagerController.reloadBalance();
loadingAddTFT.value = false;
createToast(`Success!`, {
position: "bottom-right",
createToast(` Success! You have received TFTs.`, {
position: "top-right",
hideProgressBar: true,
toastBackgroundColor: "#1aa18f",
timeout: 5000,
Expand All @@ -48,7 +48,7 @@ export default {
loadingAddTFT.value = false;
console.log("Error: ", e);
createToast(`Get more TFT failed!`, {
position: "bottom-right",
position: "top-right",
hideProgressBar: true,
toastBackgroundColor: "black",
timeout: 5000,
Expand Down
2 changes: 2 additions & 0 deletions packages/playground/src/components/tf_notification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ onMounted(async () => {
hideProgressBar: true,
toastBackgroundColor: "red",
timeout: 5000,
showIcon: true,
type: "info",
});
}
await new Promise(resolve => setTimeout(resolve, 15 * 60 * 1000));
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/src/portal/bridge_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ async function withdrawTFT(targetAddress: string, withdrawAmount: number) {
loadingWithdraw.value = false;
await ProfileManagerController.reloadBalance();
createToast("Transaction Succeeded", {
position: "bottom-right",
position: "top-right",
hideProgressBar: true,
toastBackgroundColor: "black",
timeout: 5000,
Expand All @@ -221,7 +221,7 @@ async function withdrawTFT(targetAddress: string, withdrawAmount: number) {
amount.value = 0;
loadingWithdraw.value = false;
createToast("Withdraw Failed!", {
position: "bottom-right",
position: "top-right",
hideProgressBar: true,
toastBackgroundColor: "red",
timeout: 5000,
Expand Down
6 changes: 5 additions & 1 deletion packages/playground/src/portal/transfer_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ async function transfer(receipientTwin: Twin) {
createToast("Transaction Complete!", {
position: "top-right",
hideProgressBar: true,
toastBackgroundColor: "green",
toastBackgroundColor: "#1aa18f",
timeout: 5000,
showIcon: true,
type: "success",
});
profileManagerController.reloadBalance();
await getFreeBalance();
Expand All @@ -232,6 +234,8 @@ function createInvalidTransferToast(message: string) {
hideProgressBar: true,
toastBackgroundColor: "red",
timeout: 5000,
showIcon: true,
type: "danger",
});
}
async function submitFormTwinID() {
Expand Down