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
f1850581
Commit
f1850581
authored
Dec 06, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v3' of github.com:mycard/mycard into v3
parents
214b912b
6d014ac2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
61 deletions
+9
-61
app/apps.service.ts
app/apps.service.ts
+3
-55
app/mycard.component.html
app/mycard.component.html
+1
-1
apps.json
apps.json
+4
-4
index.js
index.js
+1
-1
No files found.
app/apps.service.ts
View file @
f1850581
...
...
@@ -133,61 +133,9 @@ export class AppsService {
return
apps
;
};
// async update(app: App) {
// const updateServer = "https://thief.mycard.moe/update/metalinks/";
//
// if (app.isReady() && app.local!.version != app.version) {
// let checksumMap = await this.installService.getChecksumFile(app)
//
// let latestFiles = new ComparableSet();
//
// }
//
// if (app.isInstalled() && app.version != (<AppLocal>app.local).version) {
// let checksumMap = await this.installService.getChecksumFile(app);
// let filesMap = (<AppLocal>app.local).files;
// let deleteList: string[] = [];
// let addList: string[] = [];
// let changeList: string[] = [];
// for (let [file,checksum] of filesMap) {
// let t = checksumMap.get(file);
// if (!t) {
// deleteList.push(file);
// } else if (t !== checksum) {
// changeList.push(file);
// }
// }
// for (let file of checksumMap.keys()) {
// if (!filesMap.has(file)) {
// changeList.push(file);
// }
// }
// let metalink = await this.http.post(updateServer + app.id, changeList).map((response) => response.text())
// .toPromise();
// let meta = new DOMParser().parseFromString(metalink, "text/xml");
// let filename = meta.getElementsByTagName('file')[0].getAttribute('name');
// let dir = path.join(path.dirname((<AppLocal>app.local).path), "downloading");
// let a = await this.downloadService.addMetalink(metalink, dir);
//
// for (let file of deleteList) {
// await this.installService.deleteFile(file);
// }
// (<AppLocal>app.local).version = app.version;
// (<AppLocal>app.local).files = checksumMap;
// localStorage.setItem(app.id, JSON.stringify(app.local));
// await this.installService.extract(path.join(dir, filename), (<AppLocal>app.local).path);
// let children = this.appsService.findChildren(app);
// for (let child of children) {
// if (child.isInstalled()) {
// await this.installService.uninstall(child, false);
// // this.installService.add(child, new InstallOption(child, path.dirname(((<AppLocal>app.local).path))));
// await this.installService.getComplete(child);
// console.log("282828")
// }
// }
//
// }
// }
async
update
(
app
:
App
)
{
const
updateServer
=
"
https://thief.mycard.moe/update/metalinks/
"
;
}
async
install
(
app
:
App
,
option
:
InstallOption
)
{
// TODO: 重构这个函数
...
...
app/mycard.component.html
View file @
f1850581
...
...
@@ -32,7 +32,7 @@
<i
(click)=
"currentWindow.minimize()"
class=
"fa fa-minus"
></i>
<i
*ngIf=
"!currentWindow.isMaximized()"
(click)=
"currentWindow.maximize()"
class=
"fa fa-expand"
></i>
<i
*ngIf=
"currentWindow.isMaximized()"
(click)=
"currentWindow.unmaximize()"
class=
"fa fa-clone"
></i>
<i
(click)=
"
window.clos
e()"
class=
"fa fa-times"
></i>
<i
(click)=
"
currentWindow.hid
e()"
class=
"fa fa-times"
></i>
</div>
</div>
</nav>
...
...
apps.json
View file @
f1850581
...
...
@@ -861,7 +861,7 @@
"touhou"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"directx"
],
"darwin"
:
[
"wine"
]
...
...
@@ -1002,7 +1002,7 @@
"touhou"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"directx"
],
"darwin"
:
[
"wine"
]
...
...
@@ -1125,7 +1125,7 @@
"touhou"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"directx"
],
"darwin"
:
[
"wine"
]
...
...
@@ -1266,7 +1266,7 @@
"touhou"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"directx"
],
"darwin"
:
[
"wine"
]
...
...
index.js
View file @
f1850581
...
...
@@ -155,7 +155,7 @@ function createWindow() {
}
function
createTray
()
{
let
tray
=
new
Tray
(
path
.
join
(
process
.
env
[
'
NODE_ENV
'
]
==
'
production
'
?
process
.
resourcesPath
:
app
.
getAppPath
(),
'
images
'
,
'
icon.
png
'
));
let
tray
=
new
Tray
(
path
.
join
(
process
.
env
[
'
NODE_ENV
'
]
==
'
production
'
?
process
.
resourcesPath
:
app
.
getAppPath
(),
'
images
'
,
'
icon.
ico
'
));
tray
.
on
(
'
click
'
,
(
event
)
=>
{
mainWindow
.
isVisible
()
?
mainWindow
.
hide
()
:
mainWindow
.
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