mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-08-28 19:47:17 +08:00
🔨 Refactor(custom): refactored all imports
This commit is contained in:
@@ -10,10 +10,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getConfig } from '@/utils/dataSender'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { II18nLanguage } from '~/universal/types/enum'
|
||||
import { configPaths } from '~/universal/utils/configPaths'
|
||||
|
||||
import { getConfig } from '@/utils/dataSender'
|
||||
|
||||
import { II18nLanguage } from '#/types/enum'
|
||||
import { configPaths } from '#/utils/configPaths'
|
||||
|
||||
const srcUrl = ref('https://piclist.cn/app.html')
|
||||
|
||||
|
||||
@@ -458,50 +458,30 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// 类型声明
|
||||
import type { IResult } from '@picgo/store/dist/types'
|
||||
|
||||
// 事件常量
|
||||
import { PASTE_TEXT, GET_PICBEDS } from '#/events/constants'
|
||||
|
||||
// Element Plus 组件
|
||||
import { CheckboxValueType, ElMessageBox, ElNotification, ElMessage } from 'element-plus'
|
||||
|
||||
// Element Plus 图标
|
||||
import { InfoFilled, Close, CaretBottom, Document, Edit, Delete, CaretTop, Sort, Refresh } from '@element-plus/icons-vue'
|
||||
|
||||
// Electron 相关
|
||||
import {
|
||||
ipcRenderer,
|
||||
clipboard,
|
||||
IpcRendererEvent
|
||||
} from 'electron'
|
||||
|
||||
// Vue 相关
|
||||
import { CheckboxValueType, ElMessageBox, ElNotification, ElMessage } from 'element-plus'
|
||||
import { InfoFilled, Close, CaretBottom, Document, Edit, Delete, CaretTop, Sort, Refresh } from '@element-plus/icons-vue'
|
||||
import path from 'path'
|
||||
import { computed, nextTick, onActivated, onBeforeUnmount, onBeforeMount, reactive, ref, watch } from 'vue'
|
||||
|
||||
// 数据发送工具函数
|
||||
import { getConfig, saveConfig, sendToMain } from '@/utils/dataSender'
|
||||
|
||||
// Vue Router 相关
|
||||
import { onBeforeRouteUpdate } from 'vue-router'
|
||||
import type { IResult } from '@picgo/store/dist/types'
|
||||
|
||||
// 国际化函数
|
||||
import ALLApi from '@/apis/allApi'
|
||||
import { T as $T } from '@/i18n/index'
|
||||
|
||||
// 数据库操作
|
||||
import { customRenameFormatTable, customStrMatch, customStrReplace } from '@/manage/utils/common'
|
||||
import { getConfig, saveConfig, sendToMain } from '@/utils/dataSender'
|
||||
import $$db from '@/utils/db'
|
||||
|
||||
// API 接口
|
||||
import ALLApi from '@/apis/allApi'
|
||||
|
||||
// 工具函数
|
||||
import { customRenameFormatTable, customStrMatch, customStrReplace } from '../manage/utils/common'
|
||||
import { PASTE_TEXT, GET_PICBEDS } from '#/events/constants'
|
||||
import { configPaths } from '#/utils/configPaths'
|
||||
import { picBedsCanbeDeleted } from '#/utils/static'
|
||||
import path from 'path'
|
||||
import { configPaths } from '~/universal/utils/configPaths'
|
||||
import { IPasteStyle } from '~/universal/types/enum'
|
||||
import { IPasteStyle } from '#/types/enum'
|
||||
|
||||
const images = ref<ImgInfo[]>([])
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
@@ -29,19 +29,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { T as $T } from '@/i18n/index'
|
||||
import { ElMessage as $message } from 'element-plus'
|
||||
import {
|
||||
ipcRenderer,
|
||||
IpcRendererEvent
|
||||
} from 'electron'
|
||||
import { onBeforeUnmount, onBeforeMount, ref, watch } from 'vue'
|
||||
import { SHOW_MINI_PAGE_MENU, SET_MINI_WINDOW_POS } from '~/universal/events/constants'
|
||||
import { isUrl } from '~/universal/utils/common'
|
||||
import { getConfig, sendToMain } from '@/utils/dataSender'
|
||||
import { IConfig } from 'piclist'
|
||||
import { onBeforeUnmount, onBeforeMount, ref, watch } from 'vue'
|
||||
|
||||
import { T as $T } from '@/i18n/index'
|
||||
import { invokeToMain } from '@/manage/utils/dataSender'
|
||||
import { getConfig, sendToMain } from '@/utils/dataSender'
|
||||
|
||||
import { SHOW_MINI_PAGE_MENU, SET_MINI_WINDOW_POS } from '#/events/constants'
|
||||
import { isUrl } from '#/utils/common'
|
||||
|
||||
const logoPath = ref('')
|
||||
const dragover = ref(false)
|
||||
|
||||
@@ -1377,25 +1377,28 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { compare } from 'compare-versions'
|
||||
import { ipcRenderer } from 'electron'
|
||||
import { ElForm, ElMessage as $message, ElMessage, ElMessageBox, FormRules } from 'element-plus'
|
||||
import { Reading, Close, Edit, InfoFilled } from '@element-plus/icons-vue'
|
||||
import pkg from 'root/package.json'
|
||||
import { PICGO_OPEN_FILE, PICGO_OPEN_DIRECTORY, OPEN_URL, GET_PICBEDS, HIDE_DOCK } from '#/events/constants'
|
||||
import { II18nLanguage, IRPCActionType, ISartMode } from '~/universal/types/enum'
|
||||
import { ipcRenderer } from 'electron'
|
||||
import { i18nManager, T as $T } from '@/i18n/index'
|
||||
import { enforceNumber } from '~/universal/utils/common'
|
||||
import { getLatestVersion } from '#/utils/getLatestVersion'
|
||||
import { compare } from 'compare-versions'
|
||||
import { computed, onBeforeMount, onBeforeUnmount, reactive, ref, toRaw, watch } from 'vue'
|
||||
import { getConfig, saveConfig, sendRPC, sendToMain } from '@/utils/dataSender'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { SHORTKEY_PAGE } from '@/router/config'
|
||||
import { IConfig } from 'piclist'
|
||||
import { invokeToMain } from '@/manage/utils/dataSender'
|
||||
import { buildInRenameFormatTable } from '../manage/utils/common'
|
||||
import { configPaths, ISartModeValues } from '~/universal/utils/configPaths'
|
||||
import { computed, onBeforeMount, onBeforeUnmount, reactive, ref, toRaw, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
import ImageProcessSetting from '@/components/ImageProcessSetting.vue'
|
||||
import { i18nManager, T as $T } from '@/i18n/index'
|
||||
import { buildInRenameFormatTable } from '@/manage/utils/common'
|
||||
import { invokeToMain } from '@/manage/utils/dataSender'
|
||||
import { SHORTKEY_PAGE } from '@/router/config'
|
||||
import { getConfig, saveConfig, sendRPC, sendToMain } from '@/utils/dataSender'
|
||||
|
||||
import { PICGO_OPEN_FILE, PICGO_OPEN_DIRECTORY, OPEN_URL, GET_PICBEDS, HIDE_DOCK } from '#/events/constants'
|
||||
import { II18nLanguage, IRPCActionType, ISartMode } from '#/types/enum'
|
||||
import { enforceNumber } from '#/utils/common'
|
||||
import { configPaths, ISartModeValues } from '#/utils/configPaths'
|
||||
import { getLatestVersion } from '#/utils/getLatestVersion'
|
||||
|
||||
import pkg from 'root/package.json'
|
||||
|
||||
const $router = useRouter()
|
||||
const activeName = ref<'system' | 'syncAndConfigure' | 'upload' | 'advanced' | 'upadte'>('system')
|
||||
|
||||
@@ -227,16 +227,22 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Close, Download, Refresh, Goods, Remove, Tools } from '@element-plus/icons-vue'
|
||||
import { T as $T } from '@/i18n/index'
|
||||
import ConfigForm from '@/components/ConfigFormForPlugin.vue'
|
||||
import { debounce, DebouncedFunc } from 'lodash'
|
||||
import axios from 'axios'
|
||||
import {
|
||||
ipcRenderer,
|
||||
IpcRendererEvent
|
||||
} from 'electron'
|
||||
import { handleStreamlinePluginName } from '~/universal/utils/common'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { debounce, DebouncedFunc } from 'lodash'
|
||||
import { Close, Download, Refresh, Goods, Remove, Tools } from '@element-plus/icons-vue'
|
||||
import { computed, ref, onBeforeMount, onBeforeUnmount, watch, onMounted, reactive, toRaw } from 'vue'
|
||||
|
||||
import ConfigForm from '@/components/ConfigFormForPlugin.vue'
|
||||
import { T as $T } from '@/i18n/index'
|
||||
import { getConfig, saveConfig, sendRPC, sendToMain } from '@/utils/dataSender'
|
||||
|
||||
import {
|
||||
OPEN_URL,
|
||||
PICGO_CONFIG_PLUGIN,
|
||||
@@ -246,12 +252,9 @@ import {
|
||||
GET_PICBEDS,
|
||||
PICGO_HANDLE_PLUGIN_DONE
|
||||
} from '#/events/constants'
|
||||
import { computed, ref, onBeforeMount, onBeforeUnmount, watch, onMounted, reactive, toRaw } from 'vue'
|
||||
import { getConfig, saveConfig, sendRPC, sendToMain } from '@/utils/dataSender'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import axios from 'axios'
|
||||
import { IRPCActionType } from '~/universal/types/enum'
|
||||
import { configPaths } from '~/universal/utils/configPaths'
|
||||
import { IRPCActionType } from '#/types/enum'
|
||||
import { handleStreamlinePluginName } from '#/utils/common'
|
||||
import { configPaths } from '#/utils/configPaths'
|
||||
|
||||
const $confirm = ElMessageBox.confirm
|
||||
const searchText = ref('')
|
||||
|
||||
@@ -53,14 +53,16 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Close } from '@element-plus/icons-vue'
|
||||
import { GET_RENAME_FILE_NAME, RENAME_FILE_NAME } from '#/events/constants'
|
||||
import { sendToMain } from '@/utils/dataSender'
|
||||
import { T as $T } from '@/i18n/index'
|
||||
import { ipcRenderer, IpcRendererEvent } from 'electron'
|
||||
import { onBeforeUnmount, onBeforeMount, ref, reactive } from 'vue'
|
||||
import { useIPCOn } from '@/hooks/useIPC'
|
||||
import { FormInstance } from 'element-plus'
|
||||
import { Close } from '@element-plus/icons-vue'
|
||||
import { onBeforeUnmount, onBeforeMount, ref, reactive } from 'vue'
|
||||
|
||||
import { useIPCOn } from '@/hooks/useIPC'
|
||||
import { T as $T } from '@/i18n/index'
|
||||
import { sendToMain } from '@/utils/dataSender'
|
||||
|
||||
import { GET_RENAME_FILE_NAME, RENAME_FILE_NAME } from '#/events/constants'
|
||||
|
||||
const id = ref<string | null>(null)
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
@@ -116,14 +116,17 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import keyBinding from '@/utils/key-binding'
|
||||
import { ipcRenderer, IpcRendererEvent } from 'electron'
|
||||
import { TOGGLE_SHORTKEY_MODIFIED_MODE } from '#/events/constants'
|
||||
import { onBeforeUnmount, onBeforeMount, ref, watch } from 'vue'
|
||||
import { getConfig, sendToMain } from '@/utils/dataSender'
|
||||
|
||||
import { T as $T } from '@/i18n'
|
||||
import { configPaths } from '~/universal/utils/configPaths'
|
||||
import { getConfig, sendToMain } from '@/utils/dataSender'
|
||||
import keyBinding from '@/utils/key-binding'
|
||||
|
||||
import { TOGGLE_SHORTKEY_MODIFIED_MODE } from '#/events/constants'
|
||||
import { configPaths } from '#/utils/configPaths'
|
||||
|
||||
const list = ref<IShortKeyConfig[]>([])
|
||||
const keyBindingVisible = ref(false)
|
||||
|
||||
@@ -94,28 +94,18 @@
|
||||
</el-collapse>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// 自定义钩子
|
||||
import { useIPC } from '@/hooks/useIPC'
|
||||
|
||||
// 数据发送工具函数
|
||||
import { sendRPC, triggerRPC } from '@/utils/dataSender'
|
||||
|
||||
// Element Plus 消息框组件
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
|
||||
// Vue 相关
|
||||
import { computed, reactive, ref } from 'vue'
|
||||
|
||||
// 枚举类型声明
|
||||
import { IToolboxItemType, IToolboxItemCheckStatus, IRPCActionType } from '~/universal/types/enum'
|
||||
|
||||
// 国际化函数
|
||||
import { T as $T } from '@/i18n'
|
||||
|
||||
// 组件
|
||||
import ToolboxStatusIcon from '@/components/ToolboxStatusIcon.vue'
|
||||
import ToolboxHandler from '@/components/ToolboxHandler.vue'
|
||||
import { useIPC } from '@/hooks/useIPC'
|
||||
import { T as $T } from '@/i18n'
|
||||
import { sendRPC, triggerRPC } from '@/utils/dataSender'
|
||||
|
||||
import { IToolboxItemType, IToolboxItemCheckStatus, IRPCActionType } from '#/types/enum'
|
||||
|
||||
const $confirm = ElMessageBox.confirm
|
||||
const defaultLogo = ref(`file://${__static.replace(/\\/g, '/')}/roundLogo.png`)
|
||||
|
||||
@@ -62,16 +62,19 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref, onBeforeUnmount, onBeforeMount } from 'vue'
|
||||
import { clipboard, ipcRenderer } from 'electron'
|
||||
import $$db from '@/utils/db'
|
||||
import { T as $T } from '@/i18n/index'
|
||||
import { reactive, ref, onBeforeUnmount, onBeforeMount } from 'vue'
|
||||
import { IResult } from '@picgo/store/dist/types'
|
||||
import { OPEN_WINDOW } from '#/events/constants'
|
||||
import { IPasteStyle, IWindowList } from '#/types/enum'
|
||||
|
||||
import { T as $T } from '@/i18n/index'
|
||||
import { getConfig, sendToMain } from '@/utils/dataSender'
|
||||
|
||||
import $$db from '@/utils/db'
|
||||
|
||||
import { IPasteStyle, IWindowList } from '#/types/enum'
|
||||
import { OPEN_WINDOW } from '#/events/constants'
|
||||
import { handleUrlEncode } from '#/utils/common'
|
||||
import { configPaths } from '~/universal/utils/configPaths'
|
||||
import { configPaths } from '#/utils/configPaths'
|
||||
|
||||
const files = ref<IResult<ImgInfo>[]>([])
|
||||
const notification = reactive({
|
||||
|
||||
@@ -154,27 +154,29 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { UploadFilled, CaretBottom } from '@element-plus/icons-vue'
|
||||
import { ipcRenderer, IpcRendererEvent } from 'electron'
|
||||
import { ElMessage as $message } from 'element-plus'
|
||||
import { UploadFilled, CaretBottom } from '@element-plus/icons-vue'
|
||||
import { ref, onBeforeMount, onBeforeUnmount, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
import ImageProcessSetting from '@/components/ImageProcessSetting.vue'
|
||||
import { T as $T } from '@/i18n'
|
||||
import { PICBEDS_PAGE } from '@/router/config'
|
||||
import $bus from '@/utils/bus'
|
||||
import { getConfig, saveConfig, sendToMain, triggerRPC } from '@/utils/dataSender'
|
||||
|
||||
import {
|
||||
SHOW_INPUT_BOX,
|
||||
SHOW_INPUT_BOX_RESPONSE,
|
||||
SHOW_UPLOAD_PAGE_MENU,
|
||||
GET_PICBEDS
|
||||
} from '~/universal/events/constants'
|
||||
} from '#/events/constants'
|
||||
import { IPasteStyle, IRPCActionType } from '#/types/enum'
|
||||
import {
|
||||
isUrl
|
||||
} from '~/universal/utils/common'
|
||||
import { ElMessage as $message } from 'element-plus'
|
||||
import { getConfig, saveConfig, sendToMain, triggerRPC } from '@/utils/dataSender'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { PICBEDS_PAGE } from '@/router/config'
|
||||
import { IPasteStyle, IRPCActionType } from '~/universal/types/enum'
|
||||
import { configPaths } from '~/universal/utils/configPaths'
|
||||
import ImageProcessSetting from '@/components/ImageProcessSetting.vue'
|
||||
} from '#/utils/common'
|
||||
import { configPaths } from '#/utils/configPaths'
|
||||
|
||||
const $router = useRouter()
|
||||
|
||||
|
||||
@@ -91,35 +91,21 @@
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// Element Plus 图标
|
||||
import { Edit, Delete, Plus } from '@element-plus/icons-vue'
|
||||
|
||||
// 数据发送工具函数
|
||||
<script lang="ts" setup>
|
||||
import dayjs from 'dayjs'
|
||||
import { ipcRenderer } from 'electron'
|
||||
import { Edit, Delete, Plus } from '@element-plus/icons-vue'
|
||||
import { onBeforeMount, ref } from 'vue'
|
||||
import { useRouter, useRoute, onBeforeRouteUpdate } from 'vue-router'
|
||||
import { saveConfig, triggerRPC } from '@/utils/dataSender'
|
||||
|
||||
// 时间处理库
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
// 枚举类型声明
|
||||
import { IRPCActionType } from '~/universal/types/enum'
|
||||
|
||||
// 国际化函数
|
||||
import { T as $T } from '@/i18n/index'
|
||||
|
||||
// Vue Router 相关
|
||||
import { useRouter, useRoute, onBeforeRouteUpdate } from 'vue-router'
|
||||
|
||||
// Vue 生命周期钩子
|
||||
import { onBeforeMount, ref } from 'vue'
|
||||
|
||||
// 路由配置常量
|
||||
import { useStore } from '@/hooks/useStore'
|
||||
import { PICBEDS_PAGE, UPLOADER_CONFIG_PAGE } from '@/router/config'
|
||||
|
||||
// 状态管理
|
||||
import { useStore } from '@/hooks/useStore'
|
||||
import { configPaths } from '~/universal/utils/configPaths'
|
||||
import { ipcRenderer } from 'electron'
|
||||
import { IRPCActionType } from '#/types/enum'
|
||||
import { configPaths } from '#/utils/configPaths'
|
||||
|
||||
const $router = useRouter()
|
||||
const $route = useRoute()
|
||||
|
||||
@@ -97,24 +97,25 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
import { II18nLanguage, IRPCActionType } from '~/universal/types/enum'
|
||||
import { ref, onBeforeUnmount, onBeforeMount } from 'vue'
|
||||
import { T as $T } from '@/i18n/index'
|
||||
import { getConfig, sendToMain, triggerRPC } from '@/utils/dataSender'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import ConfigForm from '@/components/ConfigForm.vue'
|
||||
import dayjs from 'dayjs'
|
||||
import {
|
||||
clipboard,
|
||||
ipcRenderer,
|
||||
IpcRendererEvent
|
||||
} from 'electron'
|
||||
import { OPEN_URL } from '~/universal/events/constants'
|
||||
import { Link } from '@element-plus/icons-vue'
|
||||
import dayjs from 'dayjs'
|
||||
import { ElDropdown, ElMessage } from 'element-plus'
|
||||
import { configPaths } from '~/universal/utils/configPaths'
|
||||
import { picBedManualUrlList } from '~/universal/utils/static'
|
||||
import { Link } from '@element-plus/icons-vue'
|
||||
import { ref, onBeforeUnmount, onBeforeMount } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
import ConfigForm from '@/components/ConfigForm.vue'
|
||||
import { T as $T } from '@/i18n/index'
|
||||
import { getConfig, sendToMain, triggerRPC } from '@/utils/dataSender'
|
||||
|
||||
import { OPEN_URL } from '#/events/constants'
|
||||
import { II18nLanguage, IRPCActionType } from '#/types/enum'
|
||||
import { configPaths } from '#/utils/configPaths'
|
||||
import { picBedManualUrlList } from '#/utils/static'
|
||||
|
||||
const type = ref('')
|
||||
const config = ref<IPicGoPluginConfig[]>([])
|
||||
|
||||
Reference in New Issue
Block a user