Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement status bar #338

Merged
merged 1 commit into from Jul 22, 2022
Merged

feat: implement status bar #338

merged 1 commit into from Jul 22, 2022

Conversation

vzhukovs
Copy link
Contributor

@vzhukovs vzhukovs commented Jul 22, 2022

Current changes proposal provides an implementation of status bar.

As it shown on the example below:
Снимок экрана 2022-07-22 в 11 52 23

Docker and Podman status bar items displayed as an example.

To use the following API there is an code example provided below:

import * as extensionApi from '@tmpwip/extension-api';
...
const sbItem = extensionApi.window.createStatusBarItem(
  extensionApi.StatusBarAlignLeft,
  extensionApi.StatusBarItemDefaultPriority,
);
//const sbItem = extensionApi.window.createStatusBarItem();
//const sbItem = extensionApi.window.createStatusBarItem(
//  extensionApi.StatusBarAlignLeft,
//);
sbItem.text = 'Podman';
sbItem.iconClass = { active: 'fa fa-toggle-on', inactive: 'fa fa-toggle-off' };
//sbItem.iconClass = 'fa fa-toggle-on';
sbItem.tooltip = 'Podman Engine';
sbItem.command = 'commandId';
sbItem.commandArgs = ['arg1', 'arg2'];
sbItem.enabled = true;
sbItem.show();

By default, help icon moved from the title bar to the status bar and displayed to the right.

fixes #263

Signed-off-by: Vladyslav Zhukovskyi vzhukovs@redhat.com

@vzhukovs vzhukovs requested a review from benoitf as a code owner July 22, 2022 08:58
@vzhukovs vzhukovs self-assigned this Jul 22, 2022
Copy link
Collaborator

@benoitf benoitf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good job 👍

@slemeur
Copy link
Collaborator

slemeur commented Jul 22, 2022

Looks cool ! Good job @vzhukovs !

Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
@vzhukovs vzhukovs merged commit 90319bc into main Jul 22, 2022
@vzhukovs vzhukovs deleted the pd#263 branch July 22, 2022 11:26
@podman-desktop-bot podman-desktop-bot added this to the 0.0.6 milestone Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adds a status bar
4 participants