This commit is contained in:
Baobhan Sith
2025-04-23 00:21:15 +08:00
parent cfa0881b34
commit ab313f2cd7
5 changed files with 468 additions and 187 deletions
+425 -159
View File
File diff suppressed because it is too large Load Diff
+28 -25
View File
@@ -2,34 +2,37 @@
"name": "@nexus-terminal/frontend", "name": "@nexus-terminal/frontend",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vue-tsc --noEmit && vite build", "build": "vue-tsc --noEmit && vite build",
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^6.7.2", "@fortawesome/fontawesome-free": "^6.7.2",
"@simplewebauthn/browser": "^13.1.0", "@simplewebauthn/browser": "^13.1.0",
"@xterm/addon-search": "^0.15.0", "@tailwindcss/vite": "^4.1.4",
"axios": "^1.8.4", "@xterm/addon-search": "^0.15.0",
"monaco-editor": "^0.52.2", "axios": "^1.8.4",
"pinia": "^3.0.2", "monaco-editor": "^0.52.2",
"pinia-plugin-persistedstate": "^4.2.0", "pinia": "^3.0.2",
"splitpanes": "^4.0.3", "pinia-plugin-persistedstate": "^4.2.0",
"vite-plugin-monaco-editor": "^1.1.0", "splitpanes": "^4.0.3",
"vue": "^3.3.0", "tailwindcss": "^4.1.4",
"vue-i18n": "^9.14.4", "vite-plugin-monaco-editor": "^1.1.0",
"vue-router": "^4.5.0", "vue": "^3.3.0",
"vuedraggable": "^4.1.0", "vue-i18n": "^9.14.4",
"xterm": "^5.3.0", "vue-router": "^4.5.0",
"xterm-addon-fit": "^0.8.0", "vuedraggable": "^4.1.0",
"xterm-addon-web-links": "^0.9.0" "xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0",
"xterm-addon-web-links": "^0.9.0"
}, },
"devDependencies": { "devDependencies": {
"@types/splitpanes": "^2.2.6", "@types/splitpanes": "^2.2.6",
"@vitejs/plugin-vue": "^4.2.0", "@vitejs/plugin-vue": "^4.2.0",
"typescript": "^5.0.0", "typescript": "^5.0.0",
"vite": "^4.4.0", "vite": "^5.2.0",
"vue-tsc": "^2.2.8" "vue-tsc": "^2.2.8"
} }
} }
+11
View File
@@ -242,6 +242,17 @@ const isElementVisibleAndFocusable = (element: HTMLElement): boolean => {
</script> </script>
<template> <template>
<div class="bg-gray-100 flex items-center justify-center min-h-screen">
<div class="bg-white rounded-lg shadow-lg p-8 max-w-sm w-full">
<h2 class="text-2xl font-bold mb-4 text-gray-800">欢迎使用 Tailwind CSS (Vite + Vue)</h2>
<p class="text-gray-600 mb-6">这是一个使用 Tailwind CSS 构建的简单卡片示例</p>
<div class="flex justify-end">
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
了解更多
</button>
</div>
</div>
</div>
<div id="app-container"> <div id="app-container">
<!-- *** 修改 v-if 条件以使用 isHeaderVisible *** --> <!-- *** 修改 v-if 条件以使用 isHeaderVisible *** -->
<header v-if="!isWorkspaceRoute || isHeaderVisible"> <header v-if="!isWorkspaceRoute || isHeaderVisible">
+1 -1
View File
@@ -1,4 +1,4 @@
@import "tailwindcss";
/* 全局样式和 CSS 变量定义 */ /* 全局样式和 CSS 变量定义 */
:root { :root {
/* 基础颜色 */ /* 基础颜色 */
+3 -2
View File
@@ -1,13 +1,14 @@
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue'; import vue from '@vitejs/plugin-vue';
import monacoEditorPlugin from 'vite-plugin-monaco-editor'; import monacoEditorPlugin from 'vite-plugin-monaco-editor';
import tailwindcss from '@tailwindcss/vite'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
vue(), vue(),
tailwindcss(),
// @ts-ignore because the plugin type might not perfectly match Vite's expected PluginOption type // @ts-ignore because the plugin type might not perfectly match Vite's expected PluginOption type
monacoEditorPlugin({}) (monacoEditorPlugin as any).default({})
], ],
server: { server: {
proxy: { proxy: {