Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/dlimeng/SolidUI into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dlimeng committed Jul 12, 2023
2 parents 0bad6f5 + 26f6eba commit 63a2234
Show file tree
Hide file tree
Showing 67 changed files with 1,158 additions and 1,058 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/web-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Frontend

on:
push:
pull_request:


jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.17.3]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Checkout
uses: actions/checkout@v2
- name: lint
if: steps.check.outcome == 'failure'
working-directory: ./solidui-web
run: |
npm run lint -- --quiet
npm run prettier-check
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public enum Scope {
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@TableId(value = "datasource_type_id")
// @TableId(value = "datasource_type_id")
private Long dataSourceTypeId;

/** Key name */
Expand Down
2 changes: 1 addition & 1 deletion solidui-entrance/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spring:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/solidui?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: Qing@123456
hikari:
connection-test-query: select 1
minimum-idle: 5
Expand Down
2 changes: 2 additions & 0 deletions solidui-web/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ module.exports = {
"allowSingleExtends": true,
}
],
"@typescript-eslint/no-non-null-assertion": 0, // need discussion, temporary disable

// react
"react/jsx-filename-extension": [1, { extensions: [".jsx", ".tsx"] }],
"react/require-default-props": 0,
Expand Down
9 changes: 6 additions & 3 deletions solidui-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
"author": "solidui",
"license": "Apache-2.0",
"scripts": {
"dev": "cross-env NODE_ENV=development BASE_ENV=development webpack-dev-server -c scripts/webpack.dev.js",
"build": "cross-env NODE_ENV=production BASE_ENV=production webpack -c scripts/webpack.prod.js",
"dev": "cross-env NODE_ENV=development webpack-dev-server -c scripts/webpack.dev.js",
"build": "cross-env NODE_ENV=production webpack -c scripts/webpack.prod.js",
"lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx .",
"lint:fix": "eslint --fix --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx ."
"lint:fix": "eslint --fix --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx .",
"prettier-check": "prettier './src/**/*{.js,.jsx,.ts,.tsx,.css,.less}' --check",
"prettier-fix": "prettier './src/**/*{.js,.jsx,.ts,.tsx,.css,.less}' --write"
},
"devDependencies": {
"@babel/core": "7.20.12",
Expand Down Expand Up @@ -71,6 +73,7 @@
"@scena/matrix": "^1.1.1",
"@scena/react-guides": "0.22.3",
"@szhsin/react-menu": "^4.0.0",
"ahooks": "^3.7.8",
"antd": "4.24.7",
"axios": "1.3.2",
"classnames": "2.3.2",
Expand Down
32 changes: 29 additions & 3 deletions solidui-web/src/apis/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function doRequest<T>(
break;
}

return new Promise<ApiResult<T>>((resolve, reject) =>
return new Promise<ApiResult<T>>((resolve, reject) => {
response
.then((res) => {
const { data: mData } = res;
Expand All @@ -151,8 +151,34 @@ function doRequest<T>(
const errText = JSON.stringify(err);
message.warning(errText);
reject(err);
}),
);
});
});

// return new Promise<ApiResult<T>>((resolve, reject) =>
// response
// .then((res) => {
// const { data: mData } = res;
// const { success } = mData;
// // const { code } = mData;
// const msg = mData.msg || "";
// if (success) {
// resolve({
// ok: true,
// data: mData.data,
// });
// } else {
// message.warning(msg);
// resolve({
// ok: false,
// });
// }
// })
// .catch((err) => {
// const errText = JSON.stringify(err);
// message.warning(errText);
// reject(err);
// }),
// );
}

const service = {
Expand Down
2 changes: 1 addition & 1 deletion solidui-web/src/assets/styles/antd-custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

.solidui-modal {
.solidui-modal {
position: relative;
width: 100%;
height: 100%;
Expand Down
41 changes: 19 additions & 22 deletions solidui-web/src/assets/styles/area.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,26 @@
*/

.area-bottom {
.cu-b-l {
.cu-b-l {
}

}
.cu-b-r {
display: flex;
justify-content: space-between;
align-items: center;
margin-right: 24px;

.cu-b-r {
display: flex;
justify-content: space-between;
align-items: center;
margin-right: 24px;
.cu-b-r-nav {
display: flex;
align-items: center;
padding-right: 8px;
transition: all;

.cu-b-r-nav {
display: flex;
align-items: center;
padding-right: 8px;
transition: all;

.cu-b-zoom-container {
display: flex;
align-items: center;
user-select: none;


}
}
}
.cu-b-zoom-container {
display: flex;
align-items: center;
user-select: none;
}
}
}
}
33 changes: 18 additions & 15 deletions solidui-web/src/assets/styles/designer.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,33 @@
* limitations under the License.
*/

#dashboard {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 1;
font-size: 12px;
#dashboard {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 1;
font-size: 12px;
overflow: hidden;
}

ul, li {
ul,
li {
list-style-type: none;
}

ul, li, p {
ul,
li,
p {
margin: 0;
padding: 0;
border: 0;
}

@import './variables.less';
@import './layout.less';
@import './aside.less';
@import './area.less';
@import './iconfont.less';
@import "./variables.less";
@import "./layout.less";
@import "./aside.less";
@import "./area.less";
@import "./iconfont.less";
@import "./antd-custom.less";
71 changes: 37 additions & 34 deletions solidui-web/src/assets/styles/iconfont.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,56 @@
* limitations under the License.
*/

@import './variables.less';
@import "./variables.less";

@font-face {
font-family: 'iconfont';
src: url('//at.alicdn.com/t/c/font_3377463_euwvemrm6og.woff2?t=1672814149412') format('woff2'),
url('//at.alicdn.com/t/c/font_3377463_euwvemrm6og.woff?t=1672814149412') format('woff'),
url('//at.alicdn.com/t/c/font_3377463_euwvemrm6og.ttf?t=1672814149412') format('truetype');
font-family: "iconfont";
src: url("//at.alicdn.com/t/c/font_3377463_euwvemrm6og.woff2?t=1672814149412")
format("woff2"),
url("//at.alicdn.com/t/c/font_3377463_euwvemrm6og.woff?t=1672814149412")
format("woff"),
url("//at.alicdn.com/t/c/font_3377463_euwvemrm6og.ttf?t=1672814149412")
format("truetype");
}

.@{prefixCls}-font {
font-family: 'iconfont' !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;

&.f12 {
font-size: 12px;
}
&.f12 {
font-size: 12px;
}

&.f13 {
font-size: 13px;
}
&.f13 {
font-size: 13px;
}

&.f14 {
font-size: 14px;
}
&.f14 {
font-size: 14px;
}

&.f15 {
font-size: 15px;
}
&.f15 {
font-size: 15px;
}

&.f16 {
font-size: 16px;
}
&.f16 {
font-size: 16px;
}
}

.@{prefixCls}-font {
&.@{prefixCls}-chart-column::before {
content: '\e602';
}
&.@{prefixCls}-chart-column::before {
content: "\e602";
}

&.@{prefixCls}-eye::before {
content: '\e8c7';
}
&.@{prefixCls}-eye::before {
content: "\e8c7";
}

&.@{prefixCls}-lock::before {
content: '\e7b9';
}
&.@{prefixCls}-lock::before {
content: "\e7b9";
}
}
22 changes: 8 additions & 14 deletions solidui-web/src/assets/styles/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,15 @@
height: 100%;
}





.workarea {
position: absolute;
top: @headerHeight;
left: @asideWidth;
bottom: 0;
right: @propertiesWidth;
z-index: 12;
background-color: #fff;
transition: all .3s;
position: absolute;
top: @headerHeight;
left: @asideWidth;
bottom: 0;
right: @propertiesWidth;
z-index: 12;
background-color: #fff;
transition: all 0.3s;
}

.flex-horizontal-layout {
Expand Down Expand Up @@ -87,12 +83,10 @@
position: relative;
}


.cursor-pointer {
cursor: pointer;
}


.solidui-icon-btn {
cursor: pointer;
}
Loading

0 comments on commit 63a2234

Please sign in to comment.