Skip to content

Commit 4e32ce0

Browse files
authored
Merge pull request #3377 from EclipseFdn/main
Release v0.21.0
2 parents b8a38f1 + c45b528 commit 4e32ce0

File tree

6 files changed

+102
-77
lines changed

6 files changed

+102
-77
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.1
1+
ARG SERVER_VERSION=v0.21.0
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.0
22+
ENV WEBSITE_VERSION 0.14.0
2323
COPY . /workdir
2424

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

configuration/application.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ server:
2525
spring:
2626
application:
2727
name: openvsx-server
28-
autoconfigure:
29-
# don't send traces to Zipkin
30-
exclude: org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration
3128
config:
3229
import: file:${DEPLOYMENT_CONFIG}
3330
cache:
@@ -84,7 +81,7 @@ management:
8481
exposure:
8582
include:
8683
- health
87-
# - prometheus
84+
- prometheus
8885
tracing:
8986
sampling:
9087
probability: 0.1

configuration/ehcache.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,40 @@
8080
<disk unit="MB">8</disk>
8181
</resources>
8282
</cache>
83+
<cache alias="files.webresource">
84+
<expiry>
85+
<tti unit="hours">1</tti>
86+
</expiry>
87+
<listeners>
88+
<listener>
89+
<class>org.eclipse.openvsx.cache.ExpiredFileListener</class>
90+
<event-firing-mode>ASYNCHRONOUS</event-firing-mode>
91+
<event-ordering-mode>UNORDERED</event-ordering-mode>
92+
<events-to-fire-on>EXPIRED</events-to-fire-on>
93+
<events-to-fire-on>EVICTED</events-to-fire-on>
94+
<events-to-fire-on>REMOVED</events-to-fire-on>
95+
</listener>
96+
</listeners>
97+
<resources>
98+
<heap>250</heap>
99+
</resources>
100+
</cache>
101+
<cache alias="files.extension">
102+
<expiry>
103+
<tti unit="hours">1</tti>
104+
</expiry>
105+
<listeners>
106+
<listener>
107+
<class>org.eclipse.openvsx.cache.ExpiredFileListener</class>
108+
<event-firing-mode>ASYNCHRONOUS</event-firing-mode>
109+
<event-ordering-mode>UNORDERED</event-ordering-mode>
110+
<events-to-fire-on>EXPIRED</events-to-fire-on>
111+
<events-to-fire-on>EVICTED</events-to-fire-on>
112+
<events-to-fire-on>REMOVED</events-to-fire-on>
113+
</listener>
114+
</listeners>
115+
<resources>
116+
<heap>50</heap>
117+
</resources>
118+
</cache>
83119
</config>

website/package.json

Lines changed: 2 additions & 2 deletions
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.0"
9+
"openvsx-webui": "0.14.0"
1010
},
1111
"peerDependencies": {
1212
"@babel/core": "^7.0.0"
@@ -17,7 +17,7 @@
1717
"@types/react-dom": "^18.2.6",
1818
"@types/react-router-dom": "^5.3.3",
1919
"css-loader": "^6.8.1",
20-
"express": "^4.21.1",
20+
"express": "^4.21.2",
2121
"source-map-loader": "^4.0.1",
2222
"style-loader": "^3.3.3",
2323
"typescript": "~5.1.6",

website/src/menu-content.tsx

Lines changed: 43 additions & 51 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, PropsWithChildren, useState, useRef } from 'react';
12-
import { Theme, Typography, Menu, MenuItem, Link, Button, Accordion, AccordionDetails, AccordionSummary } from '@mui/material';
11+
import React, { FunctionComponent, useState, useRef, useContext } from 'react';
12+
import { Theme, Typography, Menu, MenuItem, Link, Button, Accordion, AccordionDetails, AccordionSummary, IconButton } 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,33 +22,41 @@ 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';
2526
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';
2630

2731
//-------------------- Mobile View --------------------//
2832

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-
5033
export const MobileMenuContent: FunctionComponent = () => {
34+
const {service, user} = useContext(MainContext)
5135
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+
}
5260
<MobileMenuItem>
5361
<Link target='_blank' href='https://github.com/eclipse/openvsx'>
5462
<MobileMenuItemText>
@@ -119,45 +127,17 @@ export const MobileMenuContent: FunctionComponent = () => {
119127
</MobileMenuItemText>
120128
</RouteLink>
121129
</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-
}
134130
</>;
135131
}
136132

137133

138134
//-------------------- Default View --------------------//
139135

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-
154136
const headerTypography = ({ theme }: { theme: Theme }) => ({
155137
...headerItem({theme}),
156138
cursor: 'pointer'
157139
});
158140

159-
const MenuLink = styled(Link)(headerItem);
160-
const MenuRouteLink = styled(RouteLink)(headerItem);
161141
const MenuTypography = styled(Typography)(headerTypography);
162142

163143
const subMenuItem = ({ theme }: { theme: Theme }) => ({
@@ -176,6 +156,7 @@ const SubMenuLink = styled(Link)(subMenuLink);
176156

177157

178158
export const DefaultMenuContent: FunctionComponent = () => {
159+
const {service, user} = useContext(MainContext)
179160
const [workingGroupMenuOpen, setWorkingGroupMenuOpen] = useState(false);
180161
const workingGroupMenuEl = useRef<HTMLButtonElement | null>(null);
181162
const toggleWorkingGroupMenu = () => setWorkingGroupMenuOpen(!workingGroupMenuOpen);
@@ -210,5 +191,16 @@ export const DefaultMenuContent: FunctionComponent = () => {
210191
<Button variant='contained' color='secondary' href='/user-settings/extensions' sx={{ mx: 2.5 }}>
211192
Publish
212193
</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+
}
213205
</>;
214206
}

website/yarn.lock

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,9 +1703,9 @@ __metadata:
17031703
languageName: node
17041704
linkType: hard
17051705

1706-
"express@npm:^4.21.1":
1707-
version: 4.21.1
1708-
resolution: "express@npm:4.21.1"
1706+
"express@npm:^4.21.2":
1707+
version: 4.21.2
1708+
resolution: "express@npm:4.21.2"
17091709
dependencies:
17101710
accepts: "npm:~1.3.8"
17111711
array-flatten: "npm:1.1.1"
@@ -1726,7 +1726,7 @@ __metadata:
17261726
methods: "npm:~1.1.2"
17271727
on-finished: "npm:2.4.1"
17281728
parseurl: "npm:~1.3.3"
1729-
path-to-regexp: "npm:0.1.10"
1729+
path-to-regexp: "npm:0.1.12"
17301730
proxy-addr: "npm:~2.0.7"
17311731
qs: "npm:6.13.0"
17321732
range-parser: "npm:~1.2.1"
@@ -1738,7 +1738,7 @@ __metadata:
17381738
type-is: "npm:~1.6.18"
17391739
utils-merge: "npm:1.0.1"
17401740
vary: "npm:~1.1.2"
1741-
checksum: 10/5d4a36dd03c1d1cce93172e9b185b5cd13a978d29ee03adc51cd278be7b4a514ae2b63e2fdaec0c00fdc95c6cfb396d9dd1da147917ffd337d6cd0778e08c9bc
1741+
checksum: 10/34571c442fc8c9f2c4b442d2faa10ea1175cf8559237fc6a278f5ce6254a8ffdbeb9a15d99f77c1a9f2926ab183e3b7ba560e3261f1ad4149799e3412ab66bd1
17421742
languageName: node
17431743
linkType: hard
17441744

@@ -2330,11 +2330,11 @@ __metadata:
23302330
linkType: hard
23312331

23322332
"nanoid@npm:^3.3.6":
2333-
version: 3.3.6
2334-
resolution: "nanoid@npm:3.3.6"
2333+
version: 3.3.8
2334+
resolution: "nanoid@npm:3.3.8"
23352335
bin:
23362336
nanoid: bin/nanoid.cjs
2337-
checksum: 10/67235c39d1bc05851383dadde5cf77ae1c90c2a1d189e845c7f20f646f0488d875ad5f5226bbba072a88cebbb085a3f784a6673117daf785bdf614a852550362
2337+
checksum: 10/2d1766606cf0d6f47b6f0fdab91761bb81609b2e3d367027aff45e6ee7006f660fb7e7781f4a34799fe6734f1268eeed2e37a5fdee809ade0c2d4eb11b0f9c40
23382338
languageName: node
23392339
linkType: hard
23402340

@@ -2398,8 +2398,8 @@ __metadata:
23982398
"@types/react-dom": "npm:^18.2.6"
23992399
"@types/react-router-dom": "npm:^5.3.3"
24002400
css-loader: "npm:^6.8.1"
2401-
express: "npm:^4.21.1"
2402-
openvsx-webui: "npm:0.13.0"
2401+
express: "npm:^4.21.2"
2402+
openvsx-webui: "npm:0.14.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.0":
2424-
version: 0.13.0
2425-
resolution: "openvsx-webui@npm:0.13.0"
2423+
"openvsx-webui@npm:0.14.0":
2424+
version: 0.14.0
2425+
resolution: "openvsx-webui@npm:0.14.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/b0245fd107f2b88d86cf7fea5a9ded80ad9084a13fdff16904614f5bdeb9f750b916feb976748eee9da0e230065b0d9fc06f789f74153f21005d16eef57c1f07
2451+
checksum: 10/e2128612aebd8d42d2bb9399d4adce64c3efb812b60f53c57cefc625ce52e60c36bd7fdd9c1cb186f13f774bb6e0e6f7c0530cc428e9a364ad8e1c533e930abe
24522452
languageName: node
24532453
linkType: hard
24542454

@@ -2526,10 +2526,10 @@ __metadata:
25262526
languageName: node
25272527
linkType: hard
25282528

2529-
"path-to-regexp@npm:0.1.10":
2530-
version: 0.1.10
2531-
resolution: "path-to-regexp@npm:0.1.10"
2532-
checksum: 10/894e31f1b20e592732a87db61fff5b95c892a3fe430f9ab18455ebe69ee88ef86f8eb49912e261f9926fc53da9f93b46521523e33aefd9cb0a7b0d85d7096006
2529+
"path-to-regexp@npm:0.1.12":
2530+
version: 0.1.12
2531+
resolution: "path-to-regexp@npm:0.1.12"
2532+
checksum: 10/2e30f6a0144679c1f95c98e166b96e6acd1e72be9417830fefc8de7ac1992147eb9a4c7acaa59119fb1b3c34eec393b2129ef27e24b2054a3906fc4fb0d1398e
25332533
languageName: node
25342534
linkType: hard
25352535

0 commit comments

Comments
 (0)