2.4.4 更改主播上限
This commit is contained in:
@@ -72,10 +72,8 @@
|
||||
<div class="space-y-2 max-h-60 overflow-auto">
|
||||
<div v-for="parent in LEVEL_OPTIONS" :key="parent.value"
|
||||
class="border border-gray-100 rounded p-2">
|
||||
<label
|
||||
class="flex items-center gap-2 cursor-pointer font-medium text-gray-700">
|
||||
<input type="checkbox"
|
||||
:checked="isParentSelected(parent).allSelected"
|
||||
<label class="flex items-center gap-2 cursor-pointer font-medium text-gray-700">
|
||||
<input type="checkbox" :checked="isParentSelected(parent).allSelected"
|
||||
:indeterminate="isParentSelected(parent).partialSelected"
|
||||
@change="toggleParentLevel(parent.value)" class="w-4 h-4" />
|
||||
{{ parent.label }} 级
|
||||
@@ -120,11 +118,10 @@
|
||||
<!-- 主播列表 -->
|
||||
<div class="flex-1 overflow-auto p-4">
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3">
|
||||
<div v-for="host in filteredHosts" :key="host.id" @click="toggleSelect(host.id)"
|
||||
:class="[
|
||||
'p-3 rounded-lg border cursor-pointer transition-all',
|
||||
selected.has(host.id) ? 'border-blue-500 bg-blue-50 shadow' : 'border-gray-200 hover:border-gray-300 hover:shadow-sm'
|
||||
]">
|
||||
<div v-for="host in filteredHosts" :key="host.id" @click="toggleSelect(host.id)" :class="[
|
||||
'p-3 rounded-lg border cursor-pointer transition-all',
|
||||
selected.has(host.id) ? 'border-blue-500 bg-blue-50 shadow' : 'border-gray-200 hover:border-gray-300 hover:shadow-sm'
|
||||
]">
|
||||
<div class="flex items-center justify-between mb-1">
|
||||
<span class="font-medium text-sm truncate flex-1" :title="host.anchorId">
|
||||
{{ host.anchorId }}
|
||||
@@ -182,7 +179,8 @@
|
||||
<!-- 主播ID输入 -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">主播ID(每行一个,支持批量粘贴)</label>
|
||||
<textarea v-model="addForm.idsText" rows="6" placeholder="粘贴主播ID,每行一个 例如: anchor_001 anchor_002 anchor_003"
|
||||
<textarea v-model="addForm.idsText" rows="6"
|
||||
placeholder="粘贴主播ID,每行一个 例如: anchor_001 anchor_002 anchor_003"
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:border-blue-500 focus:outline-none resize-none font-mono"></textarea>
|
||||
<div class="text-xs text-gray-400 mt-1">
|
||||
已输入 {{ parsedIds.length }} 个ID
|
||||
@@ -229,7 +227,8 @@
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<div class="p-4 border-t border-gray-200 flex justify-between items-center">
|
||||
<span v-if="addStatus" :class="['text-sm', addStatus.type === 'success' ? 'text-green-600' : 'text-red-600']">
|
||||
<span v-if="addStatus"
|
||||
:class="['text-sm', addStatus.type === 'success' ? 'text-green-600' : 'text-red-600']">
|
||||
{{ addStatus.message }}
|
||||
</span>
|
||||
<span v-else></span>
|
||||
@@ -418,8 +417,8 @@ const loadConfig = async () => {
|
||||
if (!isElectron()) return
|
||||
try {
|
||||
const config = await window.electronAPI.getAutomationConfig()
|
||||
if (config?.maxAnchorCount !== undefined) {
|
||||
maxCount.value = config.maxAnchorCount
|
||||
if (config?.filters?.maxAnchorCount !== undefined) {
|
||||
maxCount.value = config.filters.maxAnchorCount
|
||||
}
|
||||
if (config?.filters?.hostsLevelList) {
|
||||
selectedLevels.value = new Set(config.filters.hostsLevelList)
|
||||
@@ -498,7 +497,9 @@ const updateMaxCount = async (value) => {
|
||||
// value is already updated via v-model
|
||||
if (!isElectron()) return
|
||||
try {
|
||||
await window.electronAPI.updateAutomationConfig({ maxAnchorCount: value })
|
||||
await window.electronAPI.updateAutomationConfig({
|
||||
filters: { maxAnchorCount: value }
|
||||
})
|
||||
console.log('[HostListDialog] 主播数据上限已更新:', value)
|
||||
} catch (e) {
|
||||
console.error('更新配置失败:', e)
|
||||
|
||||
Reference in New Issue
Block a user