Skip to content

Commit

Permalink
move custom_toast to utils (#1195)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaaElattar authored Oct 9, 2023
1 parent a7d696f commit 611dd8b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 22 deletions.
12 changes: 12 additions & 0 deletions packages/playground/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -396,4 +396,16 @@ a {
.v-list-item--density-default.v-list-item--one-line {
min-height: 40px;
}
.mosha__toast__content-wrapper {
margin-bottom: -2px;
}
.mosha__icon {
margin-right: 6px !important;
margin-top: 2px;
}
.mosha__toast__content__text {
font-size: 14px !important;
}
</style>
2 changes: 1 addition & 1 deletion packages/playground/src/components/deposit_dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ import { onBeforeUnmount, onMounted, ref } from "vue";
import { useProfileManagerController } from "../components/profile_manager_controller.vue";
import QrcodeGenerator from "../components/qrcode_generator.vue";
import { useProfileManager } from "../stores";
import { createCustomToast, ToastType } from "../utils/custom_toast";
import { getGrid } from "../utils/grid";
import { createCustomToast, ToastType } from "./custom_toast.vue";
const depositDialog = ref(false);
const emits = defineEmits(["close"]);
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/funds_card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<script lang="ts">
import { ref } from "vue";
import { createCustomToast, ToastType } from "../components/custom_toast.vue";
import { useProfileManagerController } from "../components/profile_manager_controller.vue";
import { useProfileManager } from "../stores";
import { createCustomToast, ToastType } from "../utils/custom_toast";
import { getGrid } from "../utils/grid";
export default {
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/tf_notification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { onMounted } from "vue";
import { ref } from "vue";
import { useProfileManager } from "../stores";
import { createCustomToast, ToastType } from "../utils/custom_toast";
import { getGrid } from "../utils/grid";
import { createCustomToast, ToastType } from "./custom_toast.vue";
const profileManager = useProfileManager();
const contractsCount = ref(0);
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/portal/bridge_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
import { default as StellarSdk, StrKey } from "stellar-sdk";
import { onMounted, ref } from "vue";
import { createCustomToast, ToastType } from "../components/custom_toast.vue";
import { useProfileManagerController } from "../components/profile_manager_controller.vue";
import { useProfileManager } from "../stores";
import { createCustomToast, ToastType } from "../utils/custom_toast";
import { getGrid, loadBalance } from "../utils/grid";
const profileManager = useProfileManager();
Expand Down
3 changes: 1 addition & 2 deletions packages/playground/src/portal/transfer_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,9 @@ import { Keyring } from "@polkadot/keyring";
import type { Twin } from "@threefold/tfchain_client";
import { onMounted, ref } from "vue";
import { createCustomToast, ToastType } from "@/components/custom_toast.vue";
import { useProfileManagerController } from "../components/profile_manager_controller.vue";
import { useProfileManager } from "../stores";
import { createCustomToast, ToastType } from "../utils/custom_toast";
import { getGrid, loadBalance } from "../utils/grid";
const profileManagerController = useProfileManagerController();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<script lang="ts">
import { createToast, type ToastOptions } from "mosha-vue-toastify";

export enum ToastType {
Expand Down Expand Up @@ -29,18 +28,3 @@ export function createCustomToast(content: string, type: ToastType) {

createToast(content, toastOptions);
}
</script>

<style>
.mosha__toast__content-wrapper {
margin-bottom: -2px;
}
.mosha__icon {
margin-right: 6px !important;
margin-top: 2px;
}
.mosha__toast__content__text {
font-size: 14px !important;
}
</style>

0 comments on commit 611dd8b

Please sign in to comment.