fix: 线程说明收进提示并上移首页代理按钮
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, ref } from "vue";
|
import { computed, onMounted, ref } from "vue";
|
||||||
import { NAlert, NButton, NCheckbox, NDropdown, NForm, NFormItem, NIcon, NInput, NInputNumber, NModal, NSelect, NTimePicker, NTooltip, useDialog, type DropdownOption } from "naive-ui";
|
import { NAlert, NButton, NCheckbox, NDropdown, NForm, NFormItem, NIcon, NInput, NInputNumber, NModal, NSelect, NTimePicker, NTooltip, useDialog, type DropdownOption } from "naive-ui";
|
||||||
import { EllipsisHorizontalOutline, EllipsisVerticalOutline, PauseOutline, PlayOutline, SettingsOutline, WarningOutline } from "@vicons/ionicons5";
|
import { EllipsisHorizontalOutline, EllipsisVerticalOutline, HelpCircleOutline, PauseOutline, PlayOutline, SettingsOutline, WarningOutline } from "@vicons/ionicons5";
|
||||||
import { dayOptions, workerOptions } from "../../shared/studyFields";
|
import { dayOptions, workerHint, workerOptions } from "../../shared/studyFields";
|
||||||
|
|
||||||
interface UserRow {
|
interface UserRow {
|
||||||
employee_id: string;
|
employee_id: string;
|
||||||
@@ -724,8 +724,21 @@ onMounted(() => {
|
|||||||
<n-time-picker v-model:formatted-value="startTime" value-format="HH:mm:ss" :actions="null" />
|
<n-time-picker v-model:formatted-value="startTime" value-format="HH:mm:ss" :actions="null" />
|
||||||
</div>
|
</div>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item label="线程数量">
|
<n-form-item>
|
||||||
<n-select id="admin-course-workers" v-model:value="workersValue" :options="workerOptions" />
|
<template #label>
|
||||||
|
<span class="field-title">
|
||||||
|
<span>线程数量</span>
|
||||||
|
<n-tooltip placement="top">
|
||||||
|
<template #trigger>
|
||||||
|
<button type="button" class="hint-icon" aria-label="说明">
|
||||||
|
<n-icon><HelpCircleOutline /></n-icon>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
{{ workerHint }}
|
||||||
|
</n-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<n-select id="admin-course-workers" class="worker-select" v-model:value="workersValue" :options="workerOptions" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item label="代理类型">
|
<n-form-item label="代理类型">
|
||||||
<n-select v-model:value="proxyScheme" :options="proxyOptions" />
|
<n-select v-model:value="proxyScheme" :options="proxyOptions" />
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, onUnmounted, ref, watch } from "vue";
|
import { computed, onMounted, onUnmounted, ref, watch } from "vue";
|
||||||
import { NAlert, NButton, NForm, NFormItem, NIcon, NInput, NInputNumber, NModal, NProgress, NSelect, NTimePicker, NTooltip } from "naive-ui";
|
import { NAlert, NButton, NForm, NFormItem, NIcon, NInput, NInputNumber, NModal, NProgress, NSelect, NTimePicker, NTooltip } from "naive-ui";
|
||||||
import { GlobeOutline, PlayOutline, RefreshOutline, StopOutline, WarningOutline } from "@vicons/ionicons5";
|
import { GlobeOutline, HelpCircleOutline, PlayOutline, RefreshOutline, StopOutline, WarningOutline } from "@vicons/ionicons5";
|
||||||
import { dayOptions, workerOptions } from "../../shared/studyFields";
|
import { dayOptions, workerHint, workerOptions } from "../../shared/studyFields";
|
||||||
|
|
||||||
interface HomeSummary {
|
interface HomeSummary {
|
||||||
name: string;
|
name: string;
|
||||||
@@ -551,17 +551,23 @@ onUnmounted(() => {
|
|||||||
<section class="panel-card study-card">
|
<section class="panel-card study-card">
|
||||||
<header class="panel-card-head">
|
<header class="panel-card-head">
|
||||||
<h3>自动学习</h3>
|
<h3>自动学习</h3>
|
||||||
<n-button
|
<div class="study-head-actions">
|
||||||
:type="studyControl.started ? 'error' : 'primary'"
|
<n-button v-if="proxyLoaded" size="small" quaternary @click="proxyOpen = true">
|
||||||
size="small"
|
<template #icon><n-icon><GlobeOutline /></n-icon></template>
|
||||||
:loading="studyBusy"
|
代理
|
||||||
@click="toggleStudy"
|
</n-button>
|
||||||
>
|
<n-button
|
||||||
<template #icon>
|
:type="studyControl.started ? 'error' : 'primary'"
|
||||||
<n-icon><StopOutline v-if="studyControl.started" /><PlayOutline v-else /></n-icon>
|
size="small"
|
||||||
</template>
|
:loading="studyBusy"
|
||||||
{{ studyControl.started ? "停止" : "立即开始" }}
|
@click="toggleStudy"
|
||||||
</n-button>
|
>
|
||||||
|
<template #icon>
|
||||||
|
<n-icon><StopOutline v-if="studyControl.started" /><PlayOutline v-else /></n-icon>
|
||||||
|
</template>
|
||||||
|
{{ studyControl.started ? "停止" : "立即开始" }}
|
||||||
|
</n-button>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<n-alert v-if="studyError" class="summary-error" type="error">{{ studyError }}</n-alert>
|
<n-alert v-if="studyError" class="summary-error" type="error">{{ studyError }}</n-alert>
|
||||||
<n-form class="compact-nform" label-placement="left" label-align="left" :label-width="96" :show-feedback="false" size="small">
|
<n-form class="compact-nform" label-placement="left" label-align="left" :label-width="96" :show-feedback="false" size="small">
|
||||||
@@ -591,8 +597,21 @@ onUnmounted(() => {
|
|||||||
<n-time-picker v-model:formatted-value="startTime" value-format="HH:mm:ss" size="small" :actions="null" />
|
<n-time-picker v-model:formatted-value="startTime" value-format="HH:mm:ss" size="small" :actions="null" />
|
||||||
</div>
|
</div>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item v-if="workersLoaded" label="线程数量">
|
<n-form-item v-if="workersLoaded">
|
||||||
<n-select id="course-workers" v-model:value="courseWorkers" size="small" :options="workerOptions" />
|
<template #label>
|
||||||
|
<span class="field-title">
|
||||||
|
<span>线程数量</span>
|
||||||
|
<n-tooltip placement="top">
|
||||||
|
<template #trigger>
|
||||||
|
<button type="button" class="hint-icon" aria-label="说明">
|
||||||
|
<n-icon><HelpCircleOutline /></n-icon>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
{{ workerHint }}
|
||||||
|
</n-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<n-select id="course-workers" class="worker-select" v-model:value="courseWorkers" size="small" :options="workerOptions" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
<div class="home-study-status">
|
<div class="home-study-status">
|
||||||
@@ -612,12 +631,6 @@ onUnmounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="study-card-foot">
|
|
||||||
<n-button v-if="proxyLoaded" size="small" quaternary @click="proxyOpen = true">
|
|
||||||
<template #icon><n-icon><GlobeOutline /></n-icon></template>
|
|
||||||
代理
|
|
||||||
</n-button>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<n-modal
|
<n-modal
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
export const workerHint = "速度较慢,但是稳定且不容易触发风控,最大可设置8";
|
||||||
|
|
||||||
export const workerOptions = [
|
export const workerOptions = [
|
||||||
{ label: "1 · 推荐,速度较慢,稳定且不容易触发风控", value: 1 },
|
{ label: "1 · 推荐", value: 1 },
|
||||||
{ label: "2", value: 2 },
|
{ label: "2", value: 2 },
|
||||||
{ label: "3", value: 3 },
|
{ label: "3", value: 3 },
|
||||||
{ label: "4", value: 4 },
|
{ label: "4", value: 4 },
|
||||||
|
|||||||
+11
-6
@@ -562,6 +562,17 @@ select {
|
|||||||
width: 108px;
|
width: 108px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.worker-select {
|
||||||
|
width: 148px;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.study-head-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.start-control .n-time-picker {
|
.start-control .n-time-picker {
|
||||||
width: 148px;
|
width: 148px;
|
||||||
}
|
}
|
||||||
@@ -680,12 +691,6 @@ select {
|
|||||||
box-shadow: 0 0 6px rgba(248, 81, 73, 0.5);
|
box-shadow: 0 0 6px rgba(248, 81, 73, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.study-card-foot {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
margin-top: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.history-facts {
|
.history-facts {
|
||||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
margin: 0 0 16px;
|
margin: 0 0 16px;
|
||||||
|
|||||||
Reference in New Issue
Block a user