renamed types folder

This commit is contained in:
arabcoders 2025-07-18 18:56:38 +03:00
parent caf60333ea
commit 1580388b96
20 changed files with 25 additions and 13 deletions

View file

@ -209,7 +209,7 @@
<script setup lang="ts">
import { useStorage } from '@vueuse/core'
import { decode } from '~/utils/importer'
import type { ConditionItem, ImportedConditionItem } from '~/@types/conditions'
import type { ConditionItem, ImportedConditionItem } from '~/types/conditions'
const emitter = defineEmits<{
(e: 'cancel'): void

View file

@ -231,7 +231,7 @@
<script setup lang="ts">
import 'assets/css/bulma-switch.css'
import { useStorage } from '@vueuse/core'
import type { item_request } from '~/@types/item'
import type { item_request } from '~/types/item'
import { getSeparatorsName, separators } from '~/utils/utils'
const props = defineProps<{ item?: Partial<item_request> }>()

View file

@ -72,7 +72,7 @@ hr {
<script setup lang="ts">
import moment from 'moment'
import type { changelogs, changeset } from '~/@types/changelogs'
import type { changelogs, changeset } from '~/types/changelogs'
const toast = useNotification()
const config = useConfigStore()

View file

@ -117,7 +117,7 @@
<script setup lang="ts">
import { request } from '~/utils/index'
import { encode } from '~/utils/importer'
import type { ConditionItem, ImportedConditionItem } from '~/@types/conditions'
import type { ConditionItem, ImportedConditionItem } from '~/types/conditions'
const toast = useNotification()
const config = useConfigStore()

View file

@ -63,6 +63,7 @@ import { useStorage } from '@vueuse/core'
const config = useConfigStore()
const socket = useSocketStore()
const toast = useNotification()
const bg_enable = useStorage<boolean>('random_bg', true)
const bg_opacity = useStorage<number>('random_bg_opacity', 0.95)
@ -88,14 +89,15 @@ watch(() => config.app.basic_mode, async () => {
return
}
await navigateTo('/')
})
}, { immediate: true })
watch(() => config.app.console_enabled, async () => {
if (config.app.console_enabled) {
return
}
toast.error('Console is disabled in the configuration. Please enable it to use this feature.')
await navigateTo('/')
})
}, { immediate: true })
const handle_event = () => {
if (!terminal.value) {

View file

@ -80,7 +80,7 @@
<script setup lang="ts">
import { useStorage } from '@vueuse/core'
import type { item_request } from '~/@types/item'
import type { item_request } from '~/types/item'
const config = useConfigStore()
const stateStore = useStateStore()

View file

@ -114,7 +114,7 @@ import moment from 'moment'
import { request } from '~/utils/index'
import { ref, onMounted, nextTick } from 'vue'
import { useStorage } from '@vueuse/core'
import type { log_line } from '~/@types/logs'
import type { log_line } from '~/types/logs'
let scrollTimeout: NodeJS.Timeout | null = null

View file

@ -330,7 +330,7 @@ import { useStorage } from '@vueuse/core'
import { CronExpressionParser } from 'cron-parser'
import { request, sleep } from '~/utils/index'
import { encode } from '~/utils/importer'
import type { task_item, exported_task, error_response } from '~/@types/tasks'
import type { task_item, exported_task, error_response } from '~/types/tasks'
const box = useConfirm()
const toast = useNotification()

View file

@ -1,5 +1,5 @@
import { useStorage } from '@vueuse/core'
import type { ConfigState } from '~/@types/config';
import type { ConfigState } from '~/types/config';
export const useConfigStore = defineStore('config', () => {
const state = reactive<ConfigState>({

View file

@ -2,6 +2,9 @@
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json",
"compilerOptions": {
"allowImportingTsExtensions": false
"allowImportingTsExtensions": false,
"types": [
"./types/globals"
]
}
}

7
ui/types/globals.d.ts vendored Normal file
View file

@ -0,0 +1,7 @@
export { }
declare global {
interface Window {
ws?: unknown
}
}

View file

@ -13,7 +13,7 @@ const getValue = (obj) => 'function' === typeof obj ? obj() : obj
/**
* Get value from object or function and return default value if it's undefined or null
*
* @param {Object|Array} obj The object to get the value from.
* @param {Object|Array|any} obj The object to get the value from.
* @param {string} path The path to the value.
* @param {*} defaultValue The default value to return if the path is not found.
*

View file

@ -1,4 +1,4 @@
import type { convert_args_response } from "~/@types/responses";
import type { convert_args_response } from "~/types/responses";
const separators = [
{ name: 'Comma', value: ',', },