diff --git a/src/renderer/src/hooks/useElectronEvents.ts b/src/renderer/src/hooks/useElectronEvents.ts new file mode 100644 index 0000000..4ff1302 --- /dev/null +++ b/src/renderer/src/hooks/useElectronEvents.ts @@ -0,0 +1,18 @@ +// 最小化 +export const clientMinimizeWeb = () => { + electron.ipcRenderer.invoke('renderer-to-main', { + name: 'min-win' + }) +} +// 最大化 +export const clientMaximizeWeb = () => { + electron.ipcRenderer.invoke('renderer-to-main', { + name: 'max-win' + }) +} +// 关闭 +export const clientCloseWeb = () => { + electron.ipcRenderer.invoke('renderer-to-main', { + name: 'win-close' + }) +} \ No newline at end of file diff --git a/src/renderer/src/styles/element-plus.scss b/src/renderer/src/styles/element-plus.scss index 3aed81c..5de605c 100644 --- a/src/renderer/src/styles/element-plus.scss +++ b/src/renderer/src/styles/element-plus.scss @@ -1,11 +1,119 @@ @import url('element-plus/dist/index.css'); @import url('element-plus/theme-chalk/dark/css-vars.css'); // 暗黑主题 + +body { + // color: #fff; +} // 重置主题色变量 :root { --el-color-primary: #154ddd; // 主色调 + // --el-fill-color-blank: transparent; // 背景色 +} +/* button */ +.el-button--default { + --el-button-text-color: #fff; + --el-fill-color-blank: transparent; // 背景色 +} +.el-button--default:hover { + --el-button-hover-bg-color: transparent; // 按钮悬浮背景色 + --el-button-hover-border-color: var(--el-color-primary); // 按钮悬浮边框颜色 + --el-button-hover-text-color: var(--el-color-primary); +} + +.el-button--primary:hover { + --el-button-hover-bg-color: var(--el-color-primary); // 按钮悬浮背景色 + --el-button-hover-border-color: var(--el-color-primary); // 按钮悬浮边框颜色 + --el-button-hover-text-color: var(--el-color-primary); +} +.el-button--info { + --el-button-bg-color: var(--el-color-info); + // --el-button-border-color: var(--el-color-info); + // --el-button-outline-color: var(--el-color-info-light-5); + // --el-button-active-color: var(--el-color-info-dark-2); + // --el-button-hover-text-color: var(--el-color-white); + // --el-button-hover-link-text-color: var(--el-color-info-light-5); + // --el-button-hover-bg-color: var(--el-color-info-light-3); + // --el-button-hover-border-color: var(--el-color-info-light-3); + // --el-button-active-bg-color: var(--el-color-info-dark-2); + // --el-button-active-border-color: var(--el-color-info-dark-2); + // --el-button-disabled-text-color: var(--el-color-white); + // --el-button-disabled-bg-color: var(--el-color-info-light-5); + // --el-button-disabled-border-color: var(--el-color-info-light-5); +} +.el-button--info:hover { +} + +.el-button, +.el-button.is-round { + padding-left: 26px; + padding-right: 26px; +} +.el-button + .el-button { + margin-left: 8px; +} + +// .el-button:hover { +// background-color: var(--el-button-hover-bg-color); +// border-color: var(--el-button-hover-border-color); +// color: var(--el-button-hover-text-color); +// outline: none; +// } + +/* form */ +.el-form-item__label { + --el-text-color-regular: #fff; // 表单字体颜色 +} +.el-form-item__content{ + color: #fff; +} +.el-input { + --el-input-text-color: #fff; // 字体颜色 + --el-input-bg-color: transparent; // 背景颜色 +} + +// .el-input__wrapper { +// align-items: center; +// background-color: var(--el-input-bg-color, var(--el-fill-color-blank)); +// background-image: none; +// border-radius: var(--el-input-border-radius, var(--el-border-radius-base)); +// box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset; +// cursor: text; +// display: inline-flex +// ; +// flex-grow: 1; +// justify-content: center; +// padding: 1px 11px; +// transform: translateZ(0); +// transition: var(--el-transition-box-shadow); +// } + +.el-form-item--default { + margin-bottom: 12px; +} +.el-form-item--default .el-form-item__content { + line-height: 22px; +} +.el-switch { + height: 20px; } /* 弹框 */ +.el-dialog { + --el-dialog-padding-primary: 0; // 弹窗内边距 +} +.el-dialog__footer { + --el-dialog-padding-primary: 0; // 弹窗内边距 +} +.el-dialog__headerbtn { + width: 68px; + height: 54px; + .el-dialog__close { + font-size: 20px; + } +} +.el-dialog__header { + height: 54px; +} .design-dialog { padding: 0 !important; overflow: hidden; diff --git a/src/renderer/src/views/Design/Settings/permission.vue b/src/renderer/src/views/Design/Settings/permission.vue new file mode 100644 index 0000000..61af8f2 --- /dev/null +++ b/src/renderer/src/views/Design/Settings/permission.vue @@ -0,0 +1,262 @@ + + + + diff --git a/src/renderer/src/views/Design/Settings/scheme.vue b/src/renderer/src/views/Design/Settings/scheme.vue new file mode 100644 index 0000000..38f3f8d --- /dev/null +++ b/src/renderer/src/views/Design/Settings/scheme.vue @@ -0,0 +1,5 @@ + diff --git a/src/renderer/src/views/Design/Settings/settingList.scss b/src/renderer/src/views/Design/Settings/settingList.scss index 4bb95f1..021cb99 100644 --- a/src/renderer/src/views/Design/Settings/settingList.scss +++ b/src/renderer/src/views/Design/Settings/settingList.scss @@ -1,58 +1,53 @@ .settings-dialog { /* Your dialog styles */ - - background-color: #363940 !important; - height: 736px; + // background-color: #363940 !important; + + background-color: #2d3a4b; .settings-container { - display: flex; - height: 400px; /* Adjust as needed */ -} - -.settings-sidebar { - width: 200px; - background-color: #2d3a4b; /* Dark background */ - color: #fff; - padding: 20px; -} - -.sidebar-item { - padding: 10px; - cursor: pointer; - display: flex; - align-items: center; - margin-bottom: 5px; -} - -.sidebar-item:hover, -.sidebar-item.active { - background-color: #3c4b64; -} - -.sidebar-item .el-icon { - margin-right: 5px; -} - -.settings-content { - flex: 1; - padding: 20px; - color: #fff; -} - -.section { - margin-bottom: 12px; -} - -.section-title { - font-weight: bold; - margin-bottom: 8px; -} - -.button-group { - display: flex; -} - -.button-group .el-button { - margin-right: 10px; + display: flex; + min-height: 632px; + } + + .settings-sidebar { + width: 120px; + padding: 24px; + } + .settings-line { + position: absolute; + left: 120px; + width: 1px; + height: 100vh; + background-color: #fff; + opacity: 0.3; + } + .sidebar-item { + cursor: pointer; + display: flex; + align-items: center; + margin-bottom: 16px; + opacity: 0.3; + &.active { + opacity: 1; + } + } + + // .sidebar-item:hover, + // .sidebar-item.active { + // background-color: #3c4b64; + // } + + .settings-content { + flex: 1; + padding: 24px 24px 12px; + } + + .section { + margin-bottom: 12px; + } + + .section-title { + font-weight: bold; + margin-bottom: 8px; + } } -} \ No newline at end of file diff --git a/src/renderer/src/views/Design/Settings/settingList.vue b/src/renderer/src/views/Design/Settings/settingList.vue index 6c1e440..9dc5763 100644 --- a/src/renderer/src/views/Design/Settings/settingList.vue +++ b/src/renderer/src/views/Design/Settings/settingList.vue @@ -2,179 +2,134 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2025-07-03 11:12:04 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2025-07-03 15:38:41 + * @LastEditTime: 2025-07-07 15:51:03 * @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\views\Design\Settings\setPermissions.vue * @Description: 设置权限 --> diff --git a/src/renderer/src/views/Design/Settings/software.vue b/src/renderer/src/views/Design/Settings/software.vue new file mode 100644 index 0000000..bf682f7 --- /dev/null +++ b/src/renderer/src/views/Design/Settings/software.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/renderer/src/views/Design/Settings/strategy.vue b/src/renderer/src/views/Design/Settings/strategy.vue new file mode 100644 index 0000000..701fa5e --- /dev/null +++ b/src/renderer/src/views/Design/Settings/strategy.vue @@ -0,0 +1,13 @@ + + \ No newline at end of file diff --git a/src/renderer/src/views/Design/index.vue b/src/renderer/src/views/Design/index.vue index c999093..a9e15aa 100644 --- a/src/renderer/src/views/Design/index.vue +++ b/src/renderer/src/views/Design/index.vue @@ -2,14 +2,14 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2025-07-02 16:17:29 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2025-07-03 14:19:48 + * @LastEditTime: 2025-07-07 09:43:05 * @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\views\Design\index.vue * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE -->