crabatool 1.0.808 → 1.0.811
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -0
- package/package.json +1 -1
- package/res/login.html +4 -3
- package/tool/start.js +7 -6
package/index.js
CHANGED
|
@@ -113,6 +113,7 @@ async function checkFast(args) {
|
|
|
113
113
|
if (args.includes('-updateSkin')) {
|
|
114
114
|
start.bindAndCheckConfig('-skinPath');
|
|
115
115
|
start.bindAndCheckConfig('-version');
|
|
116
|
+
start.bindBranchName(config.skinPath);
|
|
116
117
|
require('./tool/ngpSkinUtils.js').update();
|
|
117
118
|
return false;
|
|
118
119
|
}
|
package/package.json
CHANGED
package/res/login.html
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
var authorization = $common.getCookie('ngp-authorization');
|
|
18
18
|
var ngp_route = $common.getCookie('ngp-route');
|
|
19
19
|
if (authorization && ngp_route) {
|
|
20
|
+
createLoginBtn(); // 回到登录界面
|
|
21
|
+
|
|
20
22
|
$ms.router = {//设置请求路由
|
|
21
23
|
debugMs: JSON.parse($common.getCookie('debugMs')),
|
|
22
24
|
'ngp-authorization': 'jwt',
|
|
@@ -42,15 +44,14 @@
|
|
|
42
44
|
$common.loadScript(srcs, function() {
|
|
43
45
|
showMainPage();
|
|
44
46
|
});
|
|
45
|
-
|
|
47
|
+
} else {
|
|
48
|
+
showLoginPage();
|
|
46
49
|
}
|
|
47
|
-
showLoginPage();
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
function showMainPage() {
|
|
51
53
|
$skin.loadCss(modeName + '/skins/craba.min.css,shell/skins/shell.css', 'login', function() {
|
|
52
54
|
$craba.run(modeName + '/Main.gspx', modeName);
|
|
53
|
-
createLoginBtn();
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
|
package/tool/start.js
CHANGED
|
@@ -366,12 +366,13 @@ class Start {
|
|
|
366
366
|
upgrade.createProject(options);
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
bindBranchName() {
|
|
369
|
+
bindBranchName(webPath) {
|
|
370
370
|
if (config.branchName) {
|
|
371
371
|
return true;
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
-
|
|
374
|
+
if (!webPath) webPath = config.webPath;
|
|
375
|
+
var gitPath = utils.searchRootFolter('.git', webPath);
|
|
375
376
|
if (!gitPath) return;
|
|
376
377
|
|
|
377
378
|
var headPath = utils.join(gitPath, 'HEAD');
|
|
@@ -383,8 +384,8 @@ class Start {
|
|
|
383
384
|
|
|
384
385
|
// 情况1:取到分支名包含斜杠
|
|
385
386
|
if (arr.length > 1) {
|
|
386
|
-
|
|
387
|
-
config.branchName =
|
|
387
|
+
var bName = arr[arr.length - 1];
|
|
388
|
+
config.branchName = bName.replace(/'/g, ''); // 分支名称
|
|
388
389
|
return;
|
|
389
390
|
}
|
|
390
391
|
|
|
@@ -403,8 +404,8 @@ class Start {
|
|
|
403
404
|
return;
|
|
404
405
|
}
|
|
405
406
|
|
|
406
|
-
|
|
407
|
-
config.branchName =
|
|
407
|
+
var bName = results[0].split(' ')[1];
|
|
408
|
+
config.branchName = bName.replace(/'/g, ''); // 分支名称
|
|
408
409
|
}
|
|
409
410
|
}
|
|
410
411
|
|