mirror of
https://github.com/fatedier/frp.git
synced 2026-03-20 16:59:18 +08:00
web/frpc: redesign frpc dashboard with sidebar nav, proxy/visitor list and detail views (#5237)
This commit is contained in:
33
web/frpc/src/assets/css/_form-layout.scss
Normal file
33
web/frpc/src/assets/css/_form-layout.scss
Normal file
@@ -0,0 +1,33 @@
|
||||
@use './mixins' as *;
|
||||
|
||||
/* Shared form layout styles for proxy/visitor form sections */
|
||||
.field-row {
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.field-row.two-col {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
.field-row.three-col {
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
}
|
||||
|
||||
.field-grow {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.switch-field :deep(.el-form-item__content) {
|
||||
min-height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@include mobile {
|
||||
.field-row.two-col,
|
||||
.field-row.three-col {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
2
web/frpc/src/assets/css/_index.scss
Normal file
2
web/frpc/src/assets/css/_index.scss
Normal file
@@ -0,0 +1,2 @@
|
||||
@forward './variables';
|
||||
@forward './mixins';
|
||||
49
web/frpc/src/assets/css/_mixins.scss
Normal file
49
web/frpc/src/assets/css/_mixins.scss
Normal file
@@ -0,0 +1,49 @@
|
||||
@use './variables' as vars;
|
||||
|
||||
@mixin mobile {
|
||||
@media (max-width: #{vars.$breakpoint-mobile - 1px}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin flex-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@mixin flex-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@mixin page-scroll {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: vars.$spacing-xl 40px;
|
||||
|
||||
> * {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@include mobile {
|
||||
padding: vars.$spacing-xl;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin custom-scrollbar {
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #d1d1d1;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
61
web/frpc/src/assets/css/_variables.scss
Normal file
61
web/frpc/src/assets/css/_variables.scss
Normal file
@@ -0,0 +1,61 @@
|
||||
// Typography
|
||||
$font-size-xs: 11px;
|
||||
$font-size-sm: 13px;
|
||||
$font-size-md: 14px;
|
||||
$font-size-lg: 15px;
|
||||
$font-size-xl: 18px;
|
||||
|
||||
$font-weight-normal: 400;
|
||||
$font-weight-medium: 500;
|
||||
$font-weight-semibold: 600;
|
||||
|
||||
// Colors - Text
|
||||
$color-text-primary: var(--color-text-primary);
|
||||
$color-text-secondary: var(--color-text-secondary);
|
||||
$color-text-muted: var(--color-text-muted);
|
||||
$color-text-light: var(--color-text-light);
|
||||
|
||||
// Colors - Background
|
||||
$color-bg-primary: var(--color-bg-primary);
|
||||
$color-bg-secondary: var(--color-bg-secondary);
|
||||
$color-bg-tertiary: var(--color-bg-tertiary);
|
||||
$color-bg-muted: var(--color-bg-muted);
|
||||
$color-bg-hover: var(--color-bg-hover);
|
||||
$color-bg-active: var(--color-bg-active);
|
||||
|
||||
// Colors - Border
|
||||
$color-border: var(--color-border);
|
||||
$color-border-light: var(--color-border-light);
|
||||
$color-border-lighter: var(--color-border-lighter);
|
||||
|
||||
// Colors - Status
|
||||
$color-primary: var(--color-primary);
|
||||
$color-danger: var(--color-danger);
|
||||
$color-danger-dark: var(--color-danger-dark);
|
||||
$color-danger-light: var(--color-danger-light);
|
||||
|
||||
// Colors - Button
|
||||
$color-btn-primary: var(--color-btn-primary);
|
||||
$color-btn-primary-hover: var(--color-btn-primary-hover);
|
||||
|
||||
// Spacing
|
||||
$spacing-xs: 4px;
|
||||
$spacing-sm: 8px;
|
||||
$spacing-md: 12px;
|
||||
$spacing-lg: 16px;
|
||||
$spacing-xl: 20px;
|
||||
|
||||
// Border Radius
|
||||
$radius-sm: 6px;
|
||||
$radius-md: 8px;
|
||||
|
||||
// Transitions
|
||||
$transition-fast: 0.15s ease;
|
||||
$transition-medium: 0.2s ease;
|
||||
|
||||
// Layout
|
||||
$header-height: 50px;
|
||||
$sidebar-width: 200px;
|
||||
|
||||
// Breakpoints
|
||||
$breakpoint-mobile: 768px;
|
||||
@@ -1,105 +0,0 @@
|
||||
/* Modern Base Styles */
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Smooth transitions for Element Plus components */
|
||||
.el-button,
|
||||
.el-card,
|
||||
.el-input,
|
||||
.el-select,
|
||||
.el-tag {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
/* Card hover effects */
|
||||
.el-card:hover {
|
||||
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
/* Better scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #c1c1c1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #a8a8a8;
|
||||
}
|
||||
|
||||
/* Better form layouts */
|
||||
.el-form-item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.el-row {
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
padding-left: 10px !important;
|
||||
padding-right: 10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Input enhancements */
|
||||
.el-input__wrapper {
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.el-input__wrapper:hover {
|
||||
box-shadow: 0 0 0 1px var(--el-border-color-hover) inset;
|
||||
}
|
||||
|
||||
/* Button enhancements */
|
||||
.el-button {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Tag enhancements */
|
||||
.el-tag {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Card enhancements */
|
||||
.el-card__header {
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid var(--el-border-color-lighter);
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
/* Table enhancements */
|
||||
.el-table {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.el-table th {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Empty state */
|
||||
.el-empty__description {
|
||||
margin-top: 16px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Loading state */
|
||||
.el-loading-mask {
|
||||
border-radius: 12px;
|
||||
}
|
||||
@@ -1,48 +1,51 @@
|
||||
/* Dark Mode Theme */
|
||||
/* Dark mode styles */
|
||||
html.dark {
|
||||
--el-bg-color: #1e1e2e;
|
||||
--el-bg-color-page: #1a1a2e;
|
||||
--el-bg-color-overlay: #27293d;
|
||||
--el-fill-color-blank: #1e1e2e;
|
||||
background-color: #1a1a2e;
|
||||
--el-bg-color: #212121;
|
||||
--el-bg-color-page: #181818;
|
||||
--el-bg-color-overlay: #303030;
|
||||
--el-fill-color-blank: #212121;
|
||||
--el-border-color: #404040;
|
||||
--el-border-color-light: #353535;
|
||||
--el-border-color-lighter: #2a2a2a;
|
||||
--el-text-color-primary: #e5e7eb;
|
||||
--el-text-color-secondary: #888888;
|
||||
--el-text-color-placeholder: #afafaf;
|
||||
background-color: #212121;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
html.dark body {
|
||||
background-color: #1a1a2e;
|
||||
color: #e5e7eb;
|
||||
/* Scrollbar */
|
||||
html.dark ::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
/* Dark mode scrollbar */
|
||||
html.dark ::-webkit-scrollbar-track {
|
||||
background: #27293d;
|
||||
background: #303030;
|
||||
}
|
||||
|
||||
html.dark ::-webkit-scrollbar-thumb {
|
||||
background: #3a3d5c;
|
||||
background: #404040;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
html.dark ::-webkit-scrollbar-thumb:hover {
|
||||
background: #4a4d6c;
|
||||
background: #505050;
|
||||
}
|
||||
|
||||
/* Dark mode cards */
|
||||
html.dark .el-card {
|
||||
background-color: #27293d;
|
||||
border-color: #3a3d5c;
|
||||
/* Form */
|
||||
html.dark .el-form-item__label {
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
html.dark .el-card__header {
|
||||
border-bottom-color: #3a3d5c;
|
||||
}
|
||||
|
||||
/* Dark mode inputs */
|
||||
/* Input */
|
||||
html.dark .el-input__wrapper {
|
||||
background-color: #27293d;
|
||||
box-shadow: 0 0 0 1px #3a3d5c inset;
|
||||
background: var(--color-bg-input);
|
||||
box-shadow: 0 0 0 1px #404040 inset;
|
||||
}
|
||||
|
||||
html.dark .el-input__wrapper:hover {
|
||||
box-shadow: 0 0 0 1px #4a4d6c inset;
|
||||
box-shadow: 0 0 0 1px #505050 inset;
|
||||
}
|
||||
|
||||
html.dark .el-input__wrapper.is-focus {
|
||||
@@ -54,71 +57,44 @@ html.dark .el-input__inner {
|
||||
}
|
||||
|
||||
html.dark .el-input__inner::placeholder {
|
||||
color: #6b7280;
|
||||
color: #afafaf;
|
||||
}
|
||||
|
||||
/* Dark mode textarea */
|
||||
html.dark .el-textarea__inner {
|
||||
background-color: #1e1e2d;
|
||||
border-color: #3a3d5c;
|
||||
background: var(--color-bg-input);
|
||||
box-shadow: 0 0 0 1px #404040 inset;
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
html.dark .el-textarea__inner::placeholder {
|
||||
color: #6b7280;
|
||||
html.dark .el-textarea__inner:hover {
|
||||
box-shadow: 0 0 0 1px #505050 inset;
|
||||
}
|
||||
|
||||
/* Dark mode table */
|
||||
html.dark .el-table {
|
||||
background-color: #27293d;
|
||||
html.dark .el-textarea__inner:focus {
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary) inset;
|
||||
}
|
||||
|
||||
/* Select */
|
||||
html.dark .el-select__wrapper {
|
||||
background: var(--color-bg-input);
|
||||
box-shadow: 0 0 0 1px #404040 inset;
|
||||
}
|
||||
|
||||
html.dark .el-select__wrapper:hover {
|
||||
box-shadow: 0 0 0 1px #505050 inset;
|
||||
}
|
||||
|
||||
html.dark .el-select__selected-item {
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
html.dark .el-table th.el-table__cell {
|
||||
background-color: #1e1e2e;
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
html.dark .el-table tr {
|
||||
background-color: #27293d;
|
||||
}
|
||||
|
||||
html.dark .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
|
||||
background-color: #1e1e2e;
|
||||
}
|
||||
|
||||
html.dark .el-table__row:hover > td.el-table__cell {
|
||||
background-color: #2a2a3c !important;
|
||||
}
|
||||
|
||||
/* Dark mode tags */
|
||||
html.dark .el-tag--info {
|
||||
background-color: #3a3d5c;
|
||||
border-color: #3a3d5c;
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
/* Dark mode buttons */
|
||||
html.dark .el-button--default {
|
||||
background-color: #27293d;
|
||||
border-color: #3a3d5c;
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
html.dark .el-button--default:hover {
|
||||
background-color: #2a2a3c;
|
||||
border-color: #4a4d6c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Dark mode select */
|
||||
html.dark .el-select .el-input__wrapper {
|
||||
background-color: #27293d;
|
||||
html.dark .el-select__placeholder {
|
||||
color: #afafaf;
|
||||
}
|
||||
|
||||
html.dark .el-select-dropdown {
|
||||
background-color: #27293d;
|
||||
border-color: #3a3d5c;
|
||||
background: #303030;
|
||||
border-color: #404040;
|
||||
}
|
||||
|
||||
html.dark .el-select-dropdown__item {
|
||||
@@ -126,55 +102,92 @@ html.dark .el-select-dropdown__item {
|
||||
}
|
||||
|
||||
html.dark .el-select-dropdown__item:hover {
|
||||
background-color: #2a2a3c;
|
||||
background: #3a3a3a;
|
||||
}
|
||||
|
||||
/* Dark mode dialog */
|
||||
html.dark .el-select-dropdown__item.is-selected {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
html.dark .el-select-dropdown__item.is-disabled {
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
/* Tag */
|
||||
html.dark .el-tag--info {
|
||||
background: #303030;
|
||||
border-color: #404040;
|
||||
color: #b0b0b0;
|
||||
}
|
||||
|
||||
/* Button */
|
||||
html.dark .el-button--default {
|
||||
background: #303030;
|
||||
border-color: #404040;
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
html.dark .el-button--default:hover {
|
||||
background: #3a3a3a;
|
||||
border-color: #505050;
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
/* Card */
|
||||
html.dark .el-card {
|
||||
background: #212121;
|
||||
border-color: #353535;
|
||||
color: #b0b0b0;
|
||||
}
|
||||
|
||||
html.dark .el-card__header {
|
||||
border-bottom-color: #353535;
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
/* Dialog */
|
||||
html.dark .el-dialog {
|
||||
background-color: #27293d;
|
||||
}
|
||||
|
||||
html.dark .el-dialog__header {
|
||||
border-bottom-color: #3a3d5c;
|
||||
background: #212121;
|
||||
}
|
||||
|
||||
html.dark .el-dialog__title {
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
html.dark .el-dialog__body {
|
||||
color: #e5e7eb;
|
||||
/* Message */
|
||||
html.dark .el-message {
|
||||
background: #303030;
|
||||
border-color: #404040;
|
||||
}
|
||||
|
||||
/* Dark mode message box */
|
||||
html.dark .el-message-box {
|
||||
background-color: #27293d;
|
||||
border-color: #3a3d5c;
|
||||
html.dark .el-message--success {
|
||||
background: #1e3d2e;
|
||||
border-color: #3d6b4f;
|
||||
}
|
||||
|
||||
html.dark .el-message-box__title {
|
||||
color: #e5e7eb;
|
||||
html.dark .el-message--warning {
|
||||
background: #3d3020;
|
||||
border-color: #6b5020;
|
||||
}
|
||||
|
||||
html.dark .el-message-box__message {
|
||||
color: #e5e7eb;
|
||||
html.dark .el-message--error {
|
||||
background: #3d2027;
|
||||
border-color: #5c2d2d;
|
||||
}
|
||||
|
||||
/* Dark mode empty */
|
||||
html.dark .el-empty__description {
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
/* Dark mode loading */
|
||||
/* Loading */
|
||||
html.dark .el-loading-mask {
|
||||
background-color: rgba(30, 30, 46, 0.9);
|
||||
background-color: rgba(33, 33, 33, 0.9);
|
||||
}
|
||||
|
||||
html.dark .el-loading-text {
|
||||
color: #e5e7eb;
|
||||
/* Overlay */
|
||||
html.dark .el-overlay {
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
/* Dark mode tooltip */
|
||||
html.dark .el-tooltip__trigger {
|
||||
color: #e5e7eb;
|
||||
/* Tooltip */
|
||||
html.dark .el-tooltip__popper {
|
||||
background: #303030 !important;
|
||||
border-color: #404040 !important;
|
||||
color: #e5e7eb !important;
|
||||
}
|
||||
|
||||
117
web/frpc/src/assets/css/var.css
Normal file
117
web/frpc/src/assets/css/var.css
Normal file
@@ -0,0 +1,117 @@
|
||||
:root {
|
||||
/* Text colors */
|
||||
--color-text-primary: #303133;
|
||||
--color-text-secondary: #606266;
|
||||
--color-text-muted: #909399;
|
||||
--color-text-light: #c0c4cc;
|
||||
--color-text-placeholder: #a8abb2;
|
||||
|
||||
/* Background colors */
|
||||
--color-bg-primary: #ffffff;
|
||||
--color-bg-secondary: #f9f9f9;
|
||||
--color-bg-tertiary: #fafafa;
|
||||
--color-bg-surface: #ffffff;
|
||||
--color-bg-muted: #f4f4f5;
|
||||
--color-bg-input: #ffffff;
|
||||
--color-bg-hover: #efefef;
|
||||
--color-bg-active: #eaeaea;
|
||||
|
||||
/* Border colors */
|
||||
--color-border: #dcdfe6;
|
||||
--color-border-light: #e4e7ed;
|
||||
--color-border-lighter: #ebeef5;
|
||||
--color-border-extra-light: #f2f6fc;
|
||||
|
||||
/* Status colors */
|
||||
--color-primary: #409eff;
|
||||
--color-primary-light: #ecf5ff;
|
||||
--color-success: #67c23a;
|
||||
--color-warning: #e6a23c;
|
||||
--color-danger: #f56c6c;
|
||||
--color-danger-dark: #c45656;
|
||||
--color-danger-light: #fef0f0;
|
||||
--color-info: #909399;
|
||||
|
||||
/* Button colors */
|
||||
--color-btn-primary: #303133;
|
||||
--color-btn-primary-hover: #4a4d5c;
|
||||
|
||||
/* Element Plus mapping */
|
||||
--el-color-primary: var(--color-primary);
|
||||
--el-color-success: var(--color-success);
|
||||
--el-color-warning: var(--color-warning);
|
||||
--el-color-danger: var(--color-danger);
|
||||
--el-color-info: var(--color-info);
|
||||
|
||||
--el-text-color-primary: var(--color-text-primary);
|
||||
--el-text-color-regular: var(--color-text-secondary);
|
||||
--el-text-color-secondary: var(--color-text-muted);
|
||||
--el-text-color-placeholder: var(--color-text-placeholder);
|
||||
|
||||
--el-bg-color: var(--color-bg-primary);
|
||||
--el-bg-color-page: var(--color-bg-secondary);
|
||||
--el-bg-color-overlay: var(--color-bg-primary);
|
||||
|
||||
--el-border-color: var(--color-border);
|
||||
--el-border-color-light: var(--color-border-light);
|
||||
--el-border-color-lighter: var(--color-border-lighter);
|
||||
--el-border-color-extra-light: var(--color-border-extra-light);
|
||||
|
||||
--el-fill-color-blank: var(--color-bg-primary);
|
||||
--el-fill-color-light: var(--color-bg-tertiary);
|
||||
--el-fill-color: var(--color-bg-tertiary);
|
||||
--el-fill-color-dark: var(--color-bg-hover);
|
||||
--el-fill-color-darker: var(--color-bg-active);
|
||||
|
||||
/* Input */
|
||||
--el-input-bg-color: var(--color-bg-input);
|
||||
--el-input-border-color: var(--color-border);
|
||||
--el-input-hover-border-color: var(--color-border-light);
|
||||
|
||||
/* Dialog */
|
||||
--el-dialog-bg-color: var(--color-bg-primary);
|
||||
--el-overlay-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
html.dark {
|
||||
/* Text colors */
|
||||
--color-text-primary: #e5e7eb;
|
||||
--color-text-secondary: #b0b0b0;
|
||||
--color-text-muted: #888888;
|
||||
--color-text-light: #666666;
|
||||
--color-text-placeholder: #afafaf;
|
||||
|
||||
/* Background colors */
|
||||
--color-bg-primary: #212121;
|
||||
--color-bg-secondary: #181818;
|
||||
--color-bg-tertiary: #303030;
|
||||
--color-bg-surface: #303030;
|
||||
--color-bg-muted: #303030;
|
||||
--color-bg-input: #2f2f2f;
|
||||
--color-bg-hover: #3a3a3a;
|
||||
--color-bg-active: #454545;
|
||||
|
||||
/* Border colors */
|
||||
--color-border: #404040;
|
||||
--color-border-light: #353535;
|
||||
--color-border-lighter: #2a2a2a;
|
||||
--color-border-extra-light: #222222;
|
||||
|
||||
/* Status colors */
|
||||
--color-primary: #409eff;
|
||||
--color-danger: #f87171;
|
||||
--color-danger-dark: #f87171;
|
||||
--color-danger-light: #3d2027;
|
||||
--color-info: #888888;
|
||||
|
||||
/* Button colors */
|
||||
--color-btn-primary: #404040;
|
||||
--color-btn-primary-hover: #505050;
|
||||
|
||||
/* Dark overrides */
|
||||
--el-text-color-regular: var(--color-text-primary);
|
||||
--el-overlay-color: rgba(0, 0, 0, 0.7);
|
||||
|
||||
background-color: #181818;
|
||||
color-scheme: dark;
|
||||
}
|
||||
Reference in New Issue
Block a user