Fix ts errors

This commit is contained in:
Jérémy Munsch 2024-02-02 10:44:23 +01:00
parent e7b05e6760
commit e9a18f5dce
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
3 changed files with 2 additions and 3 deletions

View file

@ -1,4 +1,5 @@
import log from "electron-log";
import type { $Bus } from "~/plugins/emitter";
export enum ToastTypeEnum {
default = "default",
@ -20,7 +21,7 @@ export default abstract class Toast {
/** Affiche un toast message */
public static toast(message: string, type: ToastTypeEnum = ToastType.default, title: string | null = null): void {
const { $bus } = useNuxtApp();
const $bus = useNuxtApp().$bus as $Bus;
$bus.$emit("toast", {message, type, title});
const prefix: string = `${type.toLowerCase()} : `;
switch (type) {

View file

@ -38,7 +38,6 @@
</template>
<script lang="ts">
// eslint-disable-next-line import/named
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { defineComponent } from "vue";
import ToolboxHelper from "~/classes/ToolboxHelper";

View file

@ -7,7 +7,6 @@ import {
faSquare,
} from "@fortawesome/free-solid-svg-icons";
// https://github.com/FortAwesome/vue-fontawesome/issues/418
// eslint-disable-next-line import/named
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
config.autoAddCss = false;