Hot reload item: a word only in the warning states
Flame alone while idle, starting, watching or applied; "failed" and "restart needed" get their text back, since those are the moments the colour alone does not explain. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
This commit is contained in:
@@ -110,7 +110,7 @@ title is the same session.
|
|||||||
|
|
||||||
| Action | How |
|
| Action | How |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| Start | The `$(flame)` status bar item (icon only; the state is in its colour and tooltip), *.NET Solution: Run Startup Project with Hot Reload*, or `Ctrl+Alt+F5` |
|
| Start | The `$(flame)` status bar item (icon only; it gains a word — *failed*, *restart needed* — only when something needs you), *.NET Solution: Run Startup Project with Hot Reload*, or `Ctrl+Alt+F5` |
|
||||||
| Apply, restart, attach, stop | Click the status bar item while it runs — one menu for all of them |
|
| Apply, restart, attach, stop | Click the status bar item while it runs — one menu for all of them |
|
||||||
| Restart the application | Also `Ctrl+R` inside the watch terminal |
|
| Restart the application | Also `Ctrl+R` inside the watch terminal |
|
||||||
|
|
||||||
|
|||||||
@@ -53,10 +53,13 @@ export class HotReloadController implements vscode.Disposable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Icon only: the state shows through the icon and the warning colour, the words
|
// Icon only while things are fine; a word only when something needs attention.
|
||||||
// live in the tooltip. A small debugger mark is added while one is attached.
|
// "watching" and "applied" are the normal course of a session and would just be
|
||||||
|
// a wider flame, but "failed" and "restart needed" are the moments you would
|
||||||
|
// otherwise wonder why the app did not change.
|
||||||
const debuggerMark = this.link?.busy ? '$(loading~spin)' : this.link?.attached ? '$(debug)' : '';
|
const debuggerMark = this.link?.busy ? '$(loading~spin)' : this.link?.attached ? '$(debug)' : '';
|
||||||
this.item.text = `$(${label.icon})${debuggerMark}`;
|
const word = label.warn ? ` ${label.text.replace(/^Hot Reload:\s*/, '')}` : '';
|
||||||
|
this.item.text = `$(${label.icon})${word}${debuggerMark}`;
|
||||||
this.item.backgroundColor = label.warn ? new vscode.ThemeColor('statusBarItem.warningBackground') : undefined;
|
this.item.backgroundColor = label.warn ? new vscode.ThemeColor('statusBarItem.warningBackground') : undefined;
|
||||||
this.item.command = this.session?.running ? 'dotnetSolution.hotReload.menu' : 'dotnetSolution.hotReload.start';
|
this.item.command = this.session?.running ? 'dotnetSolution.hotReload.menu' : 'dotnetSolution.hotReload.start';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user