* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import * as classNames from 'classnames';
import GlobalNav from './nav/global/GlobalNav';
import StartupModal from './StartupModal';
import GlobalFooterContainer from './GlobalFooterContainer';
import GlobalMessagesContainer from './GlobalMessagesContainer';
import SuggestionsProvider from './embed-docs-modal/SuggestionsProvider';
import Workspace from '../../components/workspace/Workspace';
+import { isSonarCloud } from '../../helpers/system';
+import '../styles/sonarcloud.css';
interface Props {
children: React.ReactNode;
return (
<SuggestionsProvider>
<StartupModal>
- <div className="global-container">
+ <div className={classNames('global-container', { sonarcloud: isSonarCloud() })}>
<div className="page-wrapper" id="container">
<div className="page-container">
<Workspace>
import DeferredSpinner from '../../../components/common/DeferredSpinner';
import Modal from '../../../components/controls/Modal';
import { PrismicFeatureNews } from '../../../api/news';
-import { differenceInSeconds, parseDate } from '../../../helpers/dates';
+import { differenceInSeconds } from '../../../helpers/dates';
import { translate } from '../../../helpers/l10n';
export interface Props {
}
export function isUnread(index: number, notificationDate: string, lastReadDate?: Date) {
- return !lastReadDate
- ? index < 1
- : differenceInSeconds(parseDate(notificationDate), lastReadDate) > 0;
+ return !lastReadDate ? index < 1 : differenceInSeconds(notificationDate, lastReadDate) > 0;
}
interface NotificationProps {
}
export function Notification({ notification, unread }: NotificationProps) {
- const publicationDate = parseDate(notification.publicationDate);
return (
<div className={classNames('notifications-sidebar-slice', { unread })}>
<h4>
- <DateFormatter date={publicationDate} long={false} />
+ <DateFormatter date={notification.publicationDate} long={false} />
</h4>
{notification.features.map((feature, index) => (
<Feature feature={feature} key={index} />
>
<h4>
<DateFormatter
- date={2018-04-04T22:00:00.000Z}
+ date="2018-04-05"
long={false}
/>
</h4>
>
<h4>
<DateFormatter
- date={2018-04-04T22:00:00.000Z}
+ date="2018-04-05"
long={false}
/>
</h4>
.navbar-latest-notification-wrapper {
position: relative;
display: inline-block;
- padding: var(--gridSize) 34px var(--gridSize) 50px;
+ padding: var(--gridSize);
+ padding-left: 50px;
height: 28px;
max-width: 100%;
box-sizing: border-box;
overflow: hidden;
vertical-align: middle;
font-size: var(--smallFontSize);
- color: var(--sonarcloudBlack500);
- background-color: black;
text-overflow: ellipsis;
white-space: nowrap;
- border-radius: 3px;
+ color: var(--sonarcloudBlack500);
+ background-color: #000;
+ border-radius: 3px 0 0 3px;
cursor: pointer;
}
white-space: nowrap;
}
-.navbar-latest-notification .navbar-icon {
- position: absolute;
- right: 0;
- top: 0;
+.navbar-latest-notification-dismiss .navbar-icon {
height: 28px;
+ background-color: #000;
+ border-radius: 0 3px 3px 0;
padding: 9px var(--gridSize) !important;
- border-left: 2px solid #262626;
+ margin-left: 1px;
+ margin-right: var(--gridSize);
}
-.navbar-latest-notification .navbar-icon:hover path {
+.navbar-latest-notification-dismiss .navbar-icon:hover path {
fill: var(--sonarcloudBlack300) !important;
}
width: 400px;
display: flex;
flex-direction: column;
-
background: var(--sonarcloudBlack200);
-
- z-index: 900;
}
.notifications-sidebar-top {
position: relative;
padding: calc(2 * var(--gridSize));
-
border-bottom: 1px solid var(--sonarcloudBlack250);
-
background-color: var(--sonarcloudBlack100);
}
.notifications-sidebar-top .close {
position: absolute;
- top: 16px;
- right: 16px;
-
+ top: calc(2 * var(--gridSize));
+ right: calc(2 * var(--gridSize));
border: 0;
-
color: var(--sonarcloudBlack500);
}
.notifications-sidebar-content {
flex: 1 1;
- overflow-y: scroll;
+ overflow-y: auto;
}
.notifications-sidebar-footer {
}
.notifications-sidebar-slice h4 {
- padding: calc(2 * var(--gridSize)) calc(2 * var(--gridSize)) calc(var(--gridSize) / 2)
- calc(2 * var(--gridSize));
-
+ padding: calc(2 * var(--gridSize));
+ padding-bottom: calc(var(--gridSize) / 2);
background-color: var(--sonarcloudBlack200);
-
font-weight: normal;
font-size: var(--smallFontSize);
text-align: right;
.notifications-sidebar-slice .feature {
padding: calc(2 * var(--gridSize));
-
background-color: var(--sonarcloudBlack100);
-
border-top: 1px solid var(--sonarcloudBlack250);
-
overflow: hidden;
}
.notifications-sidebar-slice.unread .feature {
background-color: #e6f6ff;
-
border-color: #cee4f2;
}
margin-top: var(--gridSize);
}
-.notifications-sidebar-slice .categories {
- margin-bottom: 8px;
-}
-
.notifications-sidebar-slice .categories li {
display: inline-block;
padding: 4px;
- margin-right: 8px;
-
- border-radius: 3px;
-
- font-size: 8px;
+ margin-right: var(--gridSize);
+ font-size: 9px;
+ line-height: 8px;
text-transform: uppercase;
- color: white;
- letter-spacing: 1px;
+ font-weight: bold;
+ color: #fff;
+ border-radius: 3px;
}
small,
.small {
- font-size: 92.30769231%;
+ font-size: var(--smallFontSize);
}
.big {
- font-size: 123.07692308%;
+ font-size: var(--bigFontSize);
+}
+
+.huge {
+ font-size: var(--hugeFontSize);
}
.zero-font-size {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-/* EXTENDS components/pages.css */
-.sonarcloud.page-limited {
- padding-top: 50px;
- padding-bottom: 50px;
+.sonarcloud .global-navbar-menu-right .navbar-search {
+ flex: 0 0 310px;
}
-.sonarcloud .page-header {
- margin-bottom: 40px;
+.sonarcloud table.form {
+ width: 100%;
}
-.sonarcloud .page-title {
- font-size: var(--hugeFontSize);
- font-weight: bold;
+.sonarcloud table.form tr,
+.sonarcloud table.form td {
+ vertical-align: middle;
+}
+
+.sonarcloud table.form tr:first-child,
+.sonarcloud table.form td:first-child {
+ width: 450px;
+}
+
+.sonarcloud table.form tbody tr:nth-child(2n) {
+ background: var(--sonarcloudBlack200);
}
import { skipOnboarding } from '../../../store/users';
import * as api from '../../../api/organizations';
import * as actions from '../../../store/organizations';
-import '../../../app/styles/sonarcloud.css';
import '../../tutorials/styles.css'; // TODO remove me
interface Props {
return (
<>
<Helmet title={header} titleTemplate="%s" />
- <div className="sonarcloud page page-limited">
- <header className="page-header">
- <h1 className="page-title big-spacer-bottom">{header}</h1>
+ <div className="page page-limited huge-spacer-top huge-spacer-bottom">
+ <header className="page-header huge-spacer-bottom">
+ <h1 className="page-title huge big-spacer-bottom">
+ <strong>{header}</strong>
+ </h1>
{!importPersonalOrg &&
startedPrice !== undefined && (
<p className="page-description">
titleTemplate="%s"
/>
<div
- className="sonarcloud page page-limited"
+ className="page page-limited huge-spacer-top huge-spacer-bottom"
>
<header
- className="page-header"
+ className="page-header huge-spacer-bottom"
>
<h1
- className="page-title big-spacer-bottom"
+ className="page-title huge big-spacer-bottom"
>
- onboarding.import_organization.personal.page.header
+ <strong>
+ onboarding.import_organization.personal.page.header
+ </strong>
</h1>
</header>
<AutoPersonalOrganizationBind
titleTemplate="%s"
/>
<div
- className="sonarcloud page page-limited"
+ className="page page-limited huge-spacer-top huge-spacer-bottom"
>
<header
- className="page-header"
+ className="page-header huge-spacer-bottom"
>
<h1
- className="page-title big-spacer-bottom"
+ className="page-title huge big-spacer-bottom"
>
- onboarding.create_organization.page.header
+ <strong>
+ onboarding.create_organization.page.header
+ </strong>
</h1>
<p
className="page-description"
titleTemplate="%s"
/>
<div
- className="sonarcloud page page-limited"
+ className="page page-limited huge-spacer-top huge-spacer-bottom"
>
<header
- className="page-header"
+ className="page-header huge-spacer-bottom"
>
<h1
- className="page-title big-spacer-bottom"
+ className="page-title huge big-spacer-bottom"
>
- onboarding.create_organization.page.header
+ <strong>
+ onboarding.create_organization.page.header
+ </strong>
</h1>
<p
className="page-description"
titleTemplate="%s"
/>
<div
- className="sonarcloud page page-limited"
+ className="page page-limited huge-spacer-top huge-spacer-bottom"
>
<header
- className="page-header"
+ className="page-header huge-spacer-bottom"
>
<h1
- className="page-title big-spacer-bottom"
+ className="page-title huge big-spacer-bottom"
>
- onboarding.create_organization.page.header
+ <strong>
+ onboarding.create_organization.page.header
+ </strong>
</h1>
<p
className="page-description"
titleTemplate="%s"
/>
<div
- className="sonarcloud page page-limited"
+ className="page page-limited huge-spacer-top huge-spacer-bottom"
>
<header
- className="page-header"
+ className="page-header huge-spacer-bottom"
>
<h1
- className="page-title big-spacer-bottom"
+ className="page-title huge big-spacer-bottom"
>
- onboarding.create_organization.page.header
+ <strong>
+ onboarding.create_organization.page.header
+ </strong>
</h1>
<p
className="page-description"
titleTemplate="%s"
/>
<div
- className="sonarcloud page page-limited"
+ className="page page-limited huge-spacer-top huge-spacer-bottom"
>
<header
- className="page-header"
+ className="page-header huge-spacer-bottom"
>
<h1
- className="page-title big-spacer-bottom"
+ className="page-title huge big-spacer-bottom"
>
- onboarding.create_organization.page.header
+ <strong>
+ onboarding.create_organization.page.header
+ </strong>
</h1>
<p
className="page-description"
import { hasAdvancedALMIntegration } from '../../../helpers/almIntegrations';
import { translate } from '../../../helpers/l10n';
import { getProjectUrl, getOrganizationUrl } from '../../../helpers/urls';
-import '../../../app/styles/sonarcloud.css';
import './style.css';
interface Props {
return (
<>
<Helmet title={header} titleTemplate="%s" />
- <div className="sonarcloud page page-limited">
- <header className="page-header">
- <h1 className="page-title">{header}</h1>
+ <div className="page page-limited huge-spacer-top huge-spacer-bottom">
+ <header className="page-header huge-spacer-bottom">
+ <h1 className="page-title huge">
+ <strong>{header}</strong>
+ </h1>
</header>
{loading ? (
<DeferredSpinner />
titleTemplate="%s"
/>
<div
- className="sonarcloud page page-limited"
+ className="page page-limited huge-spacer-top huge-spacer-bottom"
>
<header
- className="page-header"
+ className="page-header huge-spacer-bottom"
>
<h1
- className="page-title"
+ className="page-title huge"
>
- onboarding.create_project.header
+ <strong>
+ onboarding.create_project.header
+ </strong>
</h1>
</header>
<DeferredSpinner
titleTemplate="%s"
/>
<div
- className="sonarcloud page page-limited"
+ className="page page-limited huge-spacer-top huge-spacer-bottom"
>
<header
- className="page-header"
+ className="page-header huge-spacer-bottom"
>
<h1
- className="page-title"
+ className="page-title huge"
>
- onboarding.create_project.header
+ <strong>
+ onboarding.create_project.header
+ </strong>
</h1>
</header>
<Tabs
titleTemplate="%s"
/>
<div
- className="sonarcloud page page-limited"
+ className="page page-limited huge-spacer-top huge-spacer-bottom"
>
<header
- className="page-header"
+ className="page-header huge-spacer-bottom"
>
<h1
- className="page-title"
+ className="page-title huge"
>
- onboarding.create_project.header
+ <strong>
+ onboarding.create_project.header
+ </strong>
</h1>
</header>
<ManualProjectCreate
titleTemplate="%s"
/>
<div
- className="sonarcloud page page-limited"
+ className="page page-limited huge-spacer-top huge-spacer-bottom"
>
<header
- className="page-header"
+ className="page-header huge-spacer-bottom"
>
<h1
- className="page-title"
+ className="page-title huge"
>
- onboarding.create_project.header
+ <strong>
+ onboarding.create_project.header
+ </strong>
</h1>
</header>
<Tabs
import { translate } from '../../../helpers/l10n';
import { isLoggedIn } from '../../../helpers/users';
import { getCurrentUser, Store } from '../../../store/rootReducer';
-import '../../../app/styles/sonarcloud.css';
import { Alert } from '../../../components/ui/Alert';
interface OwnProps {
return (
<div className="page page-limited">
<div className="overview page-with-sidebar">
- <div className="overview-main page-main sonarcloud">
+ <div className="overview-main page-main">
{isLoggedIn(currentUser) && isMainBranch(branchLike) ? (
<>
{hasBranches && (
className="overview page-with-sidebar"
>
<div
- className="overview-main page-main sonarcloud"
+ className="overview-main page-main"
>
<AnalyzeTutorial
component={
className="overview page-with-sidebar"
>
<div
- className="overview-main page-main sonarcloud"
+ className="overview-main page-main"
/>
<div
className="overview-sidebar page-sidebar-fixed"
className="overview page-with-sidebar"
>
<div
- className="overview-main page-main sonarcloud"
+ className="overview-main page-main"
>
<WarningMessage
branchLike={
className="overview page-with-sidebar"
>
<div
- className="overview-main page-main sonarcloud"
+ className="overview-main page-main"
>
<WarningMessage
branchLike={
return _isSameDay(dateLeft, dateRight);
}
-export function differenceInYears(dateLeft: Date, dateRight: Date): number {
+export function differenceInYears(dateLeft: ParsableDate, dateRight: ParsableDate): number {
return _differenceInYears(dateLeft, dateRight);
}
-export function differenceInDays(dateLeft: Date, dateRight: Date): number {
+export function differenceInDays(dateLeft: ParsableDate, dateRight: ParsableDate): number {
return _differenceInDays(dateLeft, dateRight);
}
-export function differenceInSeconds(dateLeft: Date, dateRight: Date): number {
+export function differenceInSeconds(dateLeft: ParsableDate, dateRight: ParsableDate): number {
return _differenceInSeconds(dateLeft, dateRight);
}