Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
58a77ca9
Commit
58a77ca9
authored
Oct 27, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
63577dd2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
8 deletions
+25
-8
app/app-detail.component.css
app/app-detail.component.css
+11
-1
app/app-detail.component.html
app/app-detail.component.html
+5
-2
app/app-detail.component.ts
app/app-detail.component.ts
+9
-5
No files found.
app/app-detail.component.css
View file @
58a77ca9
...
...
@@ -39,5 +39,15 @@ progress {
#network
{
display
:
inline-block
;
vertical-align
:
middle
;
width
:
240px
;
width
:
300px
;
}
#network
.input-group-btn
>
.btn
:not
(
:last-child
)
:not
(
.dropdown-toggle
)
{
border-bottom-right-radius
:
0
;
border-top-right-radius
:
0
;
}
#network
.input-group-btn
>
.dropdown-toggle
{
border-bottom-left-radius
:
0
;
border-top-left-radius
:
0
;
}
\ No newline at end of file
app/app-detail.component.html
View file @
58a77ca9
...
...
@@ -24,10 +24,13 @@
<div
id=
"network"
*ngIf=
"appsService.currentApp.network && appsService.currentApp.network.protocol == 'maotama'"
>
<div
class=
"input-group"
>
<input
*ngIf=
"appsService.connections.get(appsService.currentApp)"
[value]=
"appsService.connections.get(appsService.currentApp)"
readonly
type=
"text"
class=
"form-control"
aria-label=
"Text input with dropdown button"
>
<div
class=
"input-group-btn
btn-group
"
>
<button
*ngIf=
"!appsService.connections.get(appsService.currentApp)"
(click)=
"appsService.network(appsService.currentApp, appsService.currentApp.network.servers[0])"
type=
"button"
class=
"btn btn-secondary"
aria-haspopup=
"true"
aria-expanded=
"false"
>
<div
class=
"input-group-btn"
>
<button
*ngIf=
"!appsService.connections.get(appsService.currentApp)"
(click)=
"appsService.network(appsService.currentApp, appsService.currentApp.network.servers[0])"
type=
"button"
class=
"btn btn-secondary"
>
联机
</button>
<button
*ngIf=
"appsService.connections.get(appsService.currentApp)"
(click)=
"copy(appsService.connections.get(appsService.currentApp))"
type=
"button"
class=
"btn btn-secondary"
>
复制
</button>
<button
type=
"button"
class=
"btn btn-secondary dropdown-toggle dropdown-toggle-split"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
style=
"height: 38px;"
>
<span
class=
"sr-only"
>
Toggle Dropdown
</span>
...
...
app/app-detail.component.ts
View file @
58a77ca9
...
...
@@ -10,11 +10,11 @@ declare var $;
const
readline
=
System
.
_nodeRequire
(
'
readline
'
);
const
os
=
System
.
_nodeRequire
(
'
os
'
);
const
electron
=
System
.
_nodeRequire
(
'
electron
'
);
const
{
clipboard
,
remote
}
=
System
.
_nodeRequire
(
'
electron
'
);
const
sudo
=
new
(
System
.
_nodeRequire
(
'
electron-sudo
'
).
default
)({
name
:
'
MyCard
'
});
sudo
.
fork
=
function
(
modulePath
,
args
,
options
)
{
return
sudo
.
spawn
(
electron
.
remote
.
app
.
getPath
(
'
exe
'
),
[
'
-e
'
,
modulePath
]).
then
((
child
)
=>
{
return
sudo
.
spawn
(
remote
.
app
.
getPath
(
'
exe
'
),
[
'
-e
'
,
modulePath
]).
then
((
child
)
=>
{
readline
.
createInterface
({
input
:
child
.
stdout
}).
on
(
'
line
'
,
(
line
)
=>
{
child
.
emit
(
'
message
'
,
JSON
.
parse
(
line
));
});
...
...
@@ -136,7 +136,7 @@ export class AppDetailComponent implements OnInit {
}
selectDir
()
{
let
dir
=
this
.
electron
.
remote
.
dialog
.
showOpenDialog
({
properties
:
[
'
openFile
'
,
'
openDirectory
'
]});
let
dir
=
remote
.
dialog
.
showOpenDialog
({
properties
:
[
'
openFile
'
,
'
openDirectory
'
]});
console
.
log
(
dir
);
this
.
appsService
.
installConfig
.
installDir
=
dir
[
0
];
return
dir
[
0
];
...
...
@@ -177,11 +177,15 @@ export class AppDetailComponent implements OnInit {
handle
.
on
(
'
close
'
,
(
code
)
=>
{
console
.
log
(
`child process exited with code
${
code
}
`
);
this
.
electron
.
remote
.
getCurrentWindow
().
restore
();
remote
.
getCurrentWindow
().
restore
();
});
this
.
electron
.
remote
.
getCurrentWindow
().
minimize
();
remote
.
getCurrentWindow
().
minimize
();
}
copy
(
text
){
clipboard
.
writeText
(
text
);
}
}
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