Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 3e47d01

Browse files
committed
feat: GitHubIcon status stripe component
1 parent 291d158 commit 3e47d01

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright 2022 The Kubernetes Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import React from 'react'
18+
import { homepage } from '@kui-shell/client/package.json'
19+
20+
import Icons from '../../spi/Icons'
21+
22+
export default function GitHubIcon() {
23+
return (
24+
<a
25+
target="_blank"
26+
rel="noopener noreferrer"
27+
title="Visit our GitHub page"
28+
href={homepage}
29+
className="kui--status-stripe-element-clickable kui--status-stripe-element"
30+
>
31+
<Icons icon="Github" className="somewhat-larger-text" />
32+
</a>
33+
)
34+
}

plugins/plugin-client-common/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export { default as TabContent } from './components/Client/TabContent'
3636
export { default as TabModel, uuid as allocateTabUUID } from './components/Client/TabModel'
3737
export { default as StatusStripe } from './components/Client/StatusStripe'
3838
export { default as CurrentWorkingDirectory } from './components/Client/StatusStripe/CurrentWorkingDirectory'
39+
export { default as GitHubIcon } from './components/Client/StatusStripe/GitHubIcon'
3940
export { default as MadeWithKui } from './components/Client/StatusStripe/MadeWithKui'
4041
export { default as SpaceFiller } from './components/Client/StatusStripe/SpaceFiller'
4142
export { default as MeterWidgets } from './components/Client/StatusStripe/MeterWidgets'

plugins/plugin-client-default/src/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import { Capabilities } from '@kui-shell/core'
2020
import {
2121
Kui,
2222
KuiProps,
23+
Settings,
24+
GitHubIcon,
2325
ContextWidgets,
2426
MeterWidgets,
2527
CurrentWorkingDirectory,
@@ -80,6 +82,7 @@ export default function renderMain(props: KuiProps) {
8082
return (
8183
<Kui
8284
noHelp
85+
noSettings
8386
version={version}
8487
productName={productName}
8588
lightweightTables
@@ -123,6 +126,8 @@ export default function renderMain(props: KuiProps) {
123126
{/* !isPopup && <OpenWhiskGridWidget /> */}
124127
{Capabilities.inBrowser() && <ProxyOfflineIndicator />}
125128
{!isPopup && !Capabilities.inBrowser() && <UpdateChecker />}
129+
<Settings />
130+
<GitHubIcon />
126131
</MeterWidgets>
127132
</Kui>
128133
)

0 commit comments

Comments
 (0)