Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
烟灰好
edex-ui
提交
7e181a03
E
edex-ui
项目概览
烟灰好
/
edex-ui
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
edex-ui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
7e181a03
编写于
6月 13, 2018
作者:
G
GitSquared
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
♻
Some CSS cleanup and fixes for 16/10 ratio+touch
上级
961412ef
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
43 addition
and
24 deletion
+43
-24
src/_boot.js
src/_boot.js
+7
-5
src/_renderer.js
src/_renderer.js
+7
-15
src/assets/css/keyboard.css
src/assets/css/keyboard.css
+16
-4
src/classes/terminal.class.js
src/classes/terminal.class.js
+13
-0
未找到文件。
src/_boot.js
浏览文件 @
7e181a03
const
signale
=
require
(
"
signale
"
);
const
{
app
,
BrowserWindow
}
=
require
(
"
electron
"
);
const
{
app
,
BrowserWindow
,
dialog
}
=
require
(
"
electron
"
);
process
.
on
(
"
uncaughtException
"
,
e
=>
{
signale
.
fatal
(
e
);
dialog
.
showErrorBox
(
"
eEDEX-UI failed to launch
"
,
e
.
message
||
"
Cannot retrieve error message.
"
);
if
(
tty
)
{
tty
.
tty
.
kill
();
}
...
...
@@ -118,11 +119,10 @@ app.on('ready', () => {
height
,
show
:
false
,
resizable
:
true
,
movable
:
false
,
movable
:
settings
.
allowWindowed
||
false
,
fullscreen
:
true
,
skipTaskbar
:
true
,
autoHideMenuBar
:
true
,
frame
:
false
,
frame
:
settings
.
allowWindowed
||
false
,
backgroundColor
:
'
#000000
'
,
webPreferences
:
{
devTools
:
true
,
...
...
@@ -142,7 +142,9 @@ app.on('ready', () => {
win
.
once
(
"
ready-to-show
"
,
()
=>
{
signale
.
complete
(
"
Frontend window is up!
"
);
win
.
show
();
win
.
setResizable
(
false
);
if
(
!
settings
.
allowWindowed
)
{
win
.
setResizable
(
false
);
}
});
signale
.
watch
(
"
Waiting for frontend connection...
"
);
...
...
src/_renderer.js
浏览文件 @
7e181a03
...
...
@@ -327,8 +327,11 @@ window.themeChanger = (theme) => {
};
// Prevent showing menu, exiting fullscreen or app with keyboard shortcuts
window
.
onkeydown
=
(
e
)
=>
{
if
(
e
.
key
===
"
Alt
"
||
e
.
key
===
"
F11
"
)
{
window
.
onkeydown
=
e
=>
{
if
(
e
.
key
===
"
Alt
"
)
{
e
.
preventDefault
();
}
if
(
e
.
key
===
"
F11
"
&&
!
settings
.
allowWindowed
)
{
e
.
preventDefault
();
}
if
(
e
.
code
===
"
KeyD
"
&&
e
.
ctrlKey
)
{
...
...
@@ -339,16 +342,5 @@ window.onkeydown = (e) => {
}
};
// Initiate graphical error display
window
.
edexErrorsModals
=
[];
window
.
onerror
=
(
msg
,
path
,
line
,
col
,
error
)
=>
{
let
errorModal
=
new
Modal
({
type
:
"
error
"
,
title
:
error
,
message
:
`
${
msg
}
<br/> at
${
path
}
${
line
}
:
${
col
}
`
});
window
.
edexErrorsModals
.
push
(
errorModal
);
ipc
.
send
(
"
log
"
,
"
error
"
,
`
${
error
}
:
${
msg
}
`
);
ipc
.
send
(
"
log
"
,
"
debug
"
,
`at
${
path
}
${
line
}
:
${
col
}
`
);
};
// Fix double-tap zoom on touchscreens
require
(
'
electron
'
).
webFrame
.
setVisualZoomLevelLimits
(
1
,
1
);
src/assets/css/keyboard.css
浏览文件 @
7e181a03
...
...
@@ -47,12 +47,12 @@ section#keyboard.animation_state_2 > * {
div
.keyboard_row
:last-child
{
position
:
relative
;
left
:
2.
98
vh
;
left
:
2.
4
vh
;
}
div
.keyboard_key
{
height
:
4.9vh
;
min-width
:
4.9vh
;
height
:
2.7vw
;
min-width
:
2.7vw
;
overflow
:
hidden
;
border-radius
:
0.46vh
;
background-color
:
rgba
(
var
(
--color_r
),
var
(
--color_g
),
var
(
--color_b
),
0.0
);
...
...
@@ -150,7 +150,7 @@ div.keyboard_row#row_2 > div.keyboard_enter {
margin-top
:
0vh
;
height
:
6.389vh
;
top
:
-0.37vh
;
right
:
-
0.9
vh
;
right
:
-
1
vh
;
}
div
.keyboard_row
#row_2
>
div
.keyboard_enter
:active
,
div
.keyboard_row
#row_2
>
div
.keyboard_enter.active
{
...
...
@@ -221,3 +221,15 @@ section#keyboard[data-is-fn-on="true"] > div.keyboard_row > div.keyboard_key > h
position
:
absolute
;
opacity
:
0
;
}
/* Support for other screen ratios than 16:9 */
@media
(
aspect-ratio
:
16
/
10
)
{
div
.keyboard_row
:last-child
{
left
:
1.1vh
;
}
div
.keyboard_row
#row_2
>
div
.keyboard_enter
{
top
:
-0.7vh
;
right
:
-0.9vh
;
}
}
src/classes/terminal.class.js
浏览文件 @
7e181a03
...
...
@@ -122,6 +122,19 @@ class Terminal {
this
.
_lastTouch
=
null
;
});
document
.
querySelector
(
"
.xterm-helper-textarea
"
).
addEventListener
(
"
keydown
"
,
e
=>
{
if
(
e
.
key
===
"
F11
"
&&
window
.
settings
.
allowWindowed
)
{
e
.
preventDefault
();
let
win
=
require
(
"
electron
"
).
remote
.
BrowserWindow
.
getFocusedWindow
();
let
bool
=
(
win
.
isFullScreen
()
?
false
:
true
);
win
.
setFullScreen
(
bool
);
setTimeout
(()
=>
{
this
.
fit
();
},
700
);
}
});
this
.
fit
=
()
=>
{
this
.
term
.
fit
();
setTimeout
(()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录