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
00f50907
Commit
00f50907
authored
Sep 13, 2016
by
A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add open folder
parent
f749fa29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
app/app-detail.component.html
app/app-detail.component.html
+2
-2
app/app-detail.component.ts
app/app-detail.component.ts
+10
-1
No files found.
app/app-detail.component.html
View file @
00f50907
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<div
*ngIf=
"isInstalled"
>
<div
*ngIf=
"isInstalled"
>
<button
type=
"button"
class=
"btn btn-primary"
>
运行
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
运行
</button>
<button
type=
"button"
class=
"btn btn-secondary"
>
设置
</button>
<button
type=
"button"
class=
"btn btn-secondary"
>
设置
</button>
<button
type=
"button"
class=
"btn btn-secondary"
>
游览本地文件
</button>
<button
(click)=
"openDir(routingService.app)"
type=
"button"
class=
"btn btn-secondary"
>
游览本地文件
</button>
<button
type=
"button"
class=
"btn btn-secondary"
>
联机
</button>
<button
type=
"button"
class=
"btn btn-secondary"
>
联机
</button>
</div>
</div>
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
[(ngModel)]=
"appsService.installConfig.installDir"
name=
"installDir"
class=
"form-control"
placeholder=
"安装位置"
>
<input
type=
"text"
[(ngModel)]=
"appsService.installConfig.installDir"
name=
"installDir"
class=
"form-control"
placeholder=
"安装位置"
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<button
(click)=
"
open
Dir()"
class=
"btn btn-secondary"
type=
"button"
>
浏览
</button>
<button
(click)=
"
select
Dir()"
class=
"btn btn-secondary"
type=
"button"
>
浏览
</button>
</span>
</span>
</div>
</div>
</div>
</div>
...
...
app/app-detail.component.ts
View file @
00f50907
...
@@ -130,11 +130,20 @@ export class AppDetailComponent {
...
@@ -130,11 +130,20 @@ export class AppDetailComponent {
$
(
"
#install-modal
"
).
modal
(
"
hide
"
);
$
(
"
#install-modal
"
).
modal
(
"
hide
"
);
}
}
open
Dir
()
{
select
Dir
()
{
let
dir
=
this
.
electron
.
remote
.
dialog
.
showOpenDialog
({
properties
:
[
'
openFile
'
,
'
openDirectory
'
]});
let
dir
=
this
.
electron
.
remote
.
dialog
.
showOpenDialog
({
properties
:
[
'
openFile
'
,
'
openDirectory
'
]});
console
.
log
(
dir
);
console
.
log
(
dir
);
this
.
appsService
.
installConfig
.
installDir
=
dir
[
0
];
this
.
appsService
.
installConfig
.
installDir
=
dir
[
0
];
return
dir
[
0
];
return
dir
[
0
];
}
}
openDir
(
id
)
{
this
.
appsService
.
data
.
map
((
v
)
=>
{
if
(
v
.
id
==
id
)
{
this
.
electron
.
remote
.
shell
.
showItemInFolder
(
v
.
local
.
path
);
}
});
}
}
}
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