diff --git a/packages/app/src/layouts/mobile/index.jsx b/packages/app/src/layouts/mobile/index.jsx
deleted file mode 100755
index 725421a5..00000000
--- a/packages/app/src/layouts/mobile/index.jsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from "react"
-import classnames from "classnames"
-import * as antd from "antd"
-
-import { BottomBar, Drawer, Sidedrawer, Modal } from "components/Layout"
-
-export default (props) => {
- return
-
-
-
-
- {React.cloneElement(props.children, props)}
-
-
-
-
-
-
-
-}
diff --git a/packages/app/src/pages/account/index.less b/packages/app/src/pages/account/index.less
index 948da5b7..ef83acf5 100755
--- a/packages/app/src/pages/account/index.less
+++ b/packages/app/src/pages/account/index.less
@@ -1,5 +1,60 @@
+@import "theme/vars.less";
+
@borderRadius: 12px;
+#root {
+ &.mobile {
+ .accountProfile {
+ display: flex;
+ flex-direction: column;
+
+ .panels {
+ display: flex;
+ flex-direction: column;
+
+ .tabMenuWrapper {
+ position: fixed;
+
+ top: 0px;
+ left: 0px;
+
+ z-index: 300;
+
+ width: 100%;
+
+ height: @top_bar_height;
+
+ padding: @top_bar_padding;
+
+ box-shadow: @card-shadow-top;
+
+ display: flex;
+ flex-direction: row;
+
+ align-items: center;
+
+ opacity: 0;
+
+ .ant-menu {
+ display: flex;
+ flex-direction: row;
+
+ .ant-menu-item {
+ width: fit-content;
+ }
+ }
+ }
+ }
+
+ &.topHidden {
+ .tabMenuWrapper {
+ opacity: 1;
+ }
+ }
+ }
+ }
+}
+
.accountProfile {
display: flex;
diff --git a/packages/app/src/pages/live/index.less b/packages/app/src/pages/live/index.less
index dc070724..6c211340 100755
--- a/packages/app/src/pages/live/index.less
+++ b/packages/app/src/pages/live/index.less
@@ -1,6 +1,31 @@
@panel-width: 500px;
@chatbox-header-height: 50px;
+#root {
+ &.mobile {
+ .livestream {
+ flex-direction: column;
+ height: 100%;
+ }
+
+ .livestream_panel {
+ position: absolute;
+ bottom: 0;
+ height: 20%;
+ }
+
+ .livestream_player {
+ height: 100%;
+ width: 100%;
+
+ .plyr {
+ width: 100%;
+ height: 100%;
+ }
+ }
+ }
+}
+
.plyr__controls {
width: 100%;
display: inline-flex;
diff --git a/packages/app/src/pages/play/index.less b/packages/app/src/pages/play/index.less
index c4a31764..7bd2459c 100755
--- a/packages/app/src/pages/play/index.less
+++ b/packages/app/src/pages/play/index.less
@@ -1,3 +1,38 @@
+#root {
+ &.mobile {
+ .playlist_view {
+ display: flex;
+ flex-direction: column;
+
+ width: 100%;
+
+ .play_info_wrapper {
+ position: relative;
+
+ .play_info {
+ width: 100%;
+
+ .play_info_cover {
+ width: 20vh;
+ height: 20vh;
+
+ img {
+ width: 100%;
+ height: 100%;
+
+ object-fit: contain;
+ }
+ }
+ }
+ }
+
+ .list {
+ padding: 30px 10px;
+ }
+ }
+ }
+}
+
.playlist_view {
display: grid;
@@ -60,7 +95,7 @@
width: 100%;
height: 100%;
- object-fit: cover;
+ object-fit: contain;
}
}
diff --git a/packages/app/src/pages/settings/index.mobile.jsx b/packages/app/src/pages/settings/index.mobile.jsx
index b6f99c2b..add59890 100644
--- a/packages/app/src/pages/settings/index.mobile.jsx
+++ b/packages/app/src/pages/settings/index.mobile.jsx
@@ -5,6 +5,7 @@ import { Translation } from "react-i18next"
import useUrlQueryActiveKey from "hooks/useUrlQueryActiveKey"
import { Icons, createIconRender } from "components/Icons"
+import { UseTopBar } from "components/Layout/topBar"
import {
composedSettingsByGroups as settingsGroups,
@@ -20,38 +21,31 @@ const SettingsHeader = ({
activeKey,
back = () => { }
} = {}) => {
- if (activeKey) {
- const currentTab = composedTabs[activeKey]
+ const currentTab = composedTabs[activeKey]
- return
-
+ {
+ activeKey && }
onClick={back}
size="large"
type="ghost"
/>
+ }
-
- {
- createIconRender(currentTab?.icon)
- }
-
- {(t) => t(currentTab?.label ?? activeKey)}
-
-
-
- }
-
- return
{
- createIconRender("Settings")
+ createIconRender(currentTab?.icon ?? "Settings")
}
- {(t) => t("Settings")}
+ {(t) => t(currentTab?.label ?? activeKey ?? "Settings")}
-
+
}
export default (props) => {
@@ -80,6 +74,11 @@ export default (props) => {
const changeTab = (key) => {
lastKey = key
setActiveKey(key)
+
+ // scroll to top
+ app.layout.scrollTo({
+ top: 0,
+ })
}
return
diff --git a/packages/app/src/pages/settings/index.mobile.less b/packages/app/src/pages/settings/index.mobile.less
index 4f7a2e94..b62db44c 100644
--- a/packages/app/src/pages/settings/index.mobile.less
+++ b/packages/app/src/pages/settings/index.mobile.less
@@ -1,4 +1,32 @@
-@top_nav_height: 52px;
+.settings_nav {
+ display: flex;
+
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-start;
+
+ width: 100%;
+
+ gap: 20px;
+
+ h1 {
+ margin: 0;
+ view-transition-name: main-header-text;
+ width: fit-content;
+ }
+
+ svg {
+ color: var(--colorPrimary);
+ }
+
+ .ant-btn {
+ font-size: 2rem;
+
+ svg {
+ color: var(--text-color);
+ }
+ }
+}
.__mobile__settings {
display: flex;
@@ -7,47 +35,6 @@
gap: 30px;
- .__mobile__settings_header {
- position: sticky;
- top: 0;
- left: 0;
- z-index: 200;
-
- width: 100%;
- height: @top_nav_height;
-
- display: flex;
- flex-direction: row;
- align-items: center;
-
- gap: 20px;
-
- padding: 5px 20px;
-
- border-radius: 12px;
-
- border-bottom: 1px solid var(--border-color);
- background-color: var(--background-color-accent);
-
- h1 {
- margin: 0;
- view-transition-name: main-header-text;
- width: fit-content;
- }
-
- svg {
- color: var(--colorPrimary);
- }
-
- .ant-btn {
- font-size: 2rem;
-
- svg {
- color: var(--text-color);
- }
- }
- }
-
.settings_list {
view-transition-name: settings-list;
diff --git a/packages/app/src/theme/index.less b/packages/app/src/theme/index.less
index c484d748..a0f7b79b 100755
--- a/packages/app/src/theme/index.less
+++ b/packages/app/src/theme/index.less
@@ -128,25 +128,19 @@ html {
font-size: calc(16px * var(--fontScale));
&.electron {
- .page_layout {
- padding-top: 35px;
- }
-
.ant-layout-sider {
padding-top: 0px;
}
}
&.centered_content {
- .content_layout {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
+ .app_layout {
+ .content_layout {
+ display: flex;
+ flex-direction: column;
- .page_layout {
- width: 60%;
- height: calc(100vh - var(--layoutPadding) * 2);
+ justify-content: center;
+ align-items: center;
}
}
}
@@ -192,27 +186,19 @@ html {
z-index: 200;
transition: all 200ms ease-in-out;
}
-
- &.mobile {
- //padding-top: 20px;
-
- ::-webkit-scrollbar {
- display: none !important;
- width: 0;
- height: 0;
- z-index: 0;
- }
- }
}
.content_layout {
position: relative;
-webkit-overflow-scrolling: touch;
+ box-sizing: border-box;
+
display: flex;
flex-direction: column;
align-items: center;
+ justify-content: flex-start;
height: 100%;
width: 100%;
@@ -232,11 +218,6 @@ html {
&.floating-sidebar {
margin-left: @app_sidebar_width;
}
-
- .page_layout {
- width: 100%;
- height: 100%;
- }
}
.root_background {
diff --git a/packages/app/src/theme/mobile.less b/packages/app/src/theme/mobile.less
index f581a538..4c4eccfd 100755
--- a/packages/app/src/theme/mobile.less
+++ b/packages/app/src/theme/mobile.less
@@ -1,183 +1,66 @@
@import "theme/vars.less";
-@top_bar_height: 52px;
-
-// #root,body,html {
-// height: 100%!important;
-// max-height: 100%!important;
-// }
-
-.app_layout {
+#root {
&.mobile {
- display: flex;
- flex-direction: column;
+ &.centered-content {
+ .app_layout {
+ .content_layout {
+ display: flex;
+ flex-direction: column;
- height: 100% !important;
- max-height: 100% !important;
+ justify-content: flex-start;
+ align-items: center;
- padding: 0;
-
- .content_wrapper {
- height: 100%;
- width: 100%;
- max-height: 100%;
-
- overflow-y: scroll;
+ padding: 10px;
+ }
+ }
}
- .content_layout {
+ &.top-bar-spacer {
+ .app_layout {
+ .content_layout {
+ padding-top: calc(@top_bar_height + @top_bar_padding * 2);
+ }
+ }
+ }
+
+ .app_layout {
display: flex;
flex-direction: column;
- overflow: hidden;
- align-items: center;
- justify-content: center;
-
- width: 100%;
height: 100%;
- max-height: 100%;
-
- padding: 7px 0;
- padding-bottom: 0px;
-
- box-sizing: border-box;
- }
-
- .pagePanels {
- display: flex;
- flex-direction: column;
-
- align-items: center;
- justify-content: flex-start;
-
- overflow-x: visible;
-
width: 100%;
- height: 100%;
padding: 0;
- .panel {
- width: 100%;
-
- &.left {
- position: absolute;
-
- height: @top_bar_height;
-
- padding: 10px;
- z-index: 310;
-
- top: 0;
- left: 0;
-
- overflow: visible;
- overflow-x: visible;
- }
-
- &.center {
- z-index: 300;
-
- overflow-y: visible;
- overflow-x: hidden;
-
- margin-top: calc(@top_bar_height + 10px);
- margin-bottom: 10px;
-
- border-radius: 12px;
-
- height: 100%;
-
- //-webkit-mask-image: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0) 10px, rgb(0, 0, 0) calc(100% - 10px), rgba(0, 0, 0, 0) 100%);
- //mask-image: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0) 10px, rgb(0, 0, 0) calc(100% - 10px), rgba(0, 0, 0, 0) 100%);
- }
+ ::-webkit-scrollbar {
+ display: none !important;
+ width: 0;
+ height: 0;
+ z-index: 0;
}
- .card {
- width: 100%;
- height: 100%;
+ transition: all 150ms ease-in-out;
+ .content_layout {
display: flex;
- flex-direction: row;
+ flex-direction: column;
- padding: 5px;
+ align-items: center;
+ justify-content: flex-start;
- justify-content: space-evenly;
+ margin: 0;
+ padding: 0;
+ padding-bottom: 0px;
- box-shadow: @card-shadow;
+ overflow: unset;
+ overflow-x: hidden;
+ overflow-y: overlay;
- border-radius: 12px;
-
- isolation: unset;
- overflow: visible;
- }
- }
-
- .playlist_view {
- display: flex;
- flex-direction: column;
-
- .play_info_wrapper {
- position: relative;
-
- .play_info {
- width: 100%;
-
- .play_info_cover {
- width: 100%;
- height: 100%;
- }
- }
- }
-
- .list {
- padding: 30px 10px;
- }
- }
-
- .post-list_wrapper {
- .post-list {
- padding-top: 10px;
- border-radius: 0;
-
- .playlistTimelineEntry {
- width: 100%;
-
- .playlistTimelineEntry_content {
- .playlistTimelineEntry_thumbnail {
- img {
- width: 20vw;
- height: 20vw;
- }
- }
- }
- }
-
- .postCard {
+ >div {
width: 100%;
}
}
}
-
- .livestream {
- flex-direction: column;
- height: 100%;
- }
-
- .livestream_panel {
- position: absolute;
- bottom: 0;
- height: 20%;
- }
-
- .livestream_player {
- height: 100%;
- width: 100%;
-
- .plyr {
- width: 100%;
- height: 100%;
- }
- }
}
}
\ No newline at end of file
diff --git a/packages/app/src/theme/vars.less b/packages/app/src/theme/vars.less
index 13cf0e3c..2b7a79e9 100755
--- a/packages/app/src/theme/vars.less
+++ b/packages/app/src/theme/vars.less
@@ -18,4 +18,8 @@
@transition-ease-inout: all 150ms ease-in-out;
@card-shadow: 0 0 0 1px rgba(63, 63, 68, 0.05), 0 1px 3px 0 var(--shadow-color);
-@card-shadow-top: 0 -4px 3px 0 rgba(63, 63, 68, 0.05), 0 0 0 2px var(--shadow-color);
\ No newline at end of file
+@card-shadow-top: 0 -4px 3px 0 rgba(63, 63, 68, 0.05), 0 0 0 2px var(--shadow-color);
+
+// Mobile
+@top_bar_height: 52px;
+@top_bar_padding: 10px;
\ No newline at end of file