Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ router.get('*', (req, res, next) => {
if (env.NODE_ENV === 'development') {
// Prevent proxy recursion
(req.query as any).devproxy = true;
const frontendUrl = `http://${req.hostname}:5173`;
return res.redirect(
env.FRONTEND_URL +
frontendUrl +
req.path +
QueryString.stringify(req.query, { addQueryPrefix: true })
);
Expand Down
3 changes: 2 additions & 1 deletion src/routes/(election)/STVAlternativesList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@

.icon {
display: flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
border-radius: 2px;
height: 100%;
width: 15%;
width: 50px;
transition: box-shadow 0.2s ease-in-out;

&:hover {
Expand Down
21 changes: 11 additions & 10 deletions src/routes/(election)/STVPriorityListItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
<div class="content">
<div class="drag"><i class="fa fa-bars" data-testid="drag" /></div>
<div>
<div class="text-wrapper">
<p>{alternative.description}</p>
</div>
</div>
Expand All @@ -21,9 +21,15 @@
@import '../../variables.scss';

.content {
line-height: 60px;
display: flex;
align-items: center;
flex: 1;
min-width: 0;
text-align: center;
flex-grow: 1;

.text-wrapper {
flex: 1;
}

p {
color: darken($font-gray, 20%);
Expand Down Expand Up @@ -52,7 +58,7 @@
justify-content: center;
border-radius: 2px;
height: 100%;
width: 15%;
width: 50px;
transition: box-shadow 0.2s ease-in-out;

&:hover {
Expand Down Expand Up @@ -86,11 +92,6 @@
}
}
.drag {
position: absolute;
height: 100%;
line-height: 60px;
width: 10%;
height: 100%;
vertical-align: middle;
margin-left: 10px;
}
</style>
11 changes: 9 additions & 2 deletions vite.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ const config = {
allow: ['app', 'build', 'usage.yml'],
},
proxy: {
'^/$': `http://${env.HOST}:${env.PORT}/`,
'/api': `http://${env.HOST}:${env.PORT}`,
'^/$': {
target: `http://${env.HOST}:${env.PORT}/`,
changeOrigin: false,
},
'/api': {
target: `http://${env.HOST}:${env.PORT}`,
changeOrigin: false,
},
'/socket.io': {
target: `ws://${env.HOST}:${env.PORT}`,
ws: true,
changeOrigin: false,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ export default defineConfig({
}),
],
optimizeDeps: {
exclude: ['nib'],
exclude: ['nib', 'webpack', 'webpack-dev-middleware'],
},
});
Loading