Restructure the repository into a pnpm workspace under packages/ (core, webui, runtime). Move source files for core and webui into packages/*, add package manifests for @snowluma/core and @snowluma/runtime, and remove the old launcher package.json. Update root package.json to be a monorepo controller (scripts delegate to pnpm filters, set packageManager and Node engine). Configure build outputs to emit into the repo-root dist/ (vite config changes) so the existing release pipeline continues to work. Add .npmrc with mirrors, expand .gitignore for monorepo layout, add tsconfig base and package-level tsconfigs, and add vitest config for the core package. Adjust injector native search paths and update tests import paths to the new package layout. Small CI/workflow comment added to clarify build behavior and README updated with monorepo structure and common commands.
470 lines
7.6 KiB
CSS
470 lines
7.6 KiB
CSS
.layout {
|
|
display: flex;
|
|
height: 100vh;
|
|
width: 100%;
|
|
}
|
|
|
|
.sidebar {
|
|
width: 240px;
|
|
background: var(--bg-sidebar);
|
|
border-right: 1px solid var(--border-subtle);
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 24px 0 0 0;
|
|
transition: background-color 0.3s;
|
|
}
|
|
|
|
.brand {
|
|
padding: 0 24px;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.brand h1 {
|
|
font-size: 1.3rem;
|
|
font-weight: 600;
|
|
color: var(--text-main);
|
|
background: linear-gradient(90deg, var(--color-primary), #818cf8);
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
display: inline-block;
|
|
}
|
|
|
|
.nav-menu {
|
|
flex: 1;
|
|
padding: 0 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.nav-item {
|
|
padding: 10px 16px;
|
|
border-radius: var(--radius-md);
|
|
cursor: pointer;
|
|
color: var(--text-muted);
|
|
font-size: 0.9rem;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.nav-item:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.nav-item.active {
|
|
background: var(--color-primary);
|
|
color: #fff;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.sidebar-footer {
|
|
padding: 16px;
|
|
border-top: 1px solid var(--border-subtle);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 8px 16px;
|
|
border-radius: var(--radius-md);
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
border: 1px solid transparent;
|
|
transition: all 0.2s;
|
|
outline: none;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--color-primary);
|
|
color: #fff;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--color-primary-hover);
|
|
}
|
|
|
|
.btn-ghost {
|
|
background: transparent;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.btn-ghost:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.btn-outline {
|
|
background: transparent;
|
|
border-color: var(--border-subtle);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.btn-outline:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.btn-danger {
|
|
background: transparent;
|
|
border-color: var(--border-subtle);
|
|
color: var(--color-danger);
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background: var(--color-danger);
|
|
border-color: var(--color-danger);
|
|
color: #fff;
|
|
}
|
|
|
|
.btn-icon {
|
|
padding: 4px;
|
|
width: 28px;
|
|
height: 28px;
|
|
}
|
|
|
|
.content {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
background: var(--bg-body);
|
|
}
|
|
|
|
.header {
|
|
height: 60px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 32px;
|
|
background: var(--bg-card);
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
}
|
|
|
|
.search-input {
|
|
background: var(--bg-input);
|
|
border: 1px solid var(--border-subtle);
|
|
padding: 8px 14px;
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-main);
|
|
width: 260px;
|
|
font-size: 0.85rem;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.search-input:focus {
|
|
border-color: var(--color-primary);
|
|
}
|
|
|
|
.header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--text-muted);
|
|
}
|
|
.status-dot.on { background: #10b981; }
|
|
.status-dot.off { background: var(--color-danger); }
|
|
|
|
.main-scroll {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 32px;
|
|
}
|
|
|
|
.card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-subtle);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-sm);
|
|
padding: 24px;
|
|
}
|
|
|
|
.overview-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
|
gap: 20px;
|
|
}
|
|
|
|
.overview-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.card-label {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.card-value {
|
|
font-size: 2rem;
|
|
font-weight: 600;
|
|
color: var(--text-main);
|
|
}
|
|
.status-ok {
|
|
color: #10b981;
|
|
}
|
|
|
|
/* Config Layout */
|
|
.config-layout {
|
|
display: flex;
|
|
gap: 24px;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.list-pane {
|
|
width: 280px;
|
|
padding: 16px;
|
|
}
|
|
|
|
.pane-title {
|
|
font-size: 0.95rem;
|
|
color: var(--text-main);
|
|
margin-bottom: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.qq-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.qq-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 10px;
|
|
border-radius: var(--radius-md);
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.qq-item:hover {
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.qq-item.active {
|
|
background: var(--bg-hover);
|
|
border-color: var(--border-active);
|
|
}
|
|
|
|
.qq-avatar {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, var(--color-primary), #818cf8);
|
|
}
|
|
|
|
.qq-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.qq-nik {
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.qq-uin {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.editor-pane {
|
|
flex: 1;
|
|
min-height: 500px;
|
|
padding: 32px;
|
|
}
|
|
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
color: var(--text-muted);
|
|
font-size: 0.9rem;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.empty-icon {
|
|
font-size: 2rem;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.editor-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 32px;
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
padding-bottom: 16px;
|
|
}
|
|
|
|
.editor-title h2 {
|
|
font-size: 1.25rem;
|
|
color: var(--text-main);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.editor-subtitle {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
font-family: monospace;
|
|
}
|
|
|
|
.editor-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.save-status {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
}
|
|
.save-status.ok { color: #10b981; }
|
|
|
|
.cfg-section {
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.cfg-section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.cfg-section-header h4 {
|
|
font-size: 1rem;
|
|
color: var(--text-main);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.cfg-section-body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
.endpoint-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
background: var(--bg-input);
|
|
border: 1px solid var(--border-subtle);
|
|
padding: 16px;
|
|
border-radius: var(--radius-md);
|
|
}
|
|
|
|
.input-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
flex: 1;
|
|
}
|
|
|
|
.input-group label {
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.input-group input {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-subtle);
|
|
padding: 8px 12px;
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-main);
|
|
font-family: monospace;
|
|
font-size: 0.85rem;
|
|
transition: border-color 0.2s;
|
|
outline: none;
|
|
}
|
|
|
|
.input-group input:focus {
|
|
border-color: var(--border-focus);
|
|
}
|
|
|
|
.endpoint-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-top: 24px;
|
|
}
|
|
|
|
.text-muted {
|
|
color: var(--text-muted);
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
/* Login Screen Override */
|
|
.login-screen {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 1000;
|
|
background: var(--bg-body);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.login-card {
|
|
width: 380px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 40px;
|
|
}
|
|
|
|
.login-title {
|
|
font-size: 1.5rem;
|
|
color: var(--text-main);
|
|
margin-bottom: 12px;
|
|
background: linear-gradient(90deg, var(--color-primary), #818cf8);
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
.login-desc {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
text-align: center;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.login-form {
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
}
|
|
|
|
.login-submit-btn {
|
|
width: 100%;
|
|
padding: 10px;
|
|
}
|
|
|
|
.login-error {
|
|
color: var(--color-danger);
|
|
font-size: 0.8rem;
|
|
text-align: center;
|
|
}
|