@campxdev/shared 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -22,8 +22,8 @@ const imageMap = {
|
|
|
22
22
|
const isDev = process.env.NODE_ENV === 'development'
|
|
23
23
|
|
|
24
24
|
export default function AppHeader({title}: {title?: string}) {
|
|
25
|
-
const originSubdomain =
|
|
26
|
-
|
|
25
|
+
const originSubdomain =
|
|
26
|
+
window.location.origin.split('.')?.slice(-3)[0] ?? 'ums'
|
|
27
27
|
const currentApp =
|
|
28
28
|
applications.find((item) => item.key === originSubdomain)?.key ?? 'local'
|
|
29
29
|
|
|
@@ -38,15 +38,9 @@ export default function AppHeader({title}: {title?: string}) {
|
|
|
38
38
|
) : (
|
|
39
39
|
<StyledImageWrapper>
|
|
40
40
|
{isDev ? (
|
|
41
|
-
<
|
|
41
|
+
<img src={imageMap.ums} />
|
|
42
42
|
) : (
|
|
43
|
-
<img
|
|
44
|
-
src={imageMap[currentApp]}
|
|
45
|
-
style={{
|
|
46
|
-
width: '200px',
|
|
47
|
-
height: 'auto',
|
|
48
|
-
}}
|
|
49
|
-
/>
|
|
43
|
+
<img src={imageMap[currentApp]} />
|
|
50
44
|
)}
|
|
51
45
|
</StyledImageWrapper>
|
|
52
46
|
)}
|
|
@@ -1,48 +1,47 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {AppBar, Box, ListItemText, styled} from '@mui/material'
|
|
2
2
|
|
|
3
3
|
export const StyledImageWrapper = styled('div')`
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
4
|
+
width: 140px;
|
|
5
|
+
& img {
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
object-fit: contain;
|
|
9
|
+
}
|
|
11
10
|
`
|
|
12
11
|
|
|
13
|
-
export const StyledItemText = styled(ListItemText)(({
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
export const StyledItemText = styled(ListItemText)(({theme}) => ({
|
|
13
|
+
color: theme.palette.text.primary,
|
|
14
|
+
transition: '0.2s ease',
|
|
16
15
|
}))
|
|
17
16
|
|
|
18
|
-
export const StyledAppBar = styled(AppBar)(({
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
export const StyledAppBar = styled(AppBar)(({theme}) => ({
|
|
18
|
+
backgroundColor: 'white',
|
|
19
|
+
boxShadow: '0px 8px 28px rgb(136,136,136, 0.3)',
|
|
21
20
|
}))
|
|
22
21
|
|
|
23
|
-
export const StyledHeader = styled(Box)(({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
export const StyledHeader = styled(Box)(({theme}) => ({
|
|
23
|
+
boxShadow: '0px 2px 10px #0000001a',
|
|
24
|
+
// padding: '0 1rem',
|
|
25
|
+
backgroundColor: 'white',
|
|
26
|
+
display: 'flex',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
justifyContent: 'space-between',
|
|
29
|
+
'& .actions': {
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
gap: '14px',
|
|
33
|
+
},
|
|
35
34
|
}))
|
|
36
35
|
|
|
37
|
-
export const StyledUser = styled(Box)(({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
export const StyledUser = styled(Box)(({theme}) => ({
|
|
37
|
+
cursor: 'pointer',
|
|
38
|
+
borderRadius: '5px',
|
|
39
|
+
transition: 'background 0.2s ease',
|
|
40
|
+
padding: '5px 10px',
|
|
41
|
+
display: 'flex',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
gap: '10px',
|
|
44
|
+
'&:hover': {
|
|
45
|
+
background: theme.palette.secondary.light,
|
|
46
|
+
},
|
|
48
47
|
}))
|