All required fields are checked.
} diff --git a/config-ui/src/plugins/register/github/transformation.tsx b/config-ui/src/plugins/register/github/transformation.tsx index 0581e931534..dcb61633ae9 100644 --- a/config-ui/src/plugins/register/github/transformation.tsx +++ b/config-ui/src/plugins/register/github/transformation.tsx @@ -277,7 +277,7 @@ const renderCollapseItems = ({ }) } /> - * + *Make sure the IAM role has the necessary S3 permissions to access your bucket. No additional credentials are required when using IAM role authentication. @@ -217,7 +224,7 @@ export const AwsCredentials = ({ type, initialValues, values, setValues, setErro onChange={handleRegionChange} status={regionError ? 'error' : ''} /> - {regionError &&
Please try again, if the problem persists include the above error message when filing a bug report on{' '}
diff --git a/config-ui/src/routes/layout/layout.tsx b/config-ui/src/routes/layout/layout.tsx
index 5d7a02e661f..0d12eb5c3d0 100644
--- a/config-ui/src/routes/layout/layout.tsx
+++ b/config-ui/src/routes/layout/layout.tsx
@@ -19,17 +19,29 @@
import { useState, useEffect, useMemo } from 'react';
import { useLoaderData, Outlet, useNavigate, useLocation } from 'react-router-dom';
import { Helmet } from 'react-helmet';
-import { Layout as AntdLayout, Menu, Divider, Dropdown, Button } from 'antd';
-import { UserOutlined, LogoutOutlined } from '@ant-design/icons';
+import { Layout as AntdLayout, Menu, Divider, Dropdown, Button, Tooltip } from 'antd';
+import { UserOutlined, LogoutOutlined, SunOutlined, MoonOutlined, DesktopOutlined } from '@ant-design/icons';
import API from '@/api';
import { PageLoading, Logo, ExternalLink } from '@/components';
-import { init, selectError, selectStatus } from '@/features';
+import { init, selectError, selectStatus, cycleMode, selectThemeMode } from '@/features';
import { OnboardCard } from '@/routes/onboard/components';
import { useAppDispatch, useAppSelector } from '@/hooks';
import { menuItems, menuItemsMatch, headerItems } from './config';
+const themeIcon = {
+ light:
diff --git a/config-ui/src/routes/onboard/index.tsx b/config-ui/src/routes/onboard/index.tsx
index d29ed40fbcc..1d8b1a8bc3c 100644
--- a/config-ui/src/routes/onboard/index.tsx
+++ b/config-ui/src/routes/onboard/index.tsx
@@ -123,7 +123,7 @@ export const Onboard = ({ logo, title }: Props) => {
<>
Connect to your first repository
-
diff --git a/config-ui/src/routes/onboard/styled.ts b/config-ui/src/routes/onboard/styled.ts
index 3e083694c9b..1ff0222b283 100644
--- a/config-ui/src/routes/onboard/styled.ts
+++ b/config-ui/src/routes/onboard/styled.ts
@@ -21,7 +21,7 @@ import styled from 'styled-components';
export const Wrapper = styled.div`
width: 100%;
height: 100vh;
- background-color: #f9f9fa;
+ background-color: ${({ theme }) => theme.colors.bgLayout};
`;
export const Inner = styled.div`
@@ -61,14 +61,14 @@ export const StepItem = styled.li<{ $activated: boolean; $activatedColor: string
margin-right: 8px;
width: 32px;
height: 32px;
- color: rgba(0, 0, 0, 0.25);
- border: 1px solid rgba(0, 0, 0, 0.25);
+ color: ${({ theme }) => theme.colors.textDisabled};
+ border: 1px solid ${({ theme }) => theme.colors.borderStep};
border-radius: 50%;
- ${({ $activated, $activatedColor }) =>
+ ${({ $activated, $activatedColor, theme }) =>
$activated
? `
- color: #fff;
+ color: ${theme.colors.textInverse};
background-color: ${$activatedColor};
border: none;
`
@@ -91,7 +91,7 @@ export const StepItem = styled.li<{ $activated: boolean; $activatedColor: string
left: -150px;
width: 100px;
height: 1px;
- background-color: rgba(0, 0, 0, 0.25);
+ background-color: ${({ theme }) => theme.colors.borderStep};
}
&:first-child::before {
@@ -102,7 +102,7 @@ export const StepItem = styled.li<{ $activated: boolean; $activatedColor: string
export const StepContent = styled.div`
display: flex;
height: 450px;
- background-color: #fff;
+ background-color: ${({ theme }) => theme.colors.bgContainer};
box-shadow: 0px 2.4px 4.8px -0.8px rgba(0, 0, 0, 0.1), 0px 1.6px 8px 0px rgba(0, 0, 0, 0.07);
.content {
@@ -115,7 +115,7 @@ export const StepContent = styled.div`
margin: 12px 0;
padding: 0 24px;
font-size: 14px;
- border-left: 1px solid #f0f0f0;
+ border-left: 1px solid ${({ theme }) => theme.colors.borderSubtle};
overflow-y: auto;
img {
@@ -142,7 +142,7 @@ export const StepContent = styled.div`
}
p {
- color: #6c6c6c;
+ color: ${({ theme }) => theme.colors.textBody};
}
code {
@@ -151,8 +151,8 @@ export const StepContent = styled.div`
font-family: Menlo;
line-height: 20px;
border-radius: 3px;
- border: #f0f0f0;
- background: #f5f5f5;
+ border: 1px solid ${({ theme }) => theme.colors.borderSubtle};
+ background: ${({ theme }) => theme.colors.bgCode};
}
}
`;
diff --git a/config-ui/src/routes/pipeline/styled.ts b/config-ui/src/routes/pipeline/styled.ts
index 5af0c40e801..95873a8ee60 100644
--- a/config-ui/src/routes/pipeline/styled.ts
+++ b/config-ui/src/routes/pipeline/styled.ts
@@ -21,19 +21,19 @@ import styled from 'styled-components';
export const StatusWrapper = styled.div`
&.ready,
&.cancel {
- color: #94959f;
+ color: ${({ theme }) => theme.colors.textTertiary};
}
&.loading {
- color: #7497f7;
+ color: ${({ theme }) => theme.colors.primary};
}
&.success {
- color: #4db764;
+ color: ${({ theme }) => theme.colors.success};
}
&.error {
- color: #f5222d;
+ color: ${({ theme }) => theme.colors.error};
}
`;
@@ -54,7 +54,7 @@ export const Info = styled.div`
& > span {
font-size: 12px;
- color: #94959f;
+ color: ${({ theme }) => theme.colors.textTertiary};
text-align: center;
}
@@ -68,7 +68,7 @@ export const Info = styled.div`
p.message {
margin: 8px 0 0;
- color: #f5222d;
+ color: ${({ theme }) => theme.colors.error};
}
`;
@@ -100,23 +100,23 @@ export const TasksHeader = styled.ul`
&.ready,
&.cancel {
- color: #94959f;
- background-color: #f9f9fa;
+ color: ${({ theme }) => theme.colors.textTertiary};
+ background-color: ${({ theme }) => theme.colors.bgStatus};
}
&.loading {
- color: #7497f7;
- background-color: #e9efff;
+ color: ${({ theme }) => theme.colors.primary};
+ background-color: ${({ theme }) => theme.colors.infoBg};
}
&.success {
- color: #4db764;
- background-color: #edfbf0;
+ color: ${({ theme }) => theme.colors.success};
+ background-color: ${({ theme }) => theme.colors.successBg};
}
&.error {
- color: #e34040;
- background-color: #feefef;
+ color: ${({ theme }) => theme.colors.errorAlt};
+ background-color: ${({ theme }) => theme.colors.errorBg};
}
}
@@ -146,7 +146,7 @@ export const Task = styled.div`
justify-content: space-between;
padding: 16px 0;
height: 80px;
- border-bottom: 1px solid #dbe4fd;
+ border-bottom: 1px solid ${({ theme }) => theme.colors.borderTask};
box-sizing: border-box;
.info {
@@ -181,7 +181,7 @@ export const Task = styled.div`
text-overflow: ellipsis;
&.error {
- color: #f5222d;
+ color: ${({ theme }) => theme.colors.error};
}
}
}
diff --git a/config-ui/src/routes/project/home/index.tsx b/config-ui/src/routes/project/home/index.tsx
index 228ccb48e4e..fe927c2e177 100644
--- a/config-ui/src/routes/project/home/index.tsx
+++ b/config-ui/src/routes/project/home/index.tsx
@@ -150,7 +150,7 @@ export const ProjectHomePage = () => {
{name}
diff --git a/config-ui/src/theme/ThemeProvider.tsx b/config-ui/src/theme/ThemeProvider.tsx
new file mode 100644
index 00000000000..cd825b3d538
--- /dev/null
+++ b/config-ui/src/theme/ThemeProvider.tsx
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+import { ReactNode, useEffect, useMemo, useState } from 'react';
+import { ConfigProvider } from 'antd';
+import { ThemeProvider as StyledThemeProvider } from 'styled-components';
+
+import { useAppSelector } from '@/hooks';
+import { selectThemeMode, resolveThemeMode } from '@/features/theme/slice';
+
+import { getTheme, ResolvedTheme } from './tokens';
+
+interface Props {
+ children: ReactNode;
+}
+
+const CSS_VAR_MAP: Record