Commit f1850581 authored by 神楽坂玲奈's avatar 神楽坂玲奈

Merge branch 'v3' of github.com:mycard/mycard into v3

parents 214b912b 6d014ac2
......@@ -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: 重构这个函数
......
......@@ -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.close()" class="fa fa-times"></i>
<i (click)="currentWindow.hide()" class="fa fa-times"></i>
</div>
</div>
</nav>
......
......@@ -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"
]
......
......@@ -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();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment