refactor: 视频字幕AI并入视频工具 — 新增「AI智能」分组+AI字幕生成卡(语言选择/Whisper转录/SRT下载/AI翻译英日文/时间轴预览), 移除独立/video-subtitle入口, 授权与试用归入video-tools

This commit is contained in:
personal82555 committed 2026-10-13 00:13:03 +08:00
1 parent 6bcdfebf04
commit 98c0dedffd
8 files changed
+229 -460

No files matched your search

-1
View File
@@ -214,7 +214,6 @@ declare module '@vue/runtime-core' {
RouterView: typeof import('vue-router')['RouterView']
RsaKeyPairGenerator: typeof import('./src/tools/rsa-key-pair-generator/rsa-key-pair-generator.vue')['default']
SafelinkDecoder: typeof import('./src/tools/safelink-decoder/safelink-decoder.vue')['default']
ScreenshotQa: typeof import('./src/tools/screenshot-qa/screenshot-qa.vue')['default']
SealMaker: typeof import('./src/tools/seal-maker/seal-maker.vue')['default']
SignaturePad: typeof import('./src/tools/signature-pad/signature-pad.vue')['default']
SiteBookmarks: typeof import('./src/tools/site-bookmarks/site-bookmarks.vue')['default']
+4 -4
View File
@@ -1731,7 +1731,7 @@ class Handler(BaseHTTPRequestHandler):
# ---------- 视频字幕:转录 + 翻译 ----------
def _handle_subtitle(self):
machine = self.headers.get("X-Machine-Id", "")
if check(machine, "video-subtitle") != 200:
if check(machine, "video-tools") != 200:
self._reply(403, json.dumps({"code": 403, "message": "需要授权或免费试用已结束"}, ensure_ascii=False).encode("utf-8"), "application/json")
return
try:
@@ -1771,7 +1771,7 @@ class Handler(BaseHTTPRequestHandler):
lang = (q.get("lang") or [""])[0]
result = audio_ops.run_asr(wav, lang)
shutil.rmtree(wd, ignore_errors=True)
log_usage(machine, "video-subtitle")
log_usage(machine, "video-tools")
self._reply(200, json.dumps({"code": 200, "message": "ok", "data": result}, ensure_ascii=False).encode("utf-8"), "application/json")
except Exception as e: # noqa: BLE001
import traceback
@@ -1781,7 +1781,7 @@ class Handler(BaseHTTPRequestHandler):
def _handle_translate_srt(self):
payload = self._read_payload()
machine = str(payload.get("machine") or "")
if check(machine, "video-subtitle") != 200:
if check(machine, "video-tools") != 200:
self._reply(403, json.dumps({"code": 403, "message": "需要授权或免费试用已结束"}, ensure_ascii=False).encode("utf-8"), "application/json")
return
srt = str(payload.get("srt") or "").strip()
@@ -1795,7 +1795,7 @@ class Handler(BaseHTTPRequestHandler):
{"role": "system", "content": f"你是专业字幕翻译。把用户提供的 SRT 字幕翻译成{tname}:保留序号、时间轴和空行结构完全不变,只翻译每条字幕的文字部分;译文保持口语化、简洁(每行尽量不超过原长的 1.3 倍)。只输出翻译后的 SRT,不要解释。"},
{"role": "user", "content": srt},
])
log_usage(machine, "video-subtitle")
log_usage(machine, "video-tools")
self._reply(200, json.dumps({"code": 200, "message": "ok", "data": {"reply": reply}}, ensure_ascii=False).encode("utf-8"), "application/json")
except Exception as e: # noqa: BLE001
self._reply(502, json.dumps({"code": 502, "message": f"翻译失败: {e}"}, ensure_ascii=False).encode(), "application/json")
-1
View File
@@ -21,7 +21,6 @@ const NEW_FEATURES = [
{ path: '/ai-image-lab', icon: '🪄', name: 'AI 图片实验室', desc: '智能抠图去背景、AI 无损放大变清晰、一键证件照' },
{ path: '/ai-chat', icon: '🤖', name: 'AI 问答', desc: '报错解读、文案写作、代码问题随口问,支持多轮对话' },
{ path: '/copywriting', icon: '✍️', name: '文案工具箱', desc: '一键改写、降 AIGC 率、爆款标题、小红书/朋友圈文案' },
{ path: '/video-subtitle', icon: '🎬', name: '视频字幕 AI', desc: 'Whisper 自动生成 SRT + AI 翻译英日文' },
];
import { config } from '@/config';
-2
View File
@@ -91,7 +91,6 @@ import { tool as pinyinConverter } from './pinyin-converter';
import { tool as aiImageLab } from './ai-image-lab';
import { tool as aiChat } from './ai-chat';
import { tool as copywriting } from './copywriting';
import { tool as videoSubtitle } from './video-subtitle';
import { tool as docConvert } from './doc-convert';
import { tool as aiRetouch } from './ai-retouch';
import { tool as wifiQrCodeGenerator } from './wifi-qr-code-generator';
@@ -212,7 +211,6 @@ export const toolsByCategory: ToolCategory[] = [
aiImageLab,
aiChat,
copywriting,
videoSubtitle,
],
},
{
-1
View File
@@ -20,7 +20,6 @@ export const PROTECTED_TOOLS: Record<string, string> = {
'/ai-image-lab': 'AI图片实验室',
'/ai-chat': 'AI问答',
'/copywriting': '文案工具箱',
'/video-subtitle': '视频字幕AI',
};
export const TRIAL_MS = 30 * 60 * 1000; // 每个功能免费 30 分钟
-11
View File
@@ -1,11 +0,0 @@
import { PlayerPlay } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: '视频字幕 AI',
path: '/video-subtitle',
description: 'Whisper 自动生成 SRT 字幕 + AI 翻译成英文/日文',
keywords: ['subtitle', 'srt', 'whisper', 'asr', '字幕', '转录', '翻译', '视频'],
component: () => import('./video-subtitle.vue'),
icon: PlayerPlay,
});
-439
View File
@@ -1,439 +0,0 @@
<script setup lang="ts">
import { computed, ref } from 'vue';
import { useHead } from '@vueuse/head';
import { getMachineId, licenseHeaders } from '@/tools/license/license';
import { useGenHistory } from '@/tools/gen-history/gen-history';
useHead({ title: '视频字幕 AI - IT-TOOLS-PRO' });
const genHist = useGenHistory('video-subtitle');
interface Seg {
start: number;
end: number;
text: string;
}
const file = ref<File | null>(null);
const busy = ref(false);
const busyMsg = ref('');
const error = ref('');
const segs = ref<Seg[]>([]);
const lang = ref('');
const fileInput = ref<HTMLInputElement>();
const translating = ref(false);
const translated = ref('');
function fmt(t: number) {
const h = Math.floor(t / 3600);
const m = Math.floor((t % 3600) / 60);
const s = Math.floor(t % 60);
const ms = Math.round((t % 1) * 1000);
return `${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')},${String(ms).padStart(3, '0')}`;
}
const srt = computed(() =>
segs.value.map((s, i) => `${i + 1}\n${fmt(s.start)} --> ${fmt(s.end)}\n${s.text}\n`).join('\n'),
);
function pick() {
fileInput.value?.click();
}
function onInput(e: Event) {
const input = e.target as HTMLInputElement;
file.value = input.files?.[0] ?? null;
input.value = '';
segs.value = [];
translated.value = '';
error.value = '';
}
async function transcribe() {
if (!file.value || busy.value) {
error.value = '请先选择视频文件';
return;
}
busy.value = true;
error.value = '';
translated.value = '';
busyMsg.value = '上传并提取音轨中…(长视频需要一些时间)';
try {
const fd = new FormData();
fd.append('file', file.value);
const res = await fetch(`/relay/subtitle?lang=`, {
method: 'POST',
body: fd,
headers: licenseHeaders('video-subtitle'),
});
busyMsg.value = 'AI 转录中…';
const j = await res.json().catch(() => ({}));
if (!res.ok || j.code !== 200) {
throw new Error(j.message || `HTTP ${res.status}`);
}
segs.value = j.data.segments || [];
lang.value = `${j.data.language}(${j.data.probability})`;
if (!segs.value.length) {
throw new Error('未识别到语音内容');
}
genHist.add({ title: `字幕转录: ${file.value.name}`, detail: `${segs.value.length} 条 · 语言 ${j.data.language}` });
}
catch (e: any) {
error.value = String(e?.message || e);
}
finally {
busy.value = false;
busyMsg.value = '';
}
}
async function translate(target: string) {
if (!srt.value || translating.value) {
return;
}
translating.value = true;
error.value = '';
try {
const res = await fetch('/relay/ai/translate-srt', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ machine: getMachineId(), srt: srt.value, target }),
});
const j = await res.json().catch(() => ({}));
if (!res.ok || j.code !== 200) {
throw new Error(j.message || `HTTP ${res.status}`);
}
translated.value = j.data.reply;
genHist.add({ title: `字幕翻译→${target === 'en' ? '英文' : '日文'}`, detail: `${j.data.reply.length} 字` });
}
catch (e: any) {
error.value = String(e?.message || e);
}
finally {
translating.value = false;
}
}
function download(content: string, name: string) {
const blob = new Blob([content], { type: 'text/plain;charset=utf-8' });
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = name;
a.click();
URL.revokeObjectURL(a.href);
}
</script>
<template>
<div class="vs-root">
<div class="vs-head">
<div>
<div class="vs-title">🎬 视频字幕 AI</div>
<div class="vs-sub">本地 Whisper 语音识别 → 自动生成 SRT 字幕 → AI 一键翻译成英文/日文,与视频工具箱联动成完整链路</div>
</div>
</div>
<div class="vs-cols">
<div class="vs-left">
<input ref="fileInput" type="file" hidden accept="video/*,.mp4,.mkv,.mov,.webm,.avi" @change="onInput">
<div class="vs-drop" @click="pick">
<template v-if="!file">
<div class="vs-drop-hint">📁 选择视频文件<br><span>MP4 / MOV / MKV / WebM · ≤500MB</span></div>
</template>
<div v-else class="vs-file">
🎥 {{ file.name }}
<span class="vs-size">({{ (file.size / 1024 / 1024).toFixed(1) }} MB)</span>
<a href="javascript:;" class="vs-clear" @click.stop="file = null; segs = []">✕</a>
</div>
</div>
<div class="vs-sec">语言识别</div>
<div class="vs-chips">
<button class="vs-chip on">自动检测{{ lang ? ` · 已识别 ${lang}` : '' }}</button>
</div>
<button class="vs-go" :disabled="busy || !file" @click="transcribe()">
{{ busy ? `⏳ ${busyMsg}` : '🎙️ 生成字幕' }}
</button>
<template v-if="segs.length">
<div class="vs-sec">翻译</div>
<div class="vs-chips">
<button class="vs-chip" :disabled="translating" @click="translate('en')">
{{ translating ? '⏳ 翻译中…' : '🇬🇧 翻译成英文' }}
</button>
<button class="vs-chip" :disabled="translating" @click="translate('ja')">
🇯🇵 翻译成日文
</button>
</div>
</template>
<div v-if="error" class="vs-error">⚠️ {{ error }}</div>
<div class="vs-hint">💡 需要带语音的视频;无声/纯音乐视频会提示无语音。转录完全本地进行,视频不离开服务器。</div>
</div>
<div class="vs-right">
<div class="vs-sec">
转录结果 · {{ segs.length }} 条
<span v-if="segs.length" class="vs-actions">
<button class="vs-mini" @click="download(srt, 'subtitles.srt')">⬇ 下载 SRT</button>
<button class="vs-mini" @click="navigator.clipboard.writeText(srt)">📋 复制</button>
</span>
</div>
<div class="vs-out">
<div v-if="!segs.length" class="vs-empty">选择视频点「生成字幕」,时间轴预览在这里</div>
<template v-else>
<div v-for="(s, i) in segs" :key="i" class="vs-seg">
<span class="vs-time">{{ fmt(s.start).slice(3, 11) }}</span>
<span class="vs-text">{{ s.text }}</span>
</div>
</template>
</div>
<template v-if="translated">
<div class="vs-sec">
译文字幕
<span class="vs-actions">
<button class="vs-mini" @click="download(translated, 'subtitles-translated.srt')">⬇ 下载译文 SRT</button>
<button class="vs-mini" @click="navigator.clipboard.writeText(translated)">📋 复制</button>
</span>
</div>
<div class="vs-out vs-out-tr">
<pre class="vs-srt">{{ translated }}</pre>
</div>
</template>
<GenHistory tool="video-subtitle" label="字幕记录" class="mt-10px" />
</div>
</div>
</div>
</template>
<style lang="less" scoped>
.vs-root {
padding-bottom: 16px;
}
.vs-head {
margin-bottom: 14px;
.vs-title {
font-size: 17px;
font-weight: 800;
}
.vs-sub {
font-size: 12.5px;
opacity: 0.55;
margin-top: 3px;
}
}
.vs-cols {
display: flex;
gap: 14px;
align-items: flex-start;
}
.vs-left {
width: 380px;
flex-shrink: 0;
border: 1px solid rgba(128, 128, 128, 0.2);
border-radius: 12px;
padding: 14px;
}
.vs-right {
flex: 1;
min-width: 0;
}
.vs-drop {
border: 1.5px dashed rgba(128, 128, 128, 0.4);
border-radius: 10px;
padding: 18px 12px;
text-align: center;
cursor: pointer;
margin-bottom: 12px;
transition: border-color 0.15s;
&:hover {
border-color: #7c3aed;
}
.vs-drop-hint {
font-size: 13.5px;
font-weight: 600;
line-height: 1.7;
span {
font-size: 11.5px;
font-weight: 400;
opacity: 0.5;
}
}
.vs-file {
font-size: 12.5px;
font-weight: 600;
word-break: break-all;
.vs-size {
font-weight: 400;
opacity: 0.55;
}
.vs-clear {
color: #d03050;
margin-left: 8px;
text-decoration: none;
}
}
}
.vs-sec {
font-size: 12.5px;
font-weight: 700;
opacity: 0.75;
margin: 10px 0 7px;
display: flex;
justify-content: space-between;
align-items: center;
}
.vs-chips {
display: flex;
gap: 7px;
flex-wrap: wrap;
}
.vs-chip {
border: 1px solid rgba(128, 128, 128, 0.3);
background: #fff;
border-radius: 999px;
padding: 6px 14px;
font-size: 12.5px;
cursor: pointer;
&.on {
background: rgba(124, 58, 237, 0.1);
border-color: #7c3aed;
color: #7c3aed;
font-weight: 700;
}
&:disabled {
opacity: 0.55;
cursor: not-allowed;
}
}
.vs-go {
width: 100%;
margin-top: 13px;
border: none;
background: #7c3aed;
color: #fff;
border-radius: 9px;
padding: 11px;
font-size: 14px;
font-weight: 700;
cursor: pointer;
line-height: 1.5;
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
&:hover:not(:disabled) {
background: #6d28d9;
}
}
.vs-error {
color: #d03050;
font-size: 12.5px;
margin-top: 9px;
line-height: 1.6;
}
.vs-hint {
font-size: 11.5px;
opacity: 0.5;
line-height: 1.7;
margin-top: 10px;
}
.vs-actions {
display: flex;
gap: 6px;
}
.vs-mini {
border: 1px solid rgba(128, 128, 128, 0.3);
background: #fff;
border-radius: 6px;
padding: 3px 10px;
font-size: 11.5px;
cursor: pointer;
&:hover {
border-color: #18a058;
color: #18a058;
}
}
.vs-out {
background: rgba(128, 128, 128, 0.05);
border: 1px solid rgba(128, 128, 128, 0.15);
border-radius: 10px;
padding: 10px 12px;
max-height: 420px;
overflow-y: auto;
margin-bottom: 12px;
&.vs-out-tr {
max-height: 300px;
}
.vs-empty {
font-size: 13px;
opacity: 0.45;
text-align: center;
padding: 60px 0;
}
}
.vs-seg {
display: flex;
gap: 12px;
padding: 5px 2px;
border-bottom: 1px dashed rgba(128, 128, 128, 0.15);
font-size: 13px;
&:last-child {
border-bottom: none;
}
.vs-time {
color: #7c3aed;
font-family: monospace;
font-size: 12px;
flex-shrink: 0;
opacity: 0.85;
}
.vs-text {
line-height: 1.6;
}
}
.vs-srt {
margin: 0;
white-space: pre-wrap;
word-break: break-word;
font-family: inherit;
font-size: 12.5px;
line-height: 1.7;
}
</style>
+225 -1
View File
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, ref } from 'vue';
import { useHead } from '@vueuse/head';
import { licenseHeaders } from '../license/license';
import { getMachineId, licenseHeaders } from '../license/license';
import GenHistory from '@/tools/gen-history/GenHistory.vue';
import { useGenHistory } from '@/tools/gen-history/gen-history';
@@ -30,6 +30,21 @@ interface VTool {
}
const GROUPS: { title: string; subtitle: string; tools: VTool[] }[] = [
{
title: 'AI 智能',
subtitle: '本地语音识别 + AI 翻译,视频字幕一条龙',
tools: [
{
op: 'subtitle', name: 'AI 字幕生成', icon: '🎙️', color: '#7c3aed',
desc: 'Whisper 本地转录生成 SRT 字幕,可 AI 翻译成英文/日文',
tags: ['SRT', '本地识别', 'AI 翻译'],
params: [{ key: 'lang', label: '语音语言', type: 'select', def: '', options: [
{ label: '自动检测', value: '' }, { label: '中文', value: 'zh' }, { label: '英语', value: 'en' },
{ label: '日语', value: 'ja' }, { label: '粤语', value: 'yue' },
] }],
},
],
},
{
title: '格式转换',
subtitle: '在不同视频 / GIF / 音频格式之间互转',
@@ -215,6 +230,8 @@ function onDrop(e: DragEvent) {
function setFile(f: File | null) {
file.value = f;
error.value = '';
subSegs.value = [];
translated.value = '';
resultBlob.value = null;
selBox.value = null;
if (resultUrl.value) {
@@ -223,6 +240,95 @@ function setFile(f: File | null) {
}
}
// ============ AI 字幕 ============
interface SubSeg { start: number; end: number; text: string }
const subSegs = ref<SubSeg[]>([]);
const subLang = ref('');
const subSpent = ref(0);
const translating = ref(false);
const translated = ref('');
function subFmt(t: number) {
const h = Math.floor(t / 3600);
const m = Math.floor((t % 3600) / 60);
const s = Math.floor(t % 60);
const ms = Math.round((t % 1) * 1000);
return `${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')},${String(ms).padStart(3, '0')}`;
}
const subSrt = computed(() =>
subSegs.value.map((s, i) => `${i + 1}\n${subFmt(s.start)} --> ${subFmt(s.end)}\n${s.text}\n`).join('\n'),
);
function downloadText(content: string, name: string) {
const blob = new Blob([content], { type: 'text/plain;charset=utf-8' });
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = name;
a.click();
URL.revokeObjectURL(a.href);
}
async function translateSrt(target: string) {
if (!subSrt.value || translating.value) {
return;
}
translating.value = true;
error.value = '';
try {
const res = await fetch('/relay/ai/translate-srt', {
method: 'POST',
headers: { ...licenseHeaders(), 'Content-Type': 'application/json' },
body: JSON.stringify({ machine: getMachineId(), srt: subSrt.value, target }),
});
const j = await res.json().catch(() => ({}));
if (!res.ok || j.code !== 200) {
throw new Error(j.message || `HTTP ${res.status}`);
}
translated.value = j.data.reply;
genHist.add({ title: `字幕翻译→${target === 'en' ? '英文' : '日文'}`, detail: `${subSegs.value.length} 条` });
}
catch (e: any) {
error.value = String(e?.message || e);
}
finally {
translating.value = false;
}
}
async function runSubtitle(t0: number) {
busy.value = true;
error.value = '';
subSegs.value = [];
translated.value = '';
try {
const fd = new FormData();
fd.append('file', file.value!);
const res = await fetch(`/relay/subtitle?lang=${paramVals.value.lang || ''}`, {
method: 'POST',
body: fd,
headers: licenseHeaders(),
});
const j = await res.json().catch(() => ({}));
if (!res.ok || j.code !== 200) {
throw new Error(j.message || `HTTP ${res.status}`);
}
subSegs.value = j.data.segments || [];
subLang.value = `${j.data.language}(${j.data.probability})`;
subSpent.value = Math.round((Date.now() - t0) / 1000);
if (!subSegs.value.length) {
throw new Error('未识别到语音内容');
}
genHist.add({ title: `字幕转录: ${file.value!.name}`, detail: `${subSegs.value.length} 条 · ${subLang.value}` });
}
catch (e: any) {
error.value = String(e?.message || e);
}
finally {
busy.value = false;
}
}
async function process() {
if (!file.value) {
error.value = '请先选择文件';
@@ -231,6 +337,10 @@ async function process() {
busy.value = true;
error.value = '';
const t0 = Date.now();
if (currentOp.value === 'subtitle') {
await runSubtitle(t0);
return;
}
try {
const fd = new FormData();
fd.append('file', file.value);
@@ -487,6 +597,36 @@ function onSelUp(e: MouseEvent) {
{{ error }}
</div>
<!-- AI 字幕结果 -->
<div v-if="currentOp === 'subtitle' && subSegs.length" class="vt-sub">
<div class="vt-sub-bar">
<span class="vt-sub-info">✓ {{ subSegs.length }} 条字幕 · 语言 {{ subLang }} · {{ subSpent }}s</span>
<span class="vt-sub-acts">
<button class="vt-btn vt-btn-sm" @click="downloadText(subSrt, 'subtitles.srt')">⬇ SRT</button>
<button class="vt-btn vt-btn-sm vt-btn-ghost" :disabled="translating" @click="translateSrt('en')">
{{ translating ? '⏳ 翻译中…' : '🇬🇧 译英文' }}
</button>
<button class="vt-btn vt-btn-sm vt-btn-ghost" :disabled="translating" @click="translateSrt('ja')">🇯🇵 译日文</button>
</span>
</div>
<div class="vt-sub-list">
<div v-for="(s, i) in subSegs" :key="i" class="vt-sub-seg">
<span class="vt-sub-time">{{ subFmt(s.start).slice(3, 11) }}</span>
<span class="vt-sub-text">{{ s.text }}</span>
</div>
</div>
<template v-if="translated">
<div class="vt-sub-bar">
<span class="vt-sub-info">译文字幕</span>
<span class="vt-sub-acts">
<button class="vt-btn vt-btn-sm" @click="downloadText(translated, 'subtitles-translated.srt')">⬇ 译文 SRT</button>
<button class="vt-btn vt-btn-sm vt-btn-ghost" @click="navigator.clipboard.writeText(translated)">📋 复制</button>
</span>
</div>
<pre class="vt-sub-tr">{{ translated }}</pre>
</template>
</div>
<div v-if="resultUrl" class="vt-result">
<video v-if="!isImageResult" :src="resultUrl" controls class="vt-preview" />
<img v-else :src="resultUrl" class="vt-preview-img" alt="result">
@@ -506,6 +646,90 @@ function onSelUp(e: MouseEvent) {
</template>
<style lang="less" scoped>
.vt-sub {
margin-top: 10px;
border: 1px solid rgba(124, 58, 237, 0.3);
border-radius: 10px;
padding: 11px 13px;
background: rgba(124, 58, 237, 0.04);
.vt-sub-bar {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 8px;
.vt-sub-info {
font-size: 12.5px;
font-weight: 700;
color: #7c3aed;
}
.vt-sub-acts {
display: flex;
gap: 6px;
flex-wrap: wrap;
}
}
.vt-sub-list {
max-height: 260px;
overflow-y: auto;
background: rgba(255, 255, 255, 0.7);
border-radius: 8px;
padding: 7px 9px;
margin-bottom: 8px;
}
.vt-sub-seg {
display: flex;
gap: 10px;
font-size: 12.5px;
padding: 4px 2px;
border-bottom: 1px dashed rgba(128, 128, 128, 0.15);
&:last-child {
border-bottom: none;
}
.vt-sub-time {
color: #7c3aed;
font-family: monospace;
font-size: 11.5px;
flex-shrink: 0;
}
.vt-sub-text {
line-height: 1.55;
}
}
.vt-sub-tr {
margin: 0;
white-space: pre-wrap;
word-break: break-word;
font-family: inherit;
font-size: 12.5px;
line-height: 1.7;
max-height: 220px;
overflow-y: auto;
background: rgba(255, 255, 255, 0.7);
border-radius: 8px;
padding: 9px 11px;
}
}
.vt-btn-ghost {
background: transparent !important;
color: #7c3aed !important;
border: 1px solid rgba(124, 58, 237, 0.4) !important;
&:disabled {
opacity: 0.5;
}
}
.vt-root {
padding-bottom: 16px;
}