Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
3964313a
Commit
3964313a
authored
Dec 04, 2018
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
浏览网站自定义URL
parent
176014e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
CHANGELOG.md
CHANGELOG.md
+6
-0
index.js
source/modules/viewsite/index.js
+16
-6
No files found.
CHANGELOG.md
View file @
3964313a
...
...
@@ -24,6 +24,12 @@
*
虚拟终端界面下使用
`Ctrl`
+
`=`
(和
`+`
在一起的那个键) 可放大,
`Ctrl`
+
`-`
可缩小
#### 浏览网站
*
新增了地址栏, 面对需要先进入登录页面的 Shell, 可先在此处访问 login 页面,然后保存 Cookie 到 Shell 配置。 默认为 Shell 的 URL
*
调整了工具栏按钮的排列
*
关闭了默认自动打开 URL,需要手动点击「浏览」按钮
### Bug Fix
*
修正 windows 客户端下用户编码器路径解析错误的问题
...
...
source/modules/viewsite/index.js
View file @
3964313a
...
...
@@ -41,7 +41,7 @@ class ViewSite {
},
1000
);
// 打开浏览窗口
this
.
_loadURL
(
opts
.
url
);
//
this._loadURL(opts.url);
}
/**
...
...
@@ -51,9 +51,10 @@ class ViewSite {
_initToolbar
()
{
const
toolbar
=
this
.
cell
.
attachToolbar
();
toolbar
.
loadStruct
([
{
id
:
'save'
,
type
:
'button'
,
icon
:
'save'
,
text
:
LANG
[
'toolbar'
].
save
},
{
type
:
'separator'
},
{
id
:
'url'
,
width
:
400
,
type
:
'buttonInput'
,
value
:
this
.
opts
.
url
||
'loading..'
},
{
id
:
'view'
,
type
:
'button'
,
icon
:
'chrome'
,
text
:
LANG
[
'toolbar'
].
view
},
{
type
:
'separator'
},
{
id
:
'save'
,
type
:
'button'
,
icon
:
'save'
,
text
:
LANG
[
'toolbar'
].
save
},
]);
toolbar
.
attachEvent
(
'onClick'
,
(
id
)
=>
{
switch
(
id
)
{
...
...
@@ -61,9 +62,18 @@ class ViewSite {
this
.
_saveCookie
();
break
;
case
'view'
:
this
.
_loadURL
(
this
.
opts
.
url
);
let
url
=
toolbar
.
getInput
(
'url'
).
value
;
this
.
_loadURL
(
url
);
}
})
});
toolbar
.
attachEvent
(
'onEnter'
,
(
id
,
value
)
=>
{
switch
(
id
)
{
case
'url'
:
let
url
=
toolbar
.
getInput
(
'url'
).
value
;
this
.
_loadURL
(
url
);
break
;
}
});
return
toolbar
;
}
...
...
@@ -159,7 +169,7 @@ class ViewSite {
webPreferences
:
{
nodeIntegration
:
false
,
},
title
:
this
.
opts
.
url
title
:
url
});
win
.
loadURL
(
url
);
win
.
show
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment