Skip to content

Commit

Permalink
Added mac icon, fixed bug and updated setting path for *nix
Browse files Browse the repository at this point in the history
  • Loading branch information
dmf444 committed May 30, 2020
1 parent 125356c commit be031b2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
Binary file added notes/archivesManagerLogo.icns
Binary file not shown.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prod": "rimraf dist && cross-env NODE_ENV=production webpack --progress --colors",
"test": "mocha -r ts-node/register -r tsconfig-paths/register \"test/**/*.ts\"",
"build:win": "electron-builder build --win --x64",
"build:mac": "electron-builder build --mac --x64"
"build:mac": "electron-builder build --mac --x64 -c.mac.identity=null"
},
"build": {
"appId": "com.dmf444.archivesmanager",
Expand All @@ -20,7 +20,8 @@
"output": "./out/"
},
"mac": {
"target": "pkg"
"target": "pkg",
"icon": "./notes/archivesManagerLogo.icns"
},
"win": {
"target": "nsis",
Expand Down
5 changes: 3 additions & 2 deletions src/main/settings/FileSaveSettings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app } = require('electron');
const path = require('path');

export class FileSaveSettings implements ISettings{
get stagingPath(): string {
Expand All @@ -16,8 +17,8 @@ export class FileSaveSettings implements ISettings{
constructor() {
this.categoryName = "save";
this.localizedName = "Save Settings";
this._stagingPath = app.getPath('temp') + "\\";
this._processingPath = app.getPath('documents') + "\\smcs_archiver\\";
this._stagingPath = app.getPath('temp') + path.sep;
this._processingPath = app.getPath('documents') + path.sep + "archiver" + path.sep;
}

public getSettingsJson(): {} {
Expand Down
13 changes: 8 additions & 5 deletions src/renderer/components/files/FileInfoMetadataForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,15 @@ export class FileInfoMetadataForm extends React.Component<FileInfoMetadataFormPr
let tagOps = [];
let ignoredTags = ["root", "temp", "documents", "other", "music"];

for(let i = 0; i < this.state.tagOptions.length; i++) {
let tagName: string = this.state.tagOptions[i];
if(isNaN(Number(tagName)) && isNaN(Number(tagName.substring(0, tagName.length - 1))) && !ignoredTags.includes(tagName)){
tagOps.push(<Option value={tagName} key={"tagopt" + i}>{tagName}</Option>);
if(this.state.tagOptions != null) {
for(let i = 0; i < this.state.tagOptions.length; i++) {
let tagName: string = this.state.tagOptions[i];
if(isNaN(Number(tagName)) && isNaN(Number(tagName.substring(0, tagName.length - 1))) && !ignoredTags.includes(tagName)){
tagOps.push(<Option value={tagName} key={"tagopt" + i}>{tagName}</Option>);
}
}
}

return tagOps;
}

Expand Down Expand Up @@ -227,4 +230,4 @@ export class FileInfoMetadataForm extends React.Component<FileInfoMetadataFormPr
</Form>
);
}
}
}
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const commonConfig = {
'@utils': srcPaths('src/utils'),
},
extensions: ['.js', '.json', '.ts', '.tsx'],
mainFields: ["main"]
mainFields: ['main'],
},
module: {
rules: [
Expand Down

0 comments on commit be031b2

Please sign in to comment.