This repository has been archived by the owner on Apr 21, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
87 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ const components = [ | |
'contextmenu', | ||
'projects', | ||
'updater', | ||
'touchbar', | ||
]; | ||
|
||
components.forEach(init); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
const {TouchBar, getCurrentWindow} = require('electron').remote; | ||
const {TouchBarLabel, TouchBarButton, TouchBarSpacer} = TouchBar; | ||
|
||
const $ = require('../util'); | ||
const EVENT = require('../db/events'); | ||
|
||
function initBar () { | ||
const btnBack = new TouchBarButton({ | ||
label: '←', | ||
click: () => $.trigger(EVENT.frame.goto, 'prev') | ||
}); | ||
const btnForward = new TouchBarButton({ | ||
label: '→', | ||
click: () => $.trigger(EVENT.frame.goto, 'next') | ||
}); | ||
const btnRefresh = new TouchBarButton({ | ||
label: '↻', | ||
click: () => $.trigger(EVENT.frame.goto, 'refresh') | ||
}); | ||
|
||
const btnBookmark = new TouchBarButton({ | ||
label: '☆', | ||
click: () => {} | ||
}); | ||
|
||
const btnAddressbar = new TouchBarButton({ | ||
label: 'Search or type url ', // these are nbsp chars | ||
click: () => $.trigger(EVENT.address.focus) | ||
}); | ||
|
||
const btnIssueNo = new TouchBarButton({ | ||
label: 'Issue #', | ||
click: () => $.trigger(EVENT.address.issueFocus) | ||
}); | ||
|
||
const btnRefreshNotifications = new TouchBarButton({ | ||
label: '↻', | ||
backgroundColor: '#2C384D', | ||
click: () => $.trigger(EVENT.notifications.refresh) | ||
}); | ||
|
||
return new TouchBar([ | ||
btnBack, | ||
btnForward, | ||
btnRefresh, | ||
btnAddressbar, | ||
btnIssueNo, | ||
btnBookmark, | ||
|
||
// new TouchBarSpacer({ size: 'small' }), | ||
btnRefreshNotifications, | ||
]); | ||
} | ||
|
||
|
||
|
||
function init () { | ||
const touchBar = initBar(); | ||
getCurrentWindow().setTouchBar(touchBar); | ||
} | ||
|
||
|
||
|
||
module.exports = { | ||
init | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters