Fixed eslint errors
This commit is contained in:
parent
abe3a4387c
commit
0f85be0cb8
@ -3,7 +3,7 @@
|
|||||||
"env": {
|
"env": {
|
||||||
"node": true
|
"node": true
|
||||||
},
|
},
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "vue-eslint-parser",
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
@ -15,10 +15,13 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"vue/multi-word-component-names": "off",
|
"vue/multi-word-component-names": "off",
|
||||||
"vue/no-reserved-component-names": "warn",
|
"vue/no-reserved-component-names": "warn",
|
||||||
"vue/no-mutating-props": "warn"
|
"vue/no-mutating-props": "warn",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "off"
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": "latest",
|
"ecmaVersion": "latest",
|
||||||
"sourceType": "module"
|
"sourceType": "module",
|
||||||
|
"parser": "@typescript-eslint/parser"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ export const useFileStore = defineStore("file", {
|
|||||||
this.req = value;
|
this.req = value;
|
||||||
},
|
},
|
||||||
removeSelected(value: any) {
|
removeSelected(value: any) {
|
||||||
let i = this.selected.indexOf(value);
|
const i = this.selected.indexOf(value);
|
||||||
if (i === -1) return;
|
if (i === -1) return;
|
||||||
this.selected.splice(i, 1);
|
this.selected.splice(i, 1);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export const useLayoutStore = defineStore("layout", {
|
|||||||
state: (): {
|
state: (): {
|
||||||
loading: boolean,
|
loading: boolean,
|
||||||
show: string | null | boolean,
|
show: string | null | boolean,
|
||||||
showConfirm: Function | null,
|
showConfirm: any,
|
||||||
showAction: boolean | null,
|
showAction: boolean | null,
|
||||||
showShell: boolean | null
|
showShell: boolean | null
|
||||||
} => ({
|
} => ({
|
||||||
|
|||||||
@ -50,7 +50,7 @@ export const useUploadStore = defineStore("upload", {
|
|||||||
filesInUpload: (state) => {
|
filesInUpload: (state) => {
|
||||||
const files = [];
|
const files = [];
|
||||||
|
|
||||||
for (let index in state.uploads) {
|
for (const index in state.uploads) {
|
||||||
const upload = state.uploads[index];
|
const upload = state.uploads[index];
|
||||||
const id = upload.id;
|
const id = upload.id;
|
||||||
const type = upload.type;
|
const type = upload.type;
|
||||||
|
|||||||
3
frontend/src/types/global.d.ts
vendored
3
frontend/src/types/global.d.ts
vendored
@ -5,7 +5,4 @@ declare global {
|
|||||||
FileBrowser: any;
|
FileBrowser: any;
|
||||||
grecaptcha: any
|
grecaptcha: any
|
||||||
}
|
}
|
||||||
interface HTMLAttributes extends HTMLAttributes {
|
|
||||||
title: any
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -22,7 +22,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, defineAsyncComponent, onBeforeUnmount, onMounted, onUnmounted, ref, watch } from "vue";
|
import { computed, defineAsyncComponent, onBeforeUnmount, onMounted, onUnmounted, ref, watch } from "vue";
|
||||||
import { files as api } from "@/api";
|
import { files as api } from "@/api";
|
||||||
import { mapState, mapActions, mapWritableState } from "pinia";
|
|
||||||
import { useFileStore } from "@/stores/file";
|
import { useFileStore } from "@/stores/file";
|
||||||
import { useLayoutStore } from "@/stores/layout";
|
import { useLayoutStore } from "@/stores/layout";
|
||||||
import { useUploadStore } from "@/stores/upload";
|
import { useUploadStore } from "@/stores/upload";
|
||||||
@ -30,8 +29,6 @@ import { useUploadStore } from "@/stores/upload";
|
|||||||
import HeaderBar from "@/components/header/HeaderBar.vue";
|
import HeaderBar from "@/components/header/HeaderBar.vue";
|
||||||
import Breadcrumbs from "@/components/Breadcrumbs.vue";
|
import Breadcrumbs from "@/components/Breadcrumbs.vue";
|
||||||
import Errors from "@/views/Errors.vue";
|
import Errors from "@/views/Errors.vue";
|
||||||
import Preview from "@/views/files/Preview.vue";
|
|
||||||
import FileListing from "@/views/files/FileListing.vue";
|
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
|
||||||
|
|||||||
@ -122,7 +122,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { pub as api, files } from "@/api";
|
import { pub as api } from "@/api";
|
||||||
import { filesize } from "filesize";
|
import { filesize } from "filesize";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { Base64 } from "js-base64";
|
import { Base64 } from "js-base64";
|
||||||
@ -154,16 +154,13 @@ const route = useRoute()
|
|||||||
const fileStore = useFileStore()
|
const fileStore = useFileStore()
|
||||||
const layoutStore = useLayoutStore()
|
const layoutStore = useLayoutStore()
|
||||||
|
|
||||||
watch(route, (newValue, oldValue) => {
|
watch(route, () => {
|
||||||
showLimit.value = 100
|
showLimit.value = 100
|
||||||
fetchData();
|
fetchData();
|
||||||
})
|
})
|
||||||
|
|
||||||
const req = computed(() => fileStore.req)
|
const req = computed(() => fileStore.req)
|
||||||
|
|
||||||
// inject: ["$showSuccess"],
|
|
||||||
|
|
||||||
|
|
||||||
// Define computes
|
// Define computes
|
||||||
|
|
||||||
const icon = computed(() => {
|
const icon = computed(() => {
|
||||||
@ -283,16 +280,16 @@ onMounted(async () => {
|
|||||||
await fetchData();
|
await fetchData();
|
||||||
|
|
||||||
|
|
||||||
// window.addEventListener("keydown", this.keyEvent);
|
window.addEventListener("keydown", keyEvent);
|
||||||
// this.clip = new Clipboard(".copy-clipboard");
|
clip.value = new Clipboard(".copy-clipboard");
|
||||||
// this.clip.on("success", () => {
|
clip.value.on("success", () => {
|
||||||
// this.$showSuccess(this.t("success.linkCopied"));
|
// $showSuccess(this.t("success.linkCopied"));
|
||||||
// });
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
// window.removeEventListener("keydown", this.keyEvent);
|
window.removeEventListener("keydown", keyEvent);
|
||||||
// this.clip.destroy();
|
clip.value.destroy();
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user