Skip to content

Commit

Permalink
Use custom icon for apps
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStarich committed Dec 3, 2019
1 parent 4ac9a59 commit 94fc9ce
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 3 deletions.
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"packagerConfig": {
"asar": true,
"executableName": "sage",
"icon": "src/logo/sage-app",
"afterCopy": [
"src/build-scripts/afterCopy.js"
]
Expand Down
2 changes: 1 addition & 1 deletion web/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Nav from 'react-bootstrap/Nav';
import Navbar from 'react-bootstrap/Navbar';
import Sync from './Sync';
import { Crumb, Breadcrumbs } from './Breadcrumb';
import { ReactComponent as Logo } from './sage.svg';
import { ReactComponent as Logo } from './logo/sage.svg';

function App() {
return (
Expand Down
Binary file added web/src/logo/sage-app.icns
Binary file not shown.
Binary file added web/src/logo/sage-app.ico
Binary file not shown.
Binary file added web/src/logo/sage-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions web/src/logo/sage-app.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
8 changes: 6 additions & 2 deletions web/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,15 @@ const createWindow = async function() {
await session.defaultSession.clearCache();

// Create the browser window.
mainWindow = new BrowserWindow({
const browserOpts = {
width: 800,
height: 600,
titleBarStyle: 'hidden',
});
};
if (process.platform === 'linux') {
browserOpts.icon = "logo/sage-app.png"
}
mainWindow = new BrowserWindow(browserOpts);

// and load the index.html of the app.
mainWindow.loadURL(`http://localhost:${SagePort}`);
Expand Down

0 comments on commit 94fc9ce

Please sign in to comment.