Skip to content

Commit c2a60f2

Browse files
Peter_TanRock-520
authored andcommitted
feat: 更新超级麦吉代码,修复若干体验问题
1 parent 5d8bffa commit c2a60f2

File tree

3 files changed

+29
-31
lines changed

3 files changed

+29
-31
lines changed

frontend/magic-web/src/opensource/layouts/BaseLayout/components/Sider/styles.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ import { SupportLocales } from "@/const/locale"
44

55
export const useStyles = createStyles(
66
(
7-
{isDarkMode, css, token, prefixCls},
8-
{collapsed, language}: { collapsed: boolean; language: string },
7+
{ isDarkMode, css, token, prefixCls },
8+
{ collapsed, language }: { collapsed: boolean; language: string },
99
) => {
1010
return {
1111
sider: css`
1212
box-sizing: border-box;
13-
border-right: 1px solid ${ token.colorBorder };
13+
border-right: 1px solid ${token.colorBorder};
1414
height: 100%;
1515
min-width: 56px;
16-
width: ${ collapsed ? "56px" : "auto" };
16+
width: ${collapsed ? "56px" : "auto"};
1717
padding: 10px 10px;
1818
flex-shrink: 0;
1919
transition: width 0.2s ease-in-out;
@@ -53,8 +53,8 @@ export const useStyles = createStyles(
5353
}
5454
}
5555
56-
.${ prefixCls }-menu-item:hover {
57-
.${ prefixCls }-menu-item-icon {
56+
.${prefixCls}-menu-item:hover {
57+
.${prefixCls}-menu-item-icon {
5858
stroke-dasharray: 100;
5959
stroke-dashoffset: 100;
6060
animation: stroke 1.5s forwards;
@@ -68,28 +68,28 @@ export const useStyles = createStyles(
6868
menus: css`
6969
width: 100%;
7070
71-
> .${ prefixCls }-menu:not(:first-child) {
72-
border-top: 1px solid ${ token.colorBorder };
71+
> .${prefixCls}-menu:not(:first-child) {
72+
border-top: 1px solid ${token.colorBorder};
7373
padding-top: 5px;
7474
margin-top: 5px;
7575
}
7676
`,
7777
menu: css`
78-
--${ prefixCls }-menu-item-selected-bg: ${ token.magicColorUsages.primaryLight.default } !important;
78+
--${prefixCls}-menu-item-selected-bg: ${token.magicColorUsages.primaryLight.default} !important;
7979
80-
--${ prefixCls }-menu-item-color: ${ token.magicColorUsages.text[1] } !important;
80+
--${prefixCls}-menu-item-color: ${token.magicColorUsages.text[1]} !important;
8181
82-
--${ prefixCls }-menu-item-selected-color: ${ isDarkMode ? token.colorPrimary : token.magicColorUsages.text[1] } !important;
82+
--${prefixCls}-menu-item-selected-color: ${isDarkMode ? token.colorPrimary : token.magicColorUsages.text[1]} !important;
8383
84-
.${ prefixCls }-menu-item-selected {
85-
color: ${ isDarkMode ? token.colorPrimary : token.magicColorUsages.text[1] } !important;
84+
.${prefixCls}-menu-item-selected {
85+
color: ${isDarkMode ? token.colorPrimary : token.magicColorUsages.text[1]} !important;
8686
}
8787
8888
background: transparent;
8989
border-inline-end: none !important;
90-
width: ${ collapsed ? "100%" : "100%" };
90+
width: ${collapsed ? "100%" : "100%"};
9191
92-
> .${ prefixCls }-menu-item {
92+
> .${prefixCls}-menu-item {
9393
width: 100%;
9494
height: 30px;
9595
margin-left: 0;
@@ -98,9 +98,9 @@ export const useStyles = createStyles(
9898
gap: 4px;
9999
}
100100
101-
.${ prefixCls }-menu-title-content {
101+
.${prefixCls}-menu-title-content {
102102
margin-left: 0 !important;
103-
font-size: ${ language === SupportLocales.zhCN ? "14px" : "12px" };
103+
font-size: ${language === SupportLocales.zhCN ? "14px" : "12px"};
104104
}
105105
`,
106106
icon: css`
@@ -111,25 +111,25 @@ export const useStyles = createStyles(
111111
justify-content: center;
112112
cursor: pointer;
113113
flex: none;
114-
background-color: ${ token.magicColorUsages.fill[1] };
115-
border-radius: ${ token.borderRadiusLG }px;
114+
background-color: ${token.magicColorUsages.fill[1]};
115+
border-radius: ${token.borderRadiusLG}px;
116116
117117
&:hover {
118-
background-color: ${ token.magicColorUsages.fill[0] };
118+
background-color: ${token.magicColorUsages.fill[0]};
119119
}
120120
121121
&:active {
122-
background-color: ${ token.magicColorUsages.fill[2] };
122+
background-color: ${token.magicColorUsages.fill[2]};
123123
}
124124
`,
125125
organizationSwitchWrapper: css`
126-
flex-direction: ${ collapsed ? "column" : "row" };
126+
flex-direction: ${collapsed ? "column" : "row"};
127127
`,
128128
}
129129
},
130130
)
131131

132-
export const useSideMenuStyle = createStyles(({css}) => {
132+
export const useSideMenuStyle = createStyles(({ css }) => {
133133
return {
134134
navIcon: css`
135135
font-size: 18px;

frontend/magic-web/src/opensource/layouts/BaseLayout/styles.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,21 @@ export const useStyles = createStyles(
1818
},
1919
header: {
2020
backgroundColor: token.magicColorUsages.bg[0],
21-
borderBottom: `1px solid ${
22-
isDarkMode ? token.magicColorScales.grey[1] : token.colorBorder
23-
}`,
21+
borderBottom: `1px solid ${isDarkMode ? token.magicColorScales.grey[1] : token.colorBorder
22+
}`,
2423
},
2524
wrapper: {
2625
height: `calc(100vh - ${token.titleBarHeight}px)`,
2726
},
2827
sider: {
2928
backgroundColor: token.magicColorUsages.bg[0],
30-
borderRight: `1px solid ${
31-
isDarkMode ? token.magicColorScales.grey[1] : token.colorBorder
32-
}`,
29+
borderRight: `1px solid ${isDarkMode ? token.magicColorScales.grey[1] : token.colorBorder
30+
}`,
3331
},
3432
subSider: {},
3533
content: css`
3634
width: calc(100% - var(--sider-width));
37-
height: 100%;
35+
height: calc(100% - 44px);
3836
`,
3937
}
4038
},

frontend/magic-web/src/opensource/pages/superMagic/utils/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const getMessagesByConversationId = async ({
132132
page_token?: string
133133
}): Promise<any> => {
134134
return magicClient.post(
135-
`/api/v1/im/conversations/${conversation_id}/messages/queries`,
135+
`/api/v2/magic/conversations/${conversation_id}/message/queries`,
136136
{
137137
limit,
138138
order,

0 commit comments

Comments
 (0)