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
21e99546
Commit
21e99546
authored
Aug 11, 2021
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean start
parent
5716be54
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
13 deletions
+31
-13
.prettierrc
.prettierrc
+4
-0
main.js
main.js
+17
-13
src/app/shared/webview.directive.ts
src/app/shared/webview.directive.ts
+10
-0
No files found.
.prettierrc
0 → 100755
View file @
21e99546
{
"printWidth": 140,
"singleQuote": true
}
main.js
View file @
21e99546
// Modules to control application life and create native browser window
const
{
app
,
BrowserWindow
}
=
require
(
'
electron
'
)
const
path
=
require
(
'
path
'
)
const
{
app
,
BrowserWindow
}
=
require
(
'
electron
'
)
;
const
path
=
require
(
'
path
'
)
;
function
createWindow
()
{
function
createWindow
()
{
// Create the browser window.
const
mainWindow
=
new
BrowserWindow
({
width
:
800
,
...
...
@@ -10,10 +10,14 @@ function createWindow () {
webPreferences
:
{
preload
:
path
.
join
(
__dirname
,
'
preload.js
'
)
}
})
})
;
// and load the index.html of the app.
mainWindow
.
loadFile
(
'
dist/ci/index.html
'
)
if
(
process
[
'
NODE_ENV
'
]
===
'
development
'
)
{
mainWindow
.
loadURL
(
'
http://localhost:4200
'
);
}
else
{
mainWindow
.
loadFile
(
'
dist/ci/index.html
'
);
}
// Open the DevTools.
// mainWindow.webContents.openDevTools()
...
...
@@ -23,21 +27,21 @@ function createWindow () {
// initialization and is ready to create browser windows.
// 部分 API 在 ready 事件触发后才能使用。
app
.
whenReady
().
then
(()
=>
{
createWindow
()
createWindow
()
;
app
.
on
(
'
activate
'
,
function
()
{
app
.
on
(
'
activate
'
,
function
()
{
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if
(
BrowserWindow
.
getAllWindows
().
length
===
0
)
createWindow
()
})
})
if
(
BrowserWindow
.
getAllWindows
().
length
===
0
)
createWindow
()
;
})
;
})
;
// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app
.
on
(
'
window-all-closed
'
,
function
()
{
if
(
process
.
platform
!==
'
darwin
'
)
app
.
quit
()
})
app
.
on
(
'
window-all-closed
'
,
function
()
{
if
(
process
.
platform
!==
'
darwin
'
)
app
.
quit
()
;
})
;
// In this file you can include the rest of your app's specific main process
// code. 也可以拆分成几个文件,然后用 require 导入。
src/app/shared/webview.directive.ts
0 → 100644
View file @
21e99546
import
{
Directive
}
from
'
@angular/core
'
;
@
Directive
({
selector
:
'
webview
'
})
export
class
WebviewDirective
{
constructor
()
{
}
}
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