Skip to content

Commit 99fa48f

Browse files
authored
Merge pull request #3350 from amvanbaren/release-v0.19.1
Release v0.19.1
2 parents 906cbb2 + 853bb3f commit 99fa48f

File tree

4 files changed

+60
-52
lines changed

4 files changed

+60
-52
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG SERVER_VERSION=v0.19.0
1+
ARG SERVER_VERSION=v0.19.1
22

33
# Builder image to compile the website
44
FROM ubuntu AS builder
@@ -19,7 +19,7 @@ RUN apt-get update \
1919
&& corepack prepare yarn@stable --activate
2020

2121
# bump to update website
22-
ENV WEBSITE_VERSION 0.13.1-next.4864a03d
22+
ENV WEBSITE_VERSION 0.13.0
2323
COPY . /workdir
2424

2525
RUN /usr/bin/yarn --cwd website \

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"repository": "https://github.com/eclipse/open-vsx.org",
77
"license": "EPL-2.0",
88
"dependencies": {
9-
"openvsx-webui": "0.13.1-next.4864a03d"
9+
"openvsx-webui": "0.13.0"
1010
},
1111
"peerDependencies": {
1212
"@babel/core": "^7.0.0"

website/src/menu-content.tsx

Lines changed: 52 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* SPDX-License-Identifier: EPL-2.0
99
********************************************************************************/
1010

11-
import React, { FunctionComponent, useState, useRef, useContext } from 'react';
12-
import { Theme, Typography, Menu, MenuItem, Link, Button, Accordion, AccordionDetails, AccordionSummary, IconButton } from '@mui/material';
11+
import React, { FunctionComponent, PropsWithChildren, useState, useRef } from 'react';
12+
import { Theme, Typography, Menu, MenuItem, Link, Button, Accordion, AccordionDetails, AccordionSummary } from '@mui/material';
1313
import { styled } from '@mui/material/styles';
1414
import { Link as RouteLink } from 'react-router-dom';
1515
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
@@ -22,41 +22,33 @@ import PublishIcon from '@mui/icons-material/Publish';
2222
import GroupWorkIcon from '@mui/icons-material/GroupWork';
2323
import PeopleAltIcon from '@mui/icons-material/PeopleAlt';
2424
import HubIcon from '@mui/icons-material/Hub';
25-
import AccountBoxIcon from '@mui/icons-material/AccountBox';
2625
import { UserSettingsRoutes } from 'openvsx-webui';
27-
import { MainContext } from 'openvsx-webui/lib/context';
28-
import { MobileMenuItem, itemIcon, MobileMenuItemText, MobileUserAvatar, headerItem, MenuLink, MenuRouteLink } from 'openvsx-webui/lib/default/menu-content'
29-
import { UserAvatar } from 'openvsx-webui/lib/pages/user/avatar';
3026

3127
//-------------------- Mobile View --------------------//
3228

29+
const MobileMenuItem = styled(MenuItem)({
30+
cursor: 'auto',
31+
'&>a': {
32+
textDecoration: 'none'
33+
}
34+
});
35+
36+
const itemIcon = {
37+
mr: 1,
38+
width: '16px',
39+
height: '16px',
40+
};
41+
42+
const MobileMenuItemText: FunctionComponent<PropsWithChildren> = ({ children }) => {
43+
return (
44+
<Typography variant='body2' sx={{ color: 'text.primary', display: 'flex', alignItems: 'center' }}>
45+
{children}
46+
</Typography>
47+
);
48+
};
49+
3350
export const MobileMenuContent: FunctionComponent = () => {
34-
const {service, user} = useContext(MainContext)
3551
return <>
36-
{
37-
user
38-
? <MobileUserAvatar/>
39-
: <MobileMenuItem>
40-
<Link href={service.getLoginUrl()}>
41-
<MobileMenuItemText>
42-
<AccountBoxIcon sx={itemIcon} />
43-
Log In
44-
</MobileMenuItemText>
45-
</Link>
46-
</MobileMenuItem>
47-
}
48-
{
49-
!location.pathname.startsWith(UserSettingsRoutes.ROOT)
50-
? <MobileMenuItem>
51-
<RouteLink to='/user-settings/extensions'>
52-
<MobileMenuItemText>
53-
<PublishIcon sx={itemIcon} />
54-
Publish Extension
55-
</MobileMenuItemText>
56-
</RouteLink>
57-
</MobileMenuItem>
58-
: null
59-
}
6052
<MobileMenuItem>
6153
<Link target='_blank' href='https://github.com/eclipse/openvsx'>
6254
<MobileMenuItemText>
@@ -127,17 +119,45 @@ export const MobileMenuContent: FunctionComponent = () => {
127119
</MobileMenuItemText>
128120
</RouteLink>
129121
</MobileMenuItem>
122+
{
123+
!location.pathname.startsWith(UserSettingsRoutes.ROOT)
124+
? <MobileMenuItem>
125+
<RouteLink to='/user-settings/extensions'>
126+
<MobileMenuItemText>
127+
<PublishIcon sx={itemIcon} />
128+
Publish Extension
129+
</MobileMenuItemText>
130+
</RouteLink>
131+
</MobileMenuItem>
132+
: null
133+
}
130134
</>;
131135
}
132136

133137

134138
//-------------------- Default View --------------------//
135139

140+
const headerItem = ({ theme }: { theme: Theme }) => ({
141+
margin: theme.spacing(2.5),
142+
color: theme.palette.text.primary,
143+
textDecoration: 'none',
144+
fontSize: '1.1rem',
145+
fontFamily: theme.typography.fontFamily,
146+
fontWeight: theme.typography.fontWeightLight,
147+
letterSpacing: 1,
148+
'&:hover': {
149+
color: theme.palette.secondary.main,
150+
textDecoration: 'none'
151+
}
152+
});
153+
136154
const headerTypography = ({ theme }: { theme: Theme }) => ({
137155
...headerItem({theme}),
138156
cursor: 'pointer'
139157
});
140158

159+
const MenuLink = styled(Link)(headerItem);
160+
const MenuRouteLink = styled(RouteLink)(headerItem);
141161
const MenuTypography = styled(Typography)(headerTypography);
142162

143163
const subMenuItem = ({ theme }: { theme: Theme }) => ({
@@ -156,14 +176,13 @@ const SubMenuLink = styled(Link)(subMenuLink);
156176

157177

158178
export const DefaultMenuContent: FunctionComponent = () => {
159-
const {service, user} = useContext(MainContext)
160179
const [workingGroupMenuOpen, setWorkingGroupMenuOpen] = useState(false);
161180
const workingGroupMenuEl = useRef<HTMLButtonElement | null>(null);
162181
const toggleWorkingGroupMenu = () => setWorkingGroupMenuOpen(!workingGroupMenuOpen);
163182
const closeWorkingGroupMenu = () => setWorkingGroupMenuOpen(false);
164183

165184
return <>
166-
<MenuLink href='https://github.com/EclipseFdn/open-vsx.org/wiki'>
185+
<MenuLink href='https://github.com/eclipse/openvsx/wiki'>
167186
Documentation
168187
</MenuLink>
169188
<MenuLink href='https://status.open-vsx.org/'>
@@ -191,16 +210,5 @@ export const DefaultMenuContent: FunctionComponent = () => {
191210
<Button variant='contained' color='secondary' href='/user-settings/extensions' sx={{ mx: 2.5 }}>
192211
Publish
193212
</Button>
194-
{
195-
user ?
196-
<UserAvatar />
197-
:
198-
<IconButton
199-
href={service.getLoginUrl()}
200-
title='Log In'
201-
aria-label='Log In' >
202-
<AccountBoxIcon />
203-
</IconButton>
204-
}
205213
</>;
206214
}

website/yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,7 +2399,7 @@ __metadata:
23992399
"@types/react-router-dom": "npm:^5.3.3"
24002400
css-loader: "npm:^6.8.1"
24012401
express: "npm:^4.21.1"
2402-
openvsx-webui: "npm:0.13.1-next.4864a03d"
2402+
openvsx-webui: "npm:0.13.0"
24032403
source-map-loader: "npm:^4.0.1"
24042404
style-loader: "npm:^3.3.3"
24052405
typescript: "npm:~5.1.6"
@@ -2420,9 +2420,9 @@ __metadata:
24202420
languageName: node
24212421
linkType: hard
24222422

2423-
"openvsx-webui@npm:0.13.1-next.4864a03d":
2424-
version: 0.13.1-next.4864a03d
2425-
resolution: "openvsx-webui@npm:0.13.1-next.4864a03d"
2423+
"openvsx-webui@npm:0.13.0":
2424+
version: 0.13.0
2425+
resolution: "openvsx-webui@npm:0.13.0"
24262426
dependencies:
24272427
"@emotion/react": "npm:^11.11.1"
24282428
"@emotion/styled": "npm:^11.11.0"
@@ -2448,7 +2448,7 @@ __metadata:
24482448
react-router-dom: "npm:^6.14.1"
24492449
peerDependencies:
24502450
"@babel/core": ^7.0.0
2451-
checksum: 10/4cd4cf9bcc0ddaea08bef8c56c087d5a954e23899f9fb5804c003c720873277a598a3ef4f9278349b20bb1f812ac7b479a1fa73cce5668a703f42e9acd4b7f46
2451+
checksum: 10/b0245fd107f2b88d86cf7fea5a9ded80ad9084a13fdff16904614f5bdeb9f750b916feb976748eee9da0e230065b0d9fc06f789f74153f21005d16eef57c1f07
24522452
languageName: node
24532453
linkType: hard
24542454

0 commit comments

Comments
 (0)