You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by mi...@apache.org on 2024/01/15 03:43:38 UTC

(incubator-devlake) branch fix-theme-color created (now 8878a0937)

This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a change to branch fix-theme-color
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


      at 8878a0937 fix(config-ui): theme color config move to layout

This branch includes the following new commits:

     new 78d0b22b6 fix(config-ui): theme color missed
     new 8878a0937 fix(config-ui): theme color config move to layout

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(incubator-devlake) 02/02: fix(config-ui): theme color config move to layout

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a commit to branch fix-theme-color
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 8878a09379825745b90b9b4d4deed2af0e6f9ded
Author: mintsweet <0x...@gmail.com>
AuthorDate: Mon Jan 15 16:43:26 2024 +1300

    fix(config-ui): theme color config move to layout
---
 config-ui/src/main.tsx                 |  15 +--
 config-ui/src/routes/layout/layout.tsx | 162 +++++++++++++++++----------------
 2 files changed, 88 insertions(+), 89 deletions(-)

diff --git a/config-ui/src/main.tsx b/config-ui/src/main.tsx
index d3b35c690..e72bc3db5 100644
--- a/config-ui/src/main.tsx
+++ b/config-ui/src/main.tsx
@@ -19,7 +19,6 @@
 import ReactDOM from 'react-dom';
 import { Provider } from 'react-redux';
 import { RouterProvider } from 'react-router-dom';
-import { ConfigProvider } from 'antd';
 
 import { PageLoading } from '@/components';
 
@@ -28,16 +27,8 @@ import { router } from './app/routrer';
 import './index.css';
 
 ReactDOM.render(
-  <ConfigProvider
-    theme={{
-      token: {
-        colorPrimary: import.meta.env.DEVLAKE_COLOR_CUSTOM ?? '#7497F7',
-      },
-    }}
-  >
-    <Provider store={store}>
-      <RouterProvider router={router} fallbackElement={<PageLoading />} />
-    </Provider>
-  </ConfigProvider>,
+  <Provider store={store}>
+    <RouterProvider router={router} fallbackElement={<PageLoading />} />
+  </Provider>,
   document.getElementById('root'),
 );
diff --git a/config-ui/src/routes/layout/layout.tsx b/config-ui/src/routes/layout/layout.tsx
index f57a81a93..437afadce 100644
--- a/config-ui/src/routes/layout/layout.tsx
+++ b/config-ui/src/routes/layout/layout.tsx
@@ -20,7 +20,7 @@ import { useState, useEffect, useRef } from 'react';
 import { useLoaderData, Outlet, useNavigate, useLocation } from 'react-router-dom';
 import { CSSTransition } from 'react-transition-group';
 import { CloseOutlined } from '@ant-design/icons';
-import { Layout as AntdLayout, Menu, Flex, Divider, Tooltip, Button } from 'antd';
+import { ConfigProvider, Layout as AntdLayout, Menu, Flex, Divider, Tooltip, Button } from 'antd';
 
 import API from '@/api';
 import { PageLoading, Logo, ExternalLink, Message } from '@/components';
@@ -117,83 +117,91 @@ export const Layout = () => {
   };
 
   return (
-    <AntdLayout style={{ height: '100vh' }}>
-      <Sider>
-        {import.meta.env.DEVLAKE_TITLE_CUSTOM ? (
-          <h2 style={{ margin: '36px 0', textAlign: 'center', color: '#fff' }}>
-            {import.meta.env.DEVLAKE_TITLE_CUSTOM}
-          </h2>
-        ) : (
-          <Logo style={{ padding: 24 }} />
-        )}
-        <Menu
-          mode="inline"
-          theme="dark"
-          items={menuItems}
-          openKeys={openKeys}
-          selectedKeys={selectedKeys}
-          onClick={({ key }) => navigate(key)}
-          onOpenChange={(keys) => setOpenKeys(keys)}
-        />
-        <div style={{ position: 'absolute', right: 0, bottom: 20, left: 0, color: '#fff', textAlign: 'center' }}>
-          {version}
-        </div>
-      </Sider>
-      <AntdLayout style={{ overflowY: 'auto' }}>
-        <Header
-          style={{
-            display: 'flex',
-            justifyContent: 'flex-end',
-            alignItems: 'center',
-            padding: '0 24px',
-            height: 50,
-            background: 'transparent',
-          }}
-        >
-          {headerItems
-            .filter((item) =>
-              import.meta.env.DEVLAKE_COPYRIGHT_HIDE ? !['GitHub', 'Slack'].includes(item.label) : true,
-            )
-            .map((item, i, arr) => (
-              <ExternalLink key={item.label} link={item.link} style={{ display: 'flex', alignItems: 'center' }}>
-                {item.icon}
-                <span style={{ marginLeft: 4 }}>{item.label}</span>
-                {i !== arr.length - 1 && <Divider type="vertical" />}
-              </ExternalLink>
-            ))}
-        </Header>
-        <Content style={{ margin: '16px auto', width: 1188 }}>
-          <Outlet />
-        </Content>
-        {!import.meta.env.DEVLAKE_COPYRIGHT_HIDE && (
-          <Footer>
-            <p style={{ textAlign: 'center' }}>Apache 2.0 License</p>
-          </Footer>
-        )}
-        <CSSTransition in={!!tipsShow} unmountOnExit timeout={300} nodeRef={tipsRef} classNames="tips">
-          <S.Tips ref={tipsRef}>
-            <div className="content">
-              {tipsType === 'data-scope-changed' && (
-                <Flex gap="middle">
-                  <Message content="The change of Data Scope(s) will affect the metrics of this project. Would you like to recollect the data to get them updated?" />
-                  <Button type="primary" loading={operating} onClick={handleRunBP}>
-                    Recollect Data
-                  </Button>
-                </Flex>
-              )}
-              {tipsType === 'scope-config-changed' && (
-                <Message
-                  content="Scope Config(s) have been updated. If you would like to re-transform or re-collect the data in the related
+    <ConfigProvider
+      theme={{
+        token: {
+          colorPrimary: import.meta.env.DEVLAKE_COLOR_CUSTOM ?? '#7497F7',
+        },
+      }}
+    >
+      <AntdLayout style={{ height: '100vh' }}>
+        <Sider>
+          {import.meta.env.DEVLAKE_TITLE_CUSTOM ? (
+            <h2 style={{ margin: '36px 0', textAlign: 'center', color: '#fff' }}>
+              {import.meta.env.DEVLAKE_TITLE_CUSTOM}
+            </h2>
+          ) : (
+            <Logo style={{ padding: 24 }} />
+          )}
+          <Menu
+            mode="inline"
+            theme="dark"
+            items={menuItems}
+            openKeys={openKeys}
+            selectedKeys={selectedKeys}
+            onClick={({ key }) => navigate(key)}
+            onOpenChange={(keys) => setOpenKeys(keys)}
+          />
+          <div style={{ position: 'absolute', right: 0, bottom: 20, left: 0, color: '#fff', textAlign: 'center' }}>
+            {version}
+          </div>
+        </Sider>
+        <AntdLayout style={{ overflowY: 'auto' }}>
+          <Header
+            style={{
+              display: 'flex',
+              justifyContent: 'flex-end',
+              alignItems: 'center',
+              padding: '0 24px',
+              height: 50,
+              background: 'transparent',
+            }}
+          >
+            {headerItems
+              .filter((item) =>
+                import.meta.env.DEVLAKE_COPYRIGHT_HIDE ? !['GitHub', 'Slack'].includes(item.label) : true,
+              )
+              .map((item, i, arr) => (
+                <ExternalLink key={item.label} link={item.link} style={{ display: 'flex', alignItems: 'center' }}>
+                  {item.icon}
+                  <span style={{ marginLeft: 4 }}>{item.label}</span>
+                  {i !== arr.length - 1 && <Divider type="vertical" />}
+                </ExternalLink>
+              ))}
+          </Header>
+          <Content style={{ margin: '16px auto', width: 1188 }}>
+            <Outlet />
+          </Content>
+          {!import.meta.env.DEVLAKE_COPYRIGHT_HIDE && (
+            <Footer>
+              <p style={{ textAlign: 'center' }}>Apache 2.0 License</p>
+            </Footer>
+          )}
+          <CSSTransition in={!!tipsShow} unmountOnExit timeout={300} nodeRef={tipsRef} classNames="tips">
+            <S.Tips ref={tipsRef}>
+              <div className="content">
+                {tipsType === 'data-scope-changed' && (
+                  <Flex gap="middle">
+                    <Message content="The change of Data Scope(s) will affect the metrics of this project. Would you like to recollect the data to get them updated?" />
+                    <Button type="primary" loading={operating} onClick={handleRunBP}>
+                      Recollect Data
+                    </Button>
+                  </Flex>
+                )}
+                {tipsType === 'scope-config-changed' && (
+                  <Message
+                    content="Scope Config(s) have been updated. If you would like to re-transform or re-collect the data in the related
               project(s), please go to the Project page and do so."
-                />
-              )}
-            </div>
-            <Tooltip title="Close">
-              <Button shape="circle" ghost icon={<CloseOutlined />} onClick={() => dispatch(hideTips())} />
-            </Tooltip>
-          </S.Tips>
-        </CSSTransition>
+                  />
+                )}
+              </div>
+              <Tooltip title="Close">
+                <Button shape="circle" ghost icon={<CloseOutlined />} onClick={() => dispatch(hideTips())} />
+              </Tooltip>
+            </S.Tips>
+          </CSSTransition>
+        </AntdLayout>
       </AntdLayout>
-    </AntdLayout>
+    </ConfigProvider>
   );
 };


(incubator-devlake) 01/02: fix(config-ui): theme color missed

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a commit to branch fix-theme-color
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 78d0b22b6202c983f427cde5ee3d449982c0abb6
Author: mintsweet <0x...@gmail.com>
AuthorDate: Mon Jan 15 16:41:59 2024 +1300

    fix(config-ui): theme color missed
---
 config-ui/src/plugins/register/circleci/assets/icon.svg |  4 ++--
 config-ui/src/plugins/register/opsgenie/assets/icon.svg | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/config-ui/src/plugins/register/circleci/assets/icon.svg b/config-ui/src/plugins/register/circleci/assets/icon.svg
index 138333a61..190bb6a27 100644
--- a/config-ui/src/plugins/register/circleci/assets/icon.svg
+++ b/config-ui/src/plugins/register/circleci/assets/icon.svg
@@ -14,9 +14,9 @@ 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.
 -->
-<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
+<svg width="60" height="60" viewBox="0 0 60 60" fill="#7497F7" xmlns="http://www.w3.org/2000/svg">
   <path
     d="M22.9026 29.9997C22.9026 26.5016 25.7416 23.6625 29.2397 23.6625C32.7378 23.6625 35.5768 26.5016 35.5768 29.9997C35.5768 33.4978 32.7378 36.3368 29.2397 36.3368C25.7416 36.3875 22.9026 33.4978 22.9026 29.9997ZM29.2397 3.33301C16.7682 3.33301 6.32462 11.8501 3.38419 23.4091C3.38419 23.5104 3.3335 23.5611 3.3335 23.6625C3.3335 24.3723 3.89116 24.93 4.60092 24.93H15.3487C15.8557 24.93 16.312 24.6258 16.5147 24.1695C18.7454 19.3533 23.5616 16.0073 29.2397 16.0073C36.9457 16.0073 43.23 [...]
-    fill="#7497F7" />
+  />
 </svg>
   
\ No newline at end of file
diff --git a/config-ui/src/plugins/register/opsgenie/assets/icon.svg b/config-ui/src/plugins/register/opsgenie/assets/icon.svg
index e721717b8..33995da99 100644
--- a/config-ui/src/plugins/register/opsgenie/assets/icon.svg
+++ b/config-ui/src/plugins/register/opsgenie/assets/icon.svg
@@ -15,14 +15,14 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-<svg width="50" height="60" viewBox="0 0 50 60" fill="none" xmlns="http://www.w3.org/2000/svg">
+<svg width="50" height="60" viewBox="0 0 50 60" fill="#7497F7" xmlns="http://www.w3.org/2000/svg">
     <path
         d="M25.0007 29.896C33.0243 29.896 39.5287 23.2665 39.5287 15.0886C39.5287 6.91074 33.0243 0.28125 25.0007 0.28125C16.9771 0.28125 10.4727 6.91074 10.4727 15.0886C10.4727 23.2665 16.9771 29.896 25.0007 29.896Z"
-        fill="#7497F7"/>
+    />
     <path
         d="M23.7758 59.3444C14.3081 53.1885 6.39115 44.7034 0.759503 34.804C0.596267 34.5545 0.514648 34.3049 0.514648 33.9722C0.514648 33.3067 0.841121 32.7244 1.41245 32.4748L12.4309 26.9844C13.1655 26.5685 14.1449 26.9012 14.553 27.6499C20.103 37.1333 28.3464 44.7866 38.2222 49.4451C34.5494 53.1885 30.5501 56.516 26.2243 59.3444C25.4898 59.8435 24.5104 59.8435 23.7758 59.3444Z"
-        fill="#7497F7"/>
+    />
     <path
         d="M26.2247 59.3444C35.774 53.1885 43.6094 44.7034 49.241 34.804C49.4043 34.5545 49.4859 34.3049 49.4859 33.9722C49.4859 33.3067 49.1594 32.7244 48.5881 32.4748L37.5696 26.9844C36.8351 26.5685 35.8557 26.9012 35.4476 27.6499C29.8975 37.1333 21.6541 44.7866 11.7783 49.4451C15.3695 53.1885 19.4504 56.516 23.7762 59.3444C24.5107 59.8435 25.4902 59.8435 26.2247 59.3444Z"
-        fill="#7497F7"/>
-</svg>
+    />
+</svg>
\ No newline at end of file