Skip to content

Commit

Permalink
Add project info widget
Browse files Browse the repository at this point in the history
  • Loading branch information
MoSattler committed May 5, 2022
1 parent 877f79f commit cecb751
Show file tree
Hide file tree
Showing 14 changed files with 1,330 additions and 3 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"packages/widget-snippets",
"packages/widget-todo",
"packages/widget-weather",
"packages/widget-welcome"
"packages/widget-welcome",
"packages/widget-project-info"
]
},
"activationEvents": [
Expand Down Expand Up @@ -2730,6 +2731,7 @@
"compile:ts:widget-notes": "tsc --project packages/widget-notes/tsconfig.json",
"compile:ts:widget-snippets": "tsc --project packages/widget-snippets/tsconfig.json",
"compile:ts:widget-projects": "tsc --project packages/widget-projects/tsconfig.json",
"compile:ts:widget-project-info": "tsc --project packages/widget-project-info/tsconfig.json",
"compile:ts:extension": "tsc --project packages/extension/tsconfig.json",
"prepare": "husky install",
"test": "run-s test:*",
Expand All @@ -2750,6 +2752,7 @@
"watch:ts:widget-notes": "tsc --project packages/widget-notes/tsconfig.json --watch",
"watch:ts:widget-snippets": "tsc --project packages/widget-snippets/tsconfig.json --watch",
"watch:ts:widget-projects": "tsc --project packages/widget-projects/tsconfig.json --watch",
"watch:ts:widget-project-info": "tsc --project packages/widget-project-info/tsconfig.json --watch",
"watch:webpack": "NODE_ENV=development webpack --mode development --watch"
},
"devDependencies": {
Expand Down
10 changes: 9 additions & 1 deletion packages/extension/src/stateManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { activate as activateWeatherWidget } from '@vscode-marquee/widget-weathe
import { activate as activateTodoWidget, TodoExtensionManager } from '@vscode-marquee/widget-todo/extension'
import { activate as activateNotesWidget, NoteExtensionManager } from '@vscode-marquee/widget-notes/extension'
import { activate as activateSnippetsWidget, SnippetExtensionManager } from '@vscode-marquee/widget-snippets/extension'
import { activate as activateProjectInfoWidget, ProjectInfoExtensionManager } from '@vscode-marquee/widget-project-info/extension'

import telemetry from './telemetry'
import { activateGUI } from './utils'
Expand All @@ -30,7 +31,8 @@ const MARQUEE_WIDGETS = {
'@vscode-marquee/weather-widget': activateWeatherWidget,
'@vscode-marquee/todo-widget': activateTodoWidget,
'@vscode-marquee/notes-widget': activateNotesWidget,
'@vscode-marquee/snippets-widget': activateSnippetsWidget
'@vscode-marquee/snippets-widget': activateSnippetsWidget,
'@vscode-marquee/project-info': activateProjectInfoWidget
}

interface ExportFormat<T = any> {
Expand Down Expand Up @@ -228,6 +230,12 @@ export default class StateManager implements vscode.Disposable {
)?.exports.marquee.disposable as SnippetExtensionManager
}

get projectInfoWidget () {
return this.widgetExtensions.find(
(e) => e.id === '@vscode-marquee/project-info-widget'
)?.exports.marquee.disposable as ProjectInfoExtensionManager
}

get global () {
return this.widgetExtensions.find(
(e) => e.id === '@vscode-marquee/utils'
Expand Down
4 changes: 3 additions & 1 deletion packages/gui/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Todo from '@vscode-marquee/widget-todo'
import Notes from '@vscode-marquee/widget-notes'
import Snippets from '@vscode-marquee/widget-snippets'
import Projects from '@vscode-marquee/widget-projects'
import ProjectInfo from '@vscode-marquee/widget-project-info'

import { WidgetConfig, Theme, State, Configuration, LayoutType } from './types'

Expand All @@ -26,7 +27,8 @@ export const widgetConfig: WidgetConfig[] = [
Weather,
Projects,
Snippets,
Notes
Notes,
ProjectInfo
] as WidgetConfig[]
export const SENTRY_DNS = 'https://6e86226331e84bd9885554fdac788ce7@o481102.ingest.sentry.io/5543775'
export const themes: Theme[] = [
Expand Down
Loading

0 comments on commit cecb751

Please sign in to comment.