Skip to content

Commit

Permalink
refactor(project): apply setting page and MainPageLayout component da…
Browse files Browse the repository at this point in the history
…rk mode (#1379)
  • Loading branch information
Cheerego7 authored Feb 22, 2022
1 parent 5627093 commit b1ed605
Show file tree
Hide file tree
Showing 17 changed files with 130 additions and 34 deletions.
1 change: 1 addition & 0 deletions cspell.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ module.exports = {

// less
"isstring",
"borderless",

// misc
"npmrc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
input,
.ant-select,
.ant-picker-input > input {
color: #444e60;
color: var(--text);
}

.ant-picker {
Expand All @@ -12,7 +12,7 @@

.edit-room-form-label,
.ant-form-item-label > label {
color: #7a7b7c;
color: var(--text-strong);
}

.ant-picker,
Expand Down Expand Up @@ -46,7 +46,7 @@
.edit-room-title {
font-size: 16px;
font-weight: 500;
color: #444e60;
color: var(--text);
line-height: 1;
margin: 0;
}
Expand Down Expand Up @@ -81,6 +81,7 @@

.edit-room-body {
overflow: visible;
background-color: #fff;
.ant-row {
margin-left: 0 !important;
margin-right: 0 !important;
Expand Down Expand Up @@ -114,7 +115,7 @@
}

.edit-room-tips {
background-color: #f3f6f9;
background-color: var(--grey-0);
border-radius: 8px;
padding: 12px;
}
Expand Down Expand Up @@ -162,3 +163,13 @@
margin-top: 2px;
margin-right: -11px;
}

.flat-color-scheme-dark {
.edit-room-body {
background-color: var(--grey-10);
}

.edit-room-tips {
background-color: var(--grey-9);
}
}
20 changes: 17 additions & 3 deletions packages/flat-components/src/components/LoadingPage/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
width: 100%;
height: 50px;
pointer-events: none;
background-color: #fff;
background-color: var(--grey-0);

&.is-transparent {
background-color: transparent;
Expand All @@ -30,8 +30,8 @@
justify-content: center;
flex-direction: column;
align-items: center;
color: #7a7b7c;
background-color: white;
color: var(--text-weak);
background-color: var(--grey-0);
}

.loading-page-image {
Expand All @@ -50,3 +50,17 @@
opacity: 1;
}
}

.flat-color-scheme-dark {
.loading-page-mask {
background-color: var(--grey-12);

&.is-transparent {
background-color: transparent;
}
}

.loading-page-content {
background-color: var(--grey-12);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@

.main-page-nav-horizontal-left {
.ant-tabs-tab {
color: #7a7b7c;
font-size: 16px;
}

.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
color: #444e60;
}

.ant-tabs-nav::before {
border-bottom: none;
}
Expand Down Expand Up @@ -58,3 +53,9 @@
font-size: 14px;
font-weight: 400;
}

.flat-color-scheme-dark {
.main-page-nav-horizontal-container {
background-color: var(--grey-10);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,36 @@
padding: 9px 0px 9px 16px;
transition: background-color 0.4s;
align-items: center;
color: #444e60;
color: var(--text);

&:hover,
&:active {
color: #444e60;
color: var(--text);
background-color: rgba(243, 246, 249, 1);
}

&.is-active {
color: #444e60;
color: var(--text);
background-color: rgba(51, 129, 255, 0.06);
}
}

.flat-color-scheme-dark {
.main-layout-sub-menu-container {
background-color: var(--grey-10);
border-right: solid 1px var(--grey-7);
}

.main-layout-sub-menu-item {
&:hover,
&:active {
color: var(--text);
background-color: var(--grey-8);
}

&.is-active {
color: var(--text);
background-color: rgba(141, 136, 136, 0.3);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.main-horizontal-layout-content-background {
height: calc(100vh - 50px);
padding-top: 16px;
background-color: #f3f6f9;
background-color: var(--grey-0);
}

.main-horizontal-layout-content-container {
Expand All @@ -20,3 +20,9 @@
flex: 1;
height: 100%;
}

.flat-color-scheme-dark {
.main-horizontal-layout-content-background {
background-color: var(--grey-12);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
width: 100%;
height: 100%;
overflow-y: auto;
background-color: #fff;
}

.periodic-room-panel-body {
Expand All @@ -25,13 +26,13 @@
.periodic-room-panel-title {
font-size: 16px;
font-weight: 500;
color: #444e60;
color: var(--text);
line-height: 1;
margin: 0;
}

.periodic-room-panel-tips {
background-color: #f3f6f9;
background-color: var(--grey-0);
border-radius: 8px;
padding: 12px;
margin-bottom: 24px;
Expand All @@ -42,13 +43,13 @@
}

.periodic-room-panel-tips-type {
color: #7a7b7c;
color: var(--text);
margin-top: 8px;
margin-bottom: 8px;
}

.periodic-room-panel-tips-inner {
color: #7a7b7c;
color: var(--text);
}

.periodic-room-panel-table-line {
Expand All @@ -59,15 +60,27 @@

.periodic-room-panel-table-container {
.ant-table-tbody > tr > td {
color: #7a7b7c;
color: var(--text);
border-bottom: 1px solid transparent;
}
}

.periodic-room-panel-month-value {
color: #444e60;
color: var(--text);
font-size: 16px;
line-height: 24px;
font-weight: 500;
margin-top: 16px;
}

.flat-color-scheme-dark {
.periodic-room-panel-tips {
background-color: var(--grey-9);
}
.periodic-room-panel-container {
background-color: var(--grey-10);
}
.periodic-room-panel-body {
background-color: var(--grey-10);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
height: 100%;
display: flex;
flex-direction: column;
background-color: var(--grey-0);
}

.cloud-storage-container-head {
Expand Down Expand Up @@ -119,4 +120,8 @@
.cloud-storage-container-footer {
border-top-color: var(--grey-8);
}

.cloud-storage-container {
background-color: var(--grey-10);
}
}
2 changes: 1 addition & 1 deletion web/flat-web/src/components/EditRoomPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const EditRoomPage = observer<EditRoomPageProps>(function EditRoomPage(pr

return (
<div className="edit-room-page">
<div className="edit-room-page-body">
<div className="edit-room-page-body flat-theme-background-color">
<div className="edit-room-page-body-content">
<EditRoomBody {...props} />
</div>
Expand Down
3 changes: 1 addition & 2 deletions web/flat-web/src/components/EditRoomPage/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
.edit-room-page-header-title {
font-size: 16px;
font-weight: 500;
color: #444e60;
color: var(--text);
}

.edit-room-page-body {
flex: 1;
width: 960px;
margin: 0 auto;
border-radius: 8px 8px 0px 0px;
background-color: #fff;
}

.edit-room-page-body-content {
Expand Down
1 change: 0 additions & 1 deletion web/flat-web/src/pages/PeriodicRoomDetailPage/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@
width: 960px;
margin: 0 auto;
border-radius: 8px 8px 0px 0px;
background-color: #fff;
}
2 changes: 1 addition & 1 deletion web/flat-web/src/pages/RoomDetailPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const RoomDetailPage = observer(function RoomDetailPage() {

return (
<div className="room-detail-page-container">
<div className="room-detail-page-panel-container">
<div className="room-detail-page-panel-container flat-theme-background-color">
<RoomDetailPanel
inviteBaseUrl={FLAT_WEB_BASE_URL}
isCreator={isCreator}
Expand Down
4 changes: 2 additions & 2 deletions web/flat-web/src/pages/UserSettingPage/AboutPage/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
}

.flat-name {
color: #444e60;
color: var(--text-strong);
font-size: 16px;
font-weight: 500;
}

.flat-version {
color: #7a7b7c;
color: var(--text);
font-size: 14px;
font-weight: 400;
padding-bottom: 16px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
}

.general-setting-appearance-picker-container{
.general-setting-appearance-picker-container {
> span {
display: block;
padding-top: 8px;
Expand All @@ -34,3 +34,14 @@
.general-setting-checkbox-title {
padding-bottom: 3px;
}

.flat-color-scheme-dark {
.general-setting-container {
color: var(--text-stronger);
}

.radio-item-inner,
.checkbox-item-inner {
color: var(--text);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ export const GeneralSettingPage = (): React.ReactElement => {
}
onChange={changeLanguage}
>
<Radio value={SelectLanguage.Chinese}>{t("chinese")}</Radio>
<Radio value={SelectLanguage.English}>English</Radio>
<Radio value={SelectLanguage.Chinese}>
<span className="radio-item-inner">{t("chinese")}</span>
</Radio>
<Radio value={SelectLanguage.English}>
<span className="radio-item-inner">English</span>
</Radio>
</Radio.Group>
</div>
<div className="general-setting-appearance-picker-container">
Expand All @@ -61,7 +65,7 @@ export const GeneralSettingPage = (): React.ReactElement => {
globalStore.toggleDeviceTest();
}}
>
{t("turn-on-device-test")}
<span className="checkbox-item-inner">{t("turn-on-device-test")}</span>
</Checkbox>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ export const UserSettingLayoutContainer: React.FC = ({ children }): React.ReactE
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

return <div className="user-setting-layout-container">{children}</div>;
return (
<div className="user-setting-layout-container flat-theme-background-color">{children}</div>
);
};
Loading

0 comments on commit b1ed605

Please sign in to comment.