mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-10 17:42:45 +08:00
✨ Feature(custom): add 3s intermedia to avoid github api rate limit
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
- 文件浏览页面新增列表模式支持。
|
- 文件浏览页面新增列表模式支持。
|
||||||
- 现在第一次启动时根据系统语言自动选择界面语言
|
- 现在第一次启动时根据系统语言自动选择界面语言
|
||||||
- 现在windows系统第一次启动时会默认显示主界面
|
- 现在windows系统第一次启动时会默认显示主界面
|
||||||
|
- 管理页面-Github上传多个文件时增加了3s的间隔时间,避免触发Github的API速率限制
|
||||||
- 现在支持手动关闭 GPU 加速,解决部分硬件兼容性导致的黑屏或闪烁问题
|
- 现在支持手动关闭 GPU 加速,解决部分硬件兼容性导致的黑屏或闪烁问题
|
||||||
- 新增高级动画设置,开启后可获得更佳的 UI 交互体验
|
- 新增高级动画设置,开启后可获得更佳的 UI 交互体验
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ Use custom `javascript` scripts to extend PicList's functionality without the ne
|
|||||||
- Optimized the configuration saving logic for independent image hosting processing settings.
|
- Optimized the configuration saving logic for independent image hosting processing settings.
|
||||||
- Now automatically selects the interface language based on the system language on the first launch.
|
- Now automatically selects the interface language based on the system language on the first launch.
|
||||||
- Now the main interface will be displayed by default on the first launch of Windows systems.
|
- Now the main interface will be displayed by default on the first launch of Windows systems.
|
||||||
|
- Added a 3-second interval when uploading multiple files to GitHub on the management page to avoid triggering GitHub's API rate limits.
|
||||||
- Now supports manually disabling GPU acceleration to resolve black screen or flickering issues caused by some hardware compatibility.
|
- Now supports manually disabling GPU acceleration to resolve black screen or flickering issues caused by some hardware compatibility.
|
||||||
- Added advanced animation settings for a better UI interaction experience when enabled.
|
- Added advanced animation settings for a better UI interaction experience when enabled.
|
||||||
|
|
||||||
|
|||||||
@@ -480,7 +480,8 @@ class GithubApi {
|
|||||||
targetFileBucket: repo,
|
targetFileBucket: repo,
|
||||||
targetFileRegion: region,
|
targetFileRegion: region,
|
||||||
})
|
})
|
||||||
gotUpload(
|
|
||||||
|
await gotUpload(
|
||||||
instance,
|
instance,
|
||||||
`${this.baseUrl}/repos/${this.username}/${repo}/contents/${trimKey}`,
|
`${this.baseUrl}/repos/${this.username}/${repo}/contents/${trimKey}`,
|
||||||
'PUT',
|
'PUT',
|
||||||
@@ -496,6 +497,7 @@ class GithubApi {
|
|||||||
false,
|
false,
|
||||||
getAgent(this.proxy),
|
getAgent(this.proxy),
|
||||||
)
|
)
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 3000))
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import { onClickOutside } from '@vueuse/core'
|
|||||||
import { ChevronDownIcon, SortAscIcon } from 'lucide-vue-next'
|
import { ChevronDownIcon, SortAscIcon } from 'lucide-vue-next'
|
||||||
import { nextTick, ref } from 'vue'
|
import { nextTick, ref } from 'vue'
|
||||||
|
|
||||||
|
const emit = defineEmits<(e: 'change', key: string) => void>()
|
||||||
const dropdownRef = ref(null)
|
const dropdownRef = ref(null)
|
||||||
const modelValue = defineModel<string>()
|
const modelValue = defineModel<string>()
|
||||||
const triggerRef = ref<HTMLElement | null>(null)
|
const triggerRef = ref<HTMLElement | null>(null)
|
||||||
@@ -47,6 +48,7 @@ const optionsRef = ref<HTMLElement | null>(null)
|
|||||||
function selectItem(key: string) {
|
function selectItem(key: string) {
|
||||||
modelValue.value = key
|
modelValue.value = key
|
||||||
dropDownOpen.value = false
|
dropDownOpen.value = false
|
||||||
|
emit('change', key)
|
||||||
}
|
}
|
||||||
|
|
||||||
const dropDownOpen = ref(false)
|
const dropDownOpen = ref(false)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
title=""
|
title=""
|
||||||
:key-list="customDomainList.map(item => item.value)"
|
:key-list="customDomainList.map(item => item.value)"
|
||||||
:fronticon="false"
|
:fronticon="false"
|
||||||
|
@change="handleChangeCustomUrlInput"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
v-else-if="isShowCustomDomainInput"
|
v-else-if="isShowCustomDomainInput"
|
||||||
@@ -914,7 +915,7 @@
|
|||||||
width="900px"
|
width="900px"
|
||||||
height="90vh"
|
height="90vh"
|
||||||
>
|
>
|
||||||
<div class="no-scrollbar w-full flex-1 overflow-hidden rounded-md border border-border p-4 shadow-md">
|
<div class="no-scrollbar h-full w-full flex-1 overflow-hidden rounded-md border border-border p-4 shadow-md">
|
||||||
<div class="flex h-full w-full flex-col">
|
<div class="flex h-full w-full flex-col">
|
||||||
<!-- Download Tasks Tabs -->
|
<!-- Download Tasks Tabs -->
|
||||||
<div class="flex flex-1 flex-col gap-2 overflow-hidden border-t border-border-secondary">
|
<div class="flex flex-1 flex-col gap-2 overflow-hidden border-t border-border-secondary">
|
||||||
|
|||||||
@@ -139,6 +139,7 @@
|
|||||||
v-if="picBedSwitchDialogVisible"
|
v-if="picBedSwitchDialogVisible"
|
||||||
v-model:visible="picBedSwitchDialogVisible"
|
v-model:visible="picBedSwitchDialogVisible"
|
||||||
:title="t('pages.manage.main.switchPicBed')"
|
:title="t('pages.manage.main.switchPicBed')"
|
||||||
|
height="auto"
|
||||||
>
|
>
|
||||||
<div class="no-scrollbar h-full w-full overflow-auto p-8">
|
<div class="no-scrollbar h-full w-full overflow-auto p-8">
|
||||||
<div class="grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-4">
|
<div class="grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-4">
|
||||||
|
|||||||
@@ -10,6 +10,14 @@
|
|||||||
<h1 class="m-0 text-2xl font-semibold tracking-tight text-main">{{ t('pages.manage.setting.title') }}</h1>
|
<h1 class="m-0 text-2xl font-semibold tracking-tight text-main">{{ t('pages.manage.setting.title') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex flex-wrap gap-3 overflow-visible">
|
||||||
|
<CustomButton
|
||||||
|
type="primary"
|
||||||
|
:icon="FileText"
|
||||||
|
:text="t('pages.settings.sync.editCloudConfigFile')"
|
||||||
|
@click="openFile('manage.json')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="relative flex h-full w-full flex-1 items-center justify-center overflow-hidden rounded-2xl border border-border-secondary p-1 shadow-md"
|
class="relative flex h-full w-full flex-1 items-center justify-center overflow-hidden rounded-2xl border border-border-secondary p-1 shadow-md"
|
||||||
@@ -18,9 +26,10 @@
|
|||||||
<!-- Cache Info Card -->
|
<!-- Cache Info Card -->
|
||||||
<SettingSection :title="t('pages.manage.setting.section.cache')" :icon="Trash2Icon" only-one-row>
|
<SettingSection :title="t('pages.manage.setting.section.cache')" :icon="Trash2Icon" only-one-row>
|
||||||
<CustomButton
|
<CustomButton
|
||||||
type="secondary"
|
type="custom"
|
||||||
:icon="Trash2Icon"
|
:icon="Trash2Icon"
|
||||||
class="bg-warning/20 p-4!"
|
class="bg-warning/50 p-4! text-secondary hover:bg-warning/80 hover:text-white"
|
||||||
|
:text-class="'group-hover:text-white'"
|
||||||
:text="
|
:text="
|
||||||
t('pages.manage.setting.clearCache', {
|
t('pages.manage.setting.clearCache', {
|
||||||
percent: dbSizeAvailableRate,
|
percent: dbSizeAvailableRate,
|
||||||
@@ -135,7 +144,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Download, Edit2Icon, FolderIcon, Settings, Trash2Icon } from 'lucide-vue-next'
|
import { Download, Edit2Icon, FileText, FolderIcon, Settings, Trash2Icon } from 'lucide-vue-next'
|
||||||
import { computed, nextTick, onBeforeMount, ref, watch } from 'vue'
|
import { computed, nextTick, onBeforeMount, ref, watch } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
@@ -303,6 +312,10 @@ async function initData() {
|
|||||||
await nextTick() // 确保DOM更新完成
|
await nextTick() // 确保DOM更新完成
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function openFile(file: string) {
|
||||||
|
window.electron.sendRPC(IRPCActionType.PICLIST_OPEN_FILE, file)
|
||||||
|
}
|
||||||
|
|
||||||
async function handleDownloadDirClick() {
|
async function handleDownloadDirClick() {
|
||||||
const result = await window.electron.triggerRPC<any>(IRPCActionType.MANAGE_SELECT_DOWNLOAD_FOLDER)
|
const result = await window.electron.triggerRPC<any>(IRPCActionType.MANAGE_SELECT_DOWNLOAD_FOLDER)
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|||||||
@@ -619,13 +619,12 @@
|
|||||||
<ListTodoIcon class="text-accent opacity-90" :size="48" />
|
<ListTodoIcon class="text-accent opacity-90" :size="48" />
|
||||||
<h4 class="m-0 text-xl font-semibold text-main">{{ t('pages.upload.taskQueue.empty') }}</h4>
|
<h4 class="m-0 text-xl font-semibold text-main">{{ t('pages.upload.taskQueue.empty') }}</h4>
|
||||||
<p class="m-0 max-w-[400px] text-base text-secondary">{{ t('pages.upload.taskQueue.emptyHint') }}</p>
|
<p class="m-0 max-w-[400px] text-base text-secondary">{{ t('pages.upload.taskQueue.emptyHint') }}</p>
|
||||||
<button
|
<CustomButton
|
||||||
class="flex cursor-pointer items-center justify-center gap-2 rounded-md bg-accent px-4 py-2.5 text-sm font-medium whitespace-nowrap text-white shadow-sm transition-all duration-fast ease-standard hover:-translate-y-[2px] hover:shadow-md"
|
type="primary"
|
||||||
|
:icon="PlusIcon"
|
||||||
|
:text="t('pages.upload.taskQueue.selectFiles')"
|
||||||
@click="addFilesToTask"
|
@click="addFilesToTask"
|
||||||
>
|
/>
|
||||||
<PlusIcon :size="16" />
|
|
||||||
<span class="mt-0.5">{{ t('pages.upload.taskQueue.selectFiles') }}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</CustomModal>
|
</CustomModal>
|
||||||
|
|||||||
Reference in New Issue
Block a user