-
Notifications
You must be signed in to change notification settings - Fork 17
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
Ken Howard
committed
Dec 1, 2018
1 parent
7c9518e
commit 29b9cb3
Showing
9 changed files
with
191 additions
and
121 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
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 |
---|---|---|
@@ -1,20 +1,26 @@ | ||
import { StatusBarAlignment, window } from 'vscode'; | ||
|
||
import { profiles } from '../profiles'; | ||
|
||
import { insights } from '../insights'; | ||
import { logger } from '../logger'; | ||
import { profiles } from '../profiles'; | ||
|
||
const statusBar = window.createStatusBarItem(StatusBarAlignment.Left); | ||
statusBar.show(); | ||
|
||
export const updateStatusBar = (): void => { | ||
const activeProfile = profiles.get(); | ||
statusBar.text = `GIST ${ | ||
activeProfile ? `[${activeProfile.name}]` : '[Create Profile]' | ||
}`; | ||
statusBar.command = activeProfile | ||
? 'extension.toggleProfile' | ||
: 'extension.createProfile'; | ||
try { | ||
const activeProfile = profiles.get(); | ||
statusBar.text = `GIST ${ | ||
activeProfile ? `[${activeProfile.name}]` : '[Create Profile]' | ||
}`; | ||
statusBar.command = activeProfile | ||
? 'extension.toggleProfile' | ||
: 'extension.createProfile'; | ||
|
||
logger.debug('Status Bar Updated'); | ||
logger.debug('Status Bar Updated'); | ||
} catch (err) { | ||
const error: Error = err as Error; | ||
logger.error(`updateStatusBar > ${error && error.message}`); | ||
insights.exception('updateStatusBar', { messsage: error.message }); | ||
} | ||
}; |
Oops, something went wrong.