mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Sync kubeconfigs from catalog (#3573)
* Kubeconfig syncs from Catalog Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Allow to select directory to sync Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Convert Preferences to Route-based component Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Jump from notification to Preferences Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Adding navigateWithoutHistoryChange() method Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Cleaning up Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fixing integration tests (no check for Telemetry tab) Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fixing tests harder Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
2760178196
commit
b7be3ae21a
22 files changed
+672
-317
No files matched your search
@@ -36,6 +36,14 @@ export interface SettingLayoutProps extends React.DOMAttributes<any> {
|
||||
back?: (evt: React.MouseEvent | KeyboardEvent) => void;
|
||||
}
|
||||
|
||||
function scrollToAnchor() {
|
||||
const { hash } = window.location;
|
||||
|
||||
if (hash) {
|
||||
document.querySelector(`${hash}`).scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
const defaultProps: Partial<SettingLayoutProps> = {
|
||||
provideBackButtonNavigation: true,
|
||||
contentGaps: true,
|
||||
@@ -59,6 +67,8 @@ export class SettingLayout extends React.Component<SettingLayoutProps> {
|
||||
|
||||
async componentDidMount() {
|
||||
window.addEventListener("keydown", this.onEscapeKey);
|
||||
|
||||
scrollToAnchor();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
@@ -79,7 +89,7 @@ export class SettingLayout extends React.Component<SettingLayoutProps> {
|
||||
render() {
|
||||
const {
|
||||
contentClass, provideBackButtonNavigation,
|
||||
contentGaps, navigation, children, ...elemProps
|
||||
contentGaps, navigation, children, back, ...elemProps
|
||||
} = this.props;
|
||||
const className = cssNames("SettingLayout", { showNavigation: navigation }, this.props.className);
|
||||
|
||||
|
||||
Reference in new issue
Block a user