diff --git a/cmd b/cmd
index cfa3e0a72..7b00082fc 100755
--- a/cmd
+++ b/cmd
@@ -379,6 +379,9 @@ if [ $# -gt 0 ]; then
elif [[ "$1" == "prod" ]] || [[ "$1" == "production" ]]; then
shift 1
run_compile prod
+ elif [[ "$1" == "appbuild" ]] || [[ "$1" == "buildapp" ]]; then
+ shift 1
+ run_electron app
elif [[ "$1" == "electron" ]]; then
shift 1
run_electron $@
diff --git a/electron/build.js b/electron/build.js
index f5297aaf8..361ec71e6 100644
--- a/electron/build.js
+++ b/electron/build.js
@@ -99,11 +99,16 @@ function genericPublish({url, version, output}) {
// 生成配置、编译应用
function startBuild(data, publish) {
// information
- console.log("Name: " + data.name);
- console.log("AppId: " + data.id);
- console.log("Version: " + config.version);
- console.log("Platform: " + data.platform);
- console.log("Publish: " + (publish ? 'Yes' : 'No'));
+ if (data.id === 'app') {
+ console.log("Name: " + data.name);
+ console.log("Version: " + config.version);
+ } else {
+ console.log("Name: " + data.name);
+ console.log("AppId: " + data.id);
+ console.log("Version: " + config.version);
+ console.log("Platform: " + data.platform);
+ console.log("Publish: " + (publish ? 'Yes' : 'No'));
+ }
let systemInfo = {
title: data.name,
version: config.version,
@@ -122,6 +127,9 @@ function startBuild(data, publish) {
let indexString = fs.readFileSync(indexFile, 'utf8');
indexString = indexString.replace(/
(.*?)<\/title>/g, `${data.name}`);
fs.writeFileSync(indexFile, indexString, 'utf8');
+ if (data.id === 'app') {
+ return;
+ }
// package.json Backup
fse.copySync(packageFile, packageBakFile)
// package.json Generated
@@ -163,6 +171,29 @@ if (["dev"].includes(argv[2])) {
fs.writeFileSync(devloadCachePath, utils.formatUrl("127.0.0.1:" + env.parsed.APP_PORT), 'utf8');
child_process.spawn("npx", ["mix", "watch", "--hot", "--", "--env", "--electron"], {stdio: "inherit"});
child_process.spawn("npm", ["run", "start-quiet"], {stdio: "inherit", cwd: "electron"});
+} else if (["app"].includes(argv[2])) {
+ let urlChoices = [];
+ Array.from(new Set(config.app.map(item => item.url))).forEach(url => {
+ urlChoices.push({
+ name: url,
+ value: url
+ })
+ })
+ inquirer.prompt([
+ {
+ type: 'list',
+ name: 'url',
+ message: "选择网址",
+ choices: urlChoices
+ }
+ ]).then(answers => {
+ startBuild({
+ name: 'App',
+ id: 'app',
+ platform: '',
+ url: answers.url,
+ }, false)
+ });
} else if (platform.includes(argv[2])) {
// 自动编译
let data = config.app.find(({id, publish}) => id === process.env.APPID && publish.provider === process.env.PROVIDER);
diff --git a/resources/assets/js/components/RightBottom.vue b/resources/assets/js/components/RightBottom.vue
index b96f5e348..67239930c 100644
--- a/resources/assets/js/components/RightBottom.vue
+++ b/resources/assets/js/components/RightBottom.vue
@@ -88,8 +88,12 @@ export default {
'isDesktop',
]),
+ isSoftware() {
+ return this.$Electron || this.$isEEUiApp;
+ },
+
showSSO() {
- return this.$Electron && ['login'].includes(this.$route.name)
+ return this.isSoftware && ['login'].includes(this.$route.name)
},
showDown() {
diff --git a/resources/assets/js/pages/login.vue b/resources/assets/js/pages/login.vue
index a84d76fed..b7cf6f0a8 100644
--- a/resources/assets/js/pages/login.vue
+++ b/resources/assets/js/pages/login.vue
@@ -10,7 +10,7 @@
{{$L('输入您的凭证以访问您的帐户。')}}
-
+
@@ -107,7 +107,7 @@ export default {
this.getDemoAccount();
this.getNeedStartHome();
//
- if (this.$Electron) {
+ if (this.isSoftware) {
this.chackServerUrl().catch(_ => {});
} else {
this.clearServerUrl();
@@ -117,12 +117,14 @@ export default {
this.inputServerUrl();
});
},
+
beforeDestroy() {
if (this.subscribe) {
this.subscribe.unsubscribe();
this.subscribe = null;
}
},
+
activated() {
this.loginType = 'login'
//
@@ -130,6 +132,7 @@ export default {
this.$Electron.sendMessage('subWindowDestroyAll')
}
},
+
deactivated() {
this.loginJump = false;
this.password = "";
@@ -137,6 +140,7 @@ export default {
this.code = "";
this.invite = "";
},
+
computed: {
...mapState([
'cacheServerUrl',
@@ -145,6 +149,10 @@ export default {
'themeList',
]),
+ isSoftware() {
+ return this.$Electron || this.$isEEUiApp;
+ },
+
currentLanguage() {
return this.languageList[this.languageType] || 'Language'
},
@@ -166,6 +174,7 @@ export default {
return text
}
},
+
watch: {
'$route' ({query}) {
if (query.type=='reg'){
@@ -180,6 +189,7 @@ export default {
}
}
},
+
methods: {
goHome() {
if (this.needStartHome) {
@@ -314,7 +324,7 @@ export default {
isNotServer() {
let apiHome = $A.getDomain(window.systemInfo.apiUrl)
- return this.$Electron && (apiHome == "" || apiHome == "public")
+ return this.isSoftware && (apiHome == "" || apiHome == "public")
},
onBlur() {
diff --git a/resources/assets/sass/components/mobile.scss b/resources/assets/sass/components/mobile.scss
index 3bed548a0..4f58f60fa 100644
--- a/resources/assets/sass/components/mobile.scss
+++ b/resources/assets/sass/components/mobile.scss
@@ -6,7 +6,7 @@
right: 0;
background-color: #f8f8f8;
box-shadow: 0 0 2px rgba(28, 34, 43, 0.15);
- z-index: 9998;
+ z-index: 99;
> ul {
display: flex;
align-items: center;
diff --git a/resources/assets/sass/components/right-bottom.scss b/resources/assets/sass/components/right-bottom.scss
index 1c9adacd6..d6b2773fc 100644
--- a/resources/assets/sass/components/right-bottom.scss
+++ b/resources/assets/sass/components/right-bottom.scss
@@ -88,3 +88,18 @@
}
}
}
+
+@media (max-width: 768px) {
+ .common-right-bottom {
+ bottom: 20px;
+ right: auto;
+ left: 50%;
+ transform: translateX(-50%);
+
+ .common-right-bottom-link {
+ color: $primary-text-color !important;
+ background-color: transparent;
+ border-color: transparent;
+ }
+ }
+}
diff --git a/resources/assets/sass/pages/components/dialog-wrapper.scss b/resources/assets/sass/pages/components/dialog-wrapper.scss
index 9e3f54044..a24b2ef67 100644
--- a/resources/assets/sass/pages/components/dialog-wrapper.scss
+++ b/resources/assets/sass/pages/components/dialog-wrapper.scss
@@ -861,6 +861,9 @@
width: unset;
overflow: hidden;
text-align: center;
+ .main-title {
+ justify-content: center;
+ }
.sub-title {
line-height: 18px;
}
diff --git a/resources/assets/sass/pages/components/project-panel.scss b/resources/assets/sass/pages/components/project-panel.scss
index 6ad76955a..f398b91cf 100644
--- a/resources/assets/sass/pages/components/project-panel.scss
+++ b/resources/assets/sass/pages/components/project-panel.scss
@@ -11,7 +11,7 @@
display: flex;
align-items: flex-start;
justify-content: space-between;
- margin-bottom: 24px;
+ margin-bottom: 20px;
.project-title {
display: flex;
align-items: center;
@@ -142,11 +142,11 @@
float: left;
color: #999999;
line-height: 24px;
- padding: 3px 0;
+ padding: 6px 0;
}
.project-switch {
float: right;
- margin-left: 32px;
+ margin: 3px 0 3px 32px;
display: flex;
align-items: flex-end;
.project-checkbox {
diff --git a/resources/assets/sass/pages/components/project-workflow.scss b/resources/assets/sass/pages/components/project-workflow.scss
index 376fa75a1..1e10e0a22 100644
--- a/resources/assets/sass/pages/components/project-workflow.scss
+++ b/resources/assets/sass/pages/components/project-workflow.scss
@@ -31,6 +31,10 @@
padding: 0 20px;
overflow: auto;
+ .ivu-collapse {
+ min-width: 700px;
+ }
+
.ivu-collapse-header {
display: flex;
align-items: center;
diff --git a/resources/assets/sass/pages/page-login.scss b/resources/assets/sass/pages/page-login.scss
index c9a4bd68a..08ad6fad5 100644
--- a/resources/assets/sass/pages/page-login.scss
+++ b/resources/assets/sass/pages/page-login.scss
@@ -143,3 +143,64 @@
}
}
}
+
+@media (max-width: 768px) {
+ .page-login {
+ .login-body {
+ padding: 0 0 110px;
+
+ .login-logo {
+ margin-top: 24px;
+ width: 76px;
+ height: 76px;
+ }
+
+ .login-box {
+ margin-top: 0;
+ width: 100%;
+ max-width: 460px;
+ border-radius: 12px;
+ background-color: transparent;
+ box-shadow: none;
+
+ .login-title {
+ font-size: 26px;
+ }
+
+ .login-subtitle {
+ margin-top: 4px;
+ }
+
+ .login-input {
+ margin: 20px 36px;
+
+ .ivu-input-large {
+ height: 44px;
+ }
+
+ .ivu-input-with-prefix {
+ padding-left: 40px;
+ }
+
+ .ivu-input-prefix,
+ .ivu-input-suffix {
+ width: 44px;
+ }
+
+ .ivu-input-wrapper-large .ivu-input-prefix i,
+ .ivu-input-wrapper-large .ivu-input-suffix i {
+ font-size: 20px;
+ line-height: 44px;
+ }
+ }
+ }
+
+ .login-bottom {
+ margin-top: 8px;
+ width: 100%;
+ max-width: 460px;
+ padding: 0 36px;
+ }
+ }
+ }
+}