Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 0 additions & 59 deletions app/components/options/CXPExtensionRegistry.tsx

This file was deleted.

4 changes: 3 additions & 1 deletion app/components/options/FeatureFlagCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react'
import { Card, CardBody, CardHeader, Col, Form, FormGroup, Input, Label, Row } from 'reactstrap'
import storage from '../../../extension/storage'
import { StorageItems } from '../../../extension/types'
import { sourcegraphUrl } from '../../util/context'

interface Props {
storage: StorageItems
Expand Down Expand Up @@ -91,7 +92,8 @@ export class FeatureFlagCard extends React.Component<Props, {}> {
<FormGroup check={true}>
<Label check={true}>
<Input onClick={this.onUseCXPToggled} defaultChecked={useCXP} type="checkbox" />{' '}
Use Sourcegraph extensions
Use Sourcegraph extensions (visit the registry at{' '}
<a href={`${sourcegraphUrl}/extensions`}>{`${sourcegraphUrl}/extensions`}</a>)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any tips on wording here?

</Label>
</FormGroup>
<FormGroup check={true}>
Expand Down
20 changes: 1 addition & 19 deletions app/components/options/OptionsDashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
import * as React from 'react'
import { Redirect, Route, Switch } from 'react-router'
import { Route, Switch } from 'react-router'
import { HashRouter } from 'react-router-dom'
import { sourcegraphUrl } from '../../util/context'
import { CXPExtensionRegistry } from './CXPExtensionRegistry'
import { OptionsConfiguration } from './OptionsConfiguration'
import { OptionsPageSidebar } from './OptionsPageSidebar'

const EXTENSION_ROUTE = '/extensions/:url/:author/:extension?'

export class OptionsDashboard extends React.Component<any, {}> {
/**
* extensionRedirectComponent redirects to the extension page on Sourcegraph instead of showing
* the extension in the options page and keeps the user on the extension registry page.
*/
private extensionRedirectComponent = (): JSX.Element | null => {
const extensionUrl = window.location.hash.replace('#', sourcegraphUrl)
window.open(extensionUrl, '_blank')
return <Redirect from={EXTENSION_ROUTE} to="/extensions" />
}

public render(): JSX.Element {
return (
<HashRouter>
<div className="site-admin-area area">
<OptionsPageSidebar className="area__sidebar" />
<div className="area__content">
<Switch>
<Route path="/" component={OptionsConfiguration} exact={true} />
<Route path="/extensions" component={CXPExtensionRegistry} exact={true} />
<Route path={EXTENSION_ROUTE} component={this.extensionRedirectComponent} />
</Switch>
</div>
</div>
Expand Down
62 changes: 0 additions & 62 deletions app/components/options/OptionsPageSidebar.tsx

This file was deleted.

54 changes: 0 additions & 54 deletions app/extensions-client-common.scss
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
@import 'node_modules/@sourcegraph/extensions-client-common/lib/ui/generic/PopoverButton.css';
@import 'node_modules/@sourcegraph/extensions-client-common/lib/ui/generic/Toggle.css';
@import 'node_modules/@sourcegraph/extensions-client-common/lib/app/CommandList';
@import 'node_modules/@sourcegraph/extensions-client-common/lib/app/ExtensionStatus';
@import 'node_modules/@sourcegraph/extensions-client-common/lib/extensions/manager/ExtensionCard.css';

$body-color-light: #2b3750;
$body-color-dark: #f2f4f8;

.theme-light {
--body-color: #{$body-color-light};
--body-bg: white;
--text-muted: #{$color-light-text-2};
--link-color: #566e9f;
--link-hover-color: #1d2535;
--extension-card-bg: #{lighten($color-light-bg-2, 2.5%)};
}
.theme-dark {
--body-color: #{$body-color-dark};
--body-bg: #151c28;
--text-muted: #{$color-text-1};
--link-color: #a2b0cd;
--link-hover-color: white;
--extension-card-bg: #{$color-bg-2};
}

.command-list {
@import 'node_modules/bootstrap/scss/list-group';
Expand All @@ -40,37 +17,6 @@ $body-color-dark: #f2f4f8;
right: 0;
}

.configured-extensions-list {
h1 {
font-size: 32px;
line-height: 40px;
font-weight: 600;
margin: 0 0 1rem;
}
h2 {
font-size: 24px;
line-height: 32px;
font-weight: 600;
}
h3 {
font-size: 16px;
line-height: 24px;
font-weight: 600;
}
h4 {
font-size: 14px;
line-height: 20px;
font-weight: 600;
}
h5 {
font-size: 12px;
letter-spacing: 1px;
font-weight: 500;
text-transform: uppercase;
margin: 0;
}
}

:root {
--primary-opacity-2: #{transparentize($primary, 0.8)};
--dropdown-bg: #{$color-light-bg-1};
Expand Down
10 changes: 0 additions & 10 deletions app/options.scss
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,6 @@
&-label {
padding-top: 2px;
}

&-textarea {
width: 100%;
font-size: 14px;
border-color: #e4e9f1;
margin-bottom: 1rem;
// !important overrides Bootstrap's `height: auto`
height: 18rem !important;
font-family: $code-font-family;
}
}

&__button-icon {
Expand Down
13 changes: 0 additions & 13 deletions chrome/views/cxp.html

This file was deleted.

Loading