feat: insert mode setting

This commit is contained in:
putyy
2025-07-25 11:46:07 +08:00
parent a016465bea
commit af75f1ce4f
9 changed files with 29 additions and 3 deletions

View File

@@ -141,7 +141,6 @@ const buildUrlWithParams = (url: string) => {
}
const handleSeeking = () => {
console.log('handleSeeking')
const currentTime = videoPlayer.value.currentTime
const bufferedEnd = videoPlayer.value.buffered.end(videoPlayer.value.buffered.length - 1)

View File

@@ -96,6 +96,8 @@
"quality_tip": "Effective for video accounts",
"full_intercept": "Full Intercept",
"full_intercept_tip": "Whether to fully intercept WeChat video accounts, No: only intercept video details",
"insert_tail": "insert tail",
"insert_tail_tip": "Intercept whether new data is added to the end of the list",
"upstream_proxy": "Upstream Proxy",
"upstream_proxy_tip": "For combining with other proxy tools, format: http://username:password@your.proxy.server:port",
"download_proxy": "Download Proxy",

View File

@@ -96,6 +96,8 @@
"quality_tip": "视频号有效",
"full_intercept": "全量拦截",
"full_intercept_tip": "微信视频号是否全量拦截,否:只拦截视频详情",
"insert_tail": "添入尾部",
"insert_tail_tip": "拦截到新数据是否添加到列表尾部",
"upstream_proxy": "上游代理",
"upstream_proxy_tip": "用于结合其他代理工具,格式: http://username:password@your.proxy.server:port",
"download_proxy": "下载代理",

View File

@@ -32,6 +32,7 @@ export const useIndexStore = defineStore("index-store", () => {
DownNumber: 3,
UserAgent: "",
UseHeaders: "",
InsertTail: true,
MimeMap: {}
})

View File

@@ -29,6 +29,7 @@ export namespace appType {
DownNumber: number
UserAgent: string
UseHeaders: string
InsertTail: boolean
MimeMap: { [key: string]: MimeMap }
}

View File

@@ -381,7 +381,11 @@ onMounted(() => {
eventStore.addHandle({
type: "newResources",
event: (res: appType.MediaInfo) => {
data.value.push(res)
if (store.globalConfig.InsertTail) {
data.value.push(res)
} else {
data.value.unshift(res)
}
cacheData()
}
})

View File

@@ -64,6 +64,18 @@
{{ t("setting.full_intercept_tip") }}
</NTooltip>
</NFormItem>
<NFormItem :label="t('setting.insert_tail')" path="InsertTail">
<NSwitch v-model:value="formValue.InsertTail"/>
<NTooltip trigger="hover">
<template #trigger>
<NIcon size="18" class="ml-1 text-gray-500">
<HelpCircleOutline/>
</NIcon>
</template>
{{ t("setting.insert_tail_tip") }}
</NTooltip>
</NFormItem>
</NForm>
</NTabPane>