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

Fine-tune styles of Extensions page

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-07-27 13:02:38 +03:00
parent a12b94405a
commit 23aa88b22d
5 changed files with 46 additions and 57 deletions

View File

@ -0,0 +1,9 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
.notice {
margin-top: var(--margin);
margin-bottom: calc(var(--margin) * 3);
}

View File

@ -1,43 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
.PageLayout.Extensions {
$spacing: $padding * 2;
width: 100%;
.contentRegion {
.content {
max-width: 740px;
> section {
height: 100%;
}
}
}
}
.InstallingExtensionNotification {
.remove-folder-warning {
font-size: $font-size-small;
font-style: italic;
opacity: .8;
cursor: pointer;
&:hover {
opacity: 1;
}
code {
display: inline;
color: inherit;
}
}
.Button {
background-color: unset;
border: 1px solid currentColor;
box-shadow: none !important;
}
}

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import "./extensions.scss"; import styles from "./extensions.module.scss";
import type { import type {
IComputedValue } from "mobx"; IComputedValue } from "mobx";
import { import {
@ -82,7 +82,7 @@ class NonInjectedExtensions extends React.Component<Dependencies> {
<section> <section>
<h1>Extensions</h1> <h1>Extensions</h1>
<Notice className="mb-14 mt-3"> <Notice className={styles.notice}>
<p> <p>
{"Add new features via Lens Extensions. Check out the "} {"Add new features via Lens Extensions. Check out the "}
<a <a
@ -112,8 +112,6 @@ class NonInjectedExtensions extends React.Component<Dependencies> {
installPath={this.installPath} installPath={this.installPath}
/> />
{userExtensions.length > 0 && <hr />}
<InstalledExtensions <InstalledExtensions
extensions={userExtensions} extensions={userExtensions}
enable={this.props.enableExtension} enable={this.props.enableExtension}

View File

@ -1,4 +1,29 @@
.icon { /**
@apply h-5 w-5 mr-3 cursor-pointer; * Copyright (c) OpenLens Authors. All rights reserved.
background-color: transparent!important; * Licensed under MIT License. See LICENSE in root directory for more information.
*/
.inputs {
display: grid;
justify-content: space-between;
gap: calc(var(--unit) * 2);
grid-template-columns: 1fr 220px;
}
.icon {
margin-left: var(--margin);
}
.proTip {
margin-top: calc(var(--margin) / 2);
opacity: 0.7;
}
.button {
width: 100%;
height: 100%;
&:focus {
box-shadow: none;
}
} }

View File

@ -46,16 +46,15 @@ const NonInjectedInstall: React.FC<Dependencies & InstallProps> = ({
installFromSelectFileDialog, installFromSelectFileDialog,
extensionInstallationStateStore, extensionInstallationStateStore,
}) => ( }) => (
<section className="mt-2"> <section>
<SubTitle <SubTitle
title={`Name or file path or URL to an extension package (${supportedFormats.join( title={`Name or file path or URL to an extension package (${supportedFormats.join(
", ", ", ",
)})`} )})`}
/> />
<div className="flex"> <div className={styles.inputs}>
<div className="flex-1"> <div>
<Input <Input
className="box grow mr-6"
theme="round-black" theme="round-black"
disabled={ disabled={
extensionInstallationStateStore.anyPreInstallingOrInstalling extensionInstallationStateStore.anyPreInstallingOrInstalling
@ -69,6 +68,7 @@ const NonInjectedInstall: React.FC<Dependencies & InstallProps> = ({
iconRight={( iconRight={(
<Icon <Icon
className={styles.icon} className={styles.icon}
smallest
material="folder_open" material="folder_open"
onClick={prevDefault(installFromSelectFileDialog)} onClick={prevDefault(installFromSelectFileDialog)}
tooltip="Browse" tooltip="Browse"
@ -76,11 +76,11 @@ const NonInjectedInstall: React.FC<Dependencies & InstallProps> = ({
)} )}
/> />
</div> </div>
<div className="flex-initial"> <div>
<Button <Button
className={styles.button}
primary primary
label="Install" label="Install"
className="w-80 h-full"
disabled={ disabled={
extensionInstallationStateStore.anyPreInstallingOrInstalling extensionInstallationStateStore.anyPreInstallingOrInstalling
} }
@ -89,7 +89,7 @@ const NonInjectedInstall: React.FC<Dependencies & InstallProps> = ({
/> />
</div> </div>
</div> </div>
<small className="mt-3"> <small className={styles.proTip}>
<b>Pro-Tip</b> <b>Pro-Tip</b>
: you can drag-n-drop tarball-file to this area : you can drag-n-drop tarball-file to this area
</small> </small>