优化适配b9
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
"pageTitle": "I/O",
|
||||
"inputSection": "Eingang",
|
||||
"outputSection": "Ausgang",
|
||||
"inputOptions": ["USB-B", "USB-C", "Koaxial", "Optisch", "Bluetooth", "IIS", "RCA", "USB Driver"],
|
||||
"inputOptions": ["USB-B", "USB-C", "Koaxial", "Optisch", "Bluetooth", "IIS", "RCA", "Lokaler Eingang"],
|
||||
"outputOptions": ["XLR", "RCA", "XLR/RCA", "Kopfhörer"],
|
||||
"input": {
|
||||
"coaxial": "KOAXIAL",
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
"pageTitle": "I/O",
|
||||
"inputSection": "Input",
|
||||
"outputSection": "Output",
|
||||
"inputOptions": ["USB-B", "USB-C", "Coaxial", "Optical", "Bluetooth", "IIS", "RCA", "USB Driver"],
|
||||
"inputOptions": ["USB-B", "USB-C", "Coaxial", "Optical", "Bluetooth", "IIS", "RCA", "Local Input"],
|
||||
"outputOptions": ["XLR", "RCA", "XLR/RCA", "Headset"],
|
||||
"input": {
|
||||
"coaxial": "COAXIAL",
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
"pageTitle": "E/S",
|
||||
"inputSection": "Entrada",
|
||||
"outputSection": "Salida",
|
||||
"inputOptions": ["USB-B", "USB-C", "Coaxial", "Óptico", "Bluetooth", "IIS", "RCA", "USB Driver"],
|
||||
"inputOptions": ["USB-B", "USB-C", "Coaxial", "Óptico", "Bluetooth", "IIS", "RCA", "Entrada local"],
|
||||
"outputOptions": ["XLR", "RCA", "XLR/RCA", "Auriculares"],
|
||||
"input": {
|
||||
"coaxial": "COAXIAL",
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
"pageTitle": "E/S",
|
||||
"inputSection": "Entrée",
|
||||
"outputSection": "Sortie",
|
||||
"inputOptions": ["USB-B", "USB-C", "Coaxial", "Optique", "Bluetooth", "IIS", "RCA", "USB Driver"],
|
||||
"inputOptions": ["USB-B", "USB-C", "Coaxial", "Optique", "Bluetooth", "IIS", "RCA", "Entrée locale"],
|
||||
"outputOptions": ["XLR", "RCA", "XLR/RCA", "Casque"],
|
||||
"input": {
|
||||
"coaxial": "COAXIAL",
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
"pageTitle": "輸入/輸出",
|
||||
"inputSection": "輸入",
|
||||
"outputSection": "輸出",
|
||||
"inputOptions": ["USB-B", "USB-C", "同軸", "光纖", "藍牙", "IIS", "類比RCA", "USB隨身碟"],
|
||||
"inputOptions": ["USB-B", "USB-C", "同軸", "光纖", "藍牙", "IIS", "類比RCA", "本地輸入"],
|
||||
"outputOptions": ["XLR", "RCA", "XLR/RCA", "耳機"],
|
||||
"input": { "coaxial": "同軸", "optical": "光纖", "bluetooth": "藍牙", "rca": "類比RCA" },
|
||||
"output": { "headset": "耳機" }
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
"pageTitle": "输入输出",
|
||||
"inputSection": "输入",
|
||||
"outputSection": "输出",
|
||||
"inputOptions": ["USB-B", "USB-C", "同轴", "光纤", "蓝牙", "IIS", "模拟RCA", "U盘"],
|
||||
"inputOptions": ["USB-B", "USB-C", "同轴", "光纤", "蓝牙", "IIS", "模拟RCA", "本地输入"],
|
||||
"outputOptions": ["XLR", "RCA", "XLR/RCA", "耳机"],
|
||||
"input": { "coaxial": "同轴", "optical": "光纤", "bluetooth": "蓝牙", "rca": "模拟RCA" },
|
||||
"output": { "headset": "耳机" }
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import { useDevice } from "@/contexts/DeviceContext";
|
||||
import { cn } from "@/lib/utils";
|
||||
import BottomNav from "@/components/BottomNav";
|
||||
import { ChevronLeft } from "lucide-react";
|
||||
import { ChevronLeft, FolderInput } from "lucide-react";
|
||||
import { useLocation } from "wouter";
|
||||
import { useMemo } from "react";
|
||||
import localeZh from "@/locales/data-zh.json";
|
||||
@@ -107,16 +107,7 @@ const INPUT_OPTION_DEFS: IOOptionDef[] = [
|
||||
},
|
||||
{
|
||||
index: 7,
|
||||
icon: (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none" />
|
||||
<g fill="currentColor">
|
||||
<path d="M10 4.5h1v2h-1zm4 0h-1v2h1z" />
|
||||
<path fillRule="evenodd" d="M7 8.5v-7h10v7h2v11a3 3 0 0 1-3 3H8a3 3 0 0 1-3-3v-11zm2-5h6v5H9zm8 7H7v9a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1z" clipRule="evenodd" />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
),
|
||||
icon: <FolderInput size={28} />,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -164,7 +155,7 @@ const OUTPUT_OPTION_DEFS: IOOptionDef[] = [
|
||||
},
|
||||
];
|
||||
|
||||
const FALLBACK_INPUT_LABELS = ["USB-B", "USB-C", "同轴", "光纤", "蓝牙", "IIS", "RCA", "USB Driver"];
|
||||
const FALLBACK_INPUT_LABELS = ["USB-B", "USB-C", "同轴", "光纤", "蓝牙", "IIS", "RCA", "本地输入"];
|
||||
const FALLBACK_OUTPUT_LABELS = ["XLR", "RCA", "XLR/RCA", "耳机"];
|
||||
|
||||
function withLabels(defs: IOOptionDef[], labels: string[] | undefined, fallback: string[]): IOOption[] {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "luxsin-x9-ui",
|
||||
"name": "luxsin-b9-ui",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
|
||||
+2
-2
@@ -31,10 +31,10 @@ EOF
|
||||
# 自动识别项目名称 (x8 / x9),依据脚本所在的项目根目录名
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(basename "$(dirname "$SCRIPT_DIR")")"
|
||||
PROJECT_NAME="$(echo "$PROJECT_ROOT" | grep -oE '^(x8|x9)')"
|
||||
PROJECT_NAME="$(echo "$PROJECT_ROOT" | grep -oE '^(x8|x9|b9)')"
|
||||
|
||||
if [ -z "$PROJECT_NAME" ]; then
|
||||
echo "错误: 无法从路径 '$PROJECT_ROOT' 识别项目名称 (x8/x9)"
|
||||
echo "错误: 无法从路径 '$PROJECT_ROOT' 识别项目名称 (x8/x9/b9)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ const plugins = [
|
||||
const DEPLOY_ENV = process.env.DEPLOY_ENV || "production";
|
||||
const isProd = process.env.NODE_ENV === "production";
|
||||
const deployBase = isProd
|
||||
? (DEPLOY_ENV === "test" ? "/x9/test/modern/" : "/x9/v2/modern/")
|
||||
? (DEPLOY_ENV === "test" ? "/b9/test/modern/" : "/b9/v2/modern/")
|
||||
: "/";
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
@@ -47,7 +47,7 @@ function legacySkipModernCssPlugin(): Plugin {
|
||||
const DEPLOY_ENV = process.env.DEPLOY_ENV || "production";
|
||||
const isProd = process.env.NODE_ENV === "production";
|
||||
const deployBase = isProd
|
||||
? (DEPLOY_ENV === "test" ? "/x9/test/legacy/" : "/x9/v2/legacy/")
|
||||
? (DEPLOY_ENV === "test" ? "/b9/test/legacy/" : "/b9/v2/legacy/")
|
||||
: "/";
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
Reference in New Issue
Block a user