Resolved all ts lint errors on build

This commit is contained in:
2022-08-11 18:37:33 +02:00
parent f7fe582200
commit 41067aae84
19 changed files with 130 additions and 66 deletions

View File

@@ -34,8 +34,9 @@
import SeasonedInput from "@/components/ui/SeasonedInput.vue";
import SeasonedButton from "@/components/ui/SeasonedButton.vue";
import SeasonedMessages from "@/components/ui/SeasonedMessages.vue";
import { ErrorMessageTypes } from "../../interfaces/IErrorMessage";
import type { Ref } from "vue";
import type IErrorMessage from "../../interfaces/IErrorMessage";
import type { IErrorMessage } from "../../interfaces/IErrorMessage";
interface ResetPasswordPayload {
old_password: string;
@@ -52,7 +53,11 @@
}
function addWarningMessage(message: string, title?: string) {
messages.value.push({ message, title, type: "warning" });
messages.value.push({
message,
title,
type: ErrorMessageTypes.Warning
} as IErrorMessage);
}
function validate() {

View File

@@ -49,8 +49,9 @@
import SeasonedButton from "@/components/ui/SeasonedButton.vue";
import SeasonedMessages from "@/components/ui/SeasonedMessages.vue";
import { linkPlexAccount, unlinkPlexAccount } from "../../api";
import { ErrorMessageTypes } from "../../interfaces/IErrorMessage";
import type { Ref, ComputedRef } from "vue";
import type IErrorMessage from "../../interfaces/IErrorMessage";
import type { IErrorMessage } from "../../interfaces/IErrorMessage";
interface Emit {
(e: "reload");
@@ -89,10 +90,10 @@
}
messages.value.push({
type: success ? "success" : "error",
type: success ? ErrorMessageTypes.Success : ErrorMessageTypes.Error,
title: success ? "Authenticated with plex" : "Something went wrong",
message: message
});
} as IErrorMessage);
}
async function unauthenticatePlex() {
@@ -103,12 +104,14 @@
}
messages.value.push({
type: response.success ? "success" : "error",
type: response.success
? ErrorMessageTypes.Success
: ErrorMessageTypes.Error,
title: response.success
? "Unlinked plex account "
: "Something went wrong",
message: response.message
});
} as IErrorMessage);
}
</script>