-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
@@ -76,6 +76,7 @@ let configurationWindow = undefined; | |||
let podmanWindow = undefined; | |||
let setupWindow = undefined; | |||
let pullsecretChangeWindow = undefined; | |||
let aboutWindow = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to also destroy this window in the quitApp()
function https://github.com/code-ready/tray-electron/blob/9cf6b7e91d59407a2c5878047133ea7ad0ef6d4b/main.js#L488
Without it am not able to exit the tray, and other exceptions are thrown when trying to do that
}, | ||
|
||
about: () => { | ||
return ipcRenderer.invoke('get-about'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽 nice, with invoke
values can be returned, till now we were only using send
and reply
Tested and working as expected, apart from #131 (comment) LGTM Maybe squash all the commits into one? |
Be aware that we also have a Podman version. However, that is dependent on the 'version' + 'preset' value. This is done in the Discuss this with @praveenkumar and @anjannath maybe. Will also think about this some more. The problem is that this version is part of the bundle metadata. And we can't show both... perhaps not rely on it all and leave it in the MiniStatus as the only place? |
main.js
Outdated
appVersion: app.getVersion(), | ||
crcVersion: version.CrcVersion, | ||
ocpBundleVersion: version.OpenshiftVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the situation when the podman preset is chosen? In that case the version is not the OCP version.
That was the problem I referred to in: #125 (comment)
</div> | ||
<div className={styles.clearBoth}> | ||
<span className={styles.alignLeft}>Red Hat OpenShift Container Platform</span> | ||
<span className={styles.alignRight}>{this.state.ocpBundleVersion}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also a podmanVersion
.
Also make sure to link the issue: |
height: 450, | ||
resizable: false, | ||
show: false, | ||
title: 'About', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, first to do #89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to remove <title>
tag from index.html
, as title
will be ignored if <title>
is set.
|
||
async componentDidMount(): Promise<void> { | ||
// need to set title there, as index.html contains '<title>' | ||
window.document.title = "About"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't the window creation not already set this?
We need to update all windows as part of #89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, see #131 (comment)
@@ -0,0 +1,29 @@ | |||
.alignLeft { | |||
float: left; | |||
font-weight: bold; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it almost feels in the images if the .alignRight
also has a font-weight: bold
assigned.
Can't check right now.
@gbraad @anjannath Also for CRC it will show commit in version Could you look again on this? |
Signed-off-by: Yevhen Vydolob <[email protected]>
9afc543
to
16d2891
Compare
} | ||
|
||
private openDocumentation(): void { | ||
window.api.openLinkInDefaultBrowser(`https://access.redhat.com/documentation/en-us/red_hat_codeready_containers/${this.state.crcVersion}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
this will make it easier to track with segment
Signed-off-by: Yevhen Vydolob <[email protected]>
@@ -51,15 +46,10 @@ export class AboutWindow extends React.Component { | |||
|
|||
<div className={styles.linksBox}> | |||
<span className={styles.alignLeft}> | |||
<Button variant="link" className={styles.docButton} icon={<ExternalLinkSquareAltIcon />} iconPosition="right" component="a" onClick={this.openDocumentation} target="_blank"> | |||
<Button variant="link" className={styles.docButton} icon={<ExternalLinkSquareAltIcon />} iconPosition="right" component="a" onClick={this.openDocumentationLink} target="_blank"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now since there's only one, maybe center align it? don't how it'd look, we can do it later though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
center align looks weird, like it is a button to press
This PR add new command
![Screenshot 2022-02-03 at 12 29 37](https://user-images.githubusercontent.com/929743/152325406-7338abda-b4f9-497c-957c-a3b9becfec9b.png)
About
in trey context menu:The
About
window on mac:Also this PR add implemented with TypeScript, it brings
tsconfig.json
and some*.d.ts
files with types.Tray version taken from
app.getVersion()
, electron take it frompackage.json
of app, so we need to update it during releaseAlso I not sure about
bundle
version, for now I useOpenShiftVersion
value witch return by/version
daemon call.