1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

more ui/ux tweaks & fixes

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-11-20 00:24:27 +02:00
parent 3df6c073e9
commit 97bcb492f9
3 changed files with 23 additions and 16 deletions

View File

@ -31,6 +31,11 @@
.extensions-path { .extensions-path {
word-break: break-all; word-break: break-all;
&:hover code {
color: $textColorSecondary;
cursor: pointer;
}
} }
.WizardLayout { .WizardLayout {

View File

@ -36,14 +36,15 @@ export class Extensions extends React.Component {
} }
selectLocalExtensionsDialog = async () => { selectLocalExtensionsDialog = async () => {
const supportedFormats = [".tgz", ".tar.gz"]
const { dialog, BrowserWindow, app } = remote; const { dialog, BrowserWindow, app } = remote;
const { canceled, filePaths } = await dialog.showOpenDialog(BrowserWindow.getFocusedWindow(), { const { canceled, filePaths } = await dialog.showOpenDialog(BrowserWindow.getFocusedWindow(), {
defaultPath: app.getPath("downloads"), defaultPath: app.getPath("downloads"),
properties: ["openFile", "multiSelections"], properties: ["openFile", "multiSelections"],
message: _i18n._(t`Select extensions to add to Lens (*.tgz`), message: _i18n._(t`Select extensions to install (supported: ${supportedFormats.join(", ")}), `),
buttonLabel: _i18n._(t`Use configuration`), buttonLabel: _i18n._(t`Use configuration`),
filters: [ filters: [
{ name: "tarball", extensions: [".tgz", ".tar.gz"] } { name: "tarball", extensions: supportedFormats }
] ]
}); });
if (!canceled && filePaths.length) { if (!canceled && filePaths.length) {
@ -79,19 +80,21 @@ export class Extensions extends React.Component {
features of Lens are built as extensions and use the same Extension API. features of Lens are built as extensions and use the same Extension API.
</div> </div>
<div> <div>
<em>Extensions installed and loaded from</em> <em>All custom extensions located in:</em>
<div className="extensions-path flex inline"> <div className="extensions-path flex inline" onClick={() => shell.openPath(this.extensionsPath)}>
<Icon material="folder" tooltip={{ children: "Open folder", preferredPositions: "bottom" }}/>
<code>{this.extensionsPath}</code> <code>{this.extensionsPath}</code>
<Icon
material="folder"
tooltip="Open folder"
onClick={() => shell.openPath(this.extensionsPath)}
/>
</div> </div>
</div> </div>
<div className="install-extension flex column gaps"> <div className="install-extension flex column gaps">
<em>Install extensions from local file-system or URL:</em> <em>Install extensions from local file-system or URL:</em>
<div className="install-extension-by-url flex gaps align-center"> <div className="install-extension-by-url flex gaps align-center">
<Icon
material="get_app"
tooltip={{ children: "Download and Install", preferredPositions: "bottom" }}
interactive={this.downloadUrl.length > 0}
onClick={this.installFromUrl}
/>
<Input <Input
showErrorsAsTooltip={true} showErrorsAsTooltip={true}
className="box grow" className="box grow"
@ -103,12 +106,6 @@ export class Extensions extends React.Component {
onSubmit={this.installFromUrl} onSubmit={this.installFromUrl}
ref={e => this.input = e} ref={e => this.input = e}
/> />
<Icon
material="get_app"
tooltip="Download and install"
interactive={this.downloadUrl.length > 0}
onClick={this.installFromUrl}
/>
</div> </div>
<Button <Button
primary primary

View File

@ -88,6 +88,11 @@
//- Themes //- Themes
&.theme { &.theme {
&.invalid {
box-shadow: 0 0 0 2px $colorError;
border-radius: $radius;
}
&.round-black { &.round-black {
label { label {
background: $mainBackground; background: $mainBackground;
@ -110,6 +115,6 @@
.Tooltip.InputTooltipError { .Tooltip.InputTooltipError {
--bgc: #{$colorError}; --bgc: #{$colorError};
--border: 1px solid $colorSoftError;
--color: white; --color: white;
--border: 1px solid currentColor;
} }