Skip to content

Commit

Permalink
make toasts at top with icon, remove green color
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaaElattar committed Sep 26, 2023
1 parent f7ebc06 commit 202e5c0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
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
4 changes: 2 additions & 2 deletions packages/playground/src/components/funds_card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default {
await ProfileManagerController.reloadBalance();
loadingAddTFT.value = false;
createToast(`Success!`, {
position: "bottom-right",
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

0 comments on commit 202e5c0

Please sign in to comment.