diff --git a/app/routes/index.ts b/app/routes/index.ts
index f0f6889c..c3afe75d 100644
--- a/app/routes/index.ts
+++ b/app/routes/index.ts
@@ -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 })
);
diff --git a/src/routes/(election)/STVAlternativesList.svelte b/src/routes/(election)/STVAlternativesList.svelte
index 5fb5384c..4839814a 100644
--- a/src/routes/(election)/STVAlternativesList.svelte
+++ b/src/routes/(election)/STVAlternativesList.svelte
@@ -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 {
diff --git a/src/routes/(election)/STVPriorityListItem.svelte b/src/routes/(election)/STVPriorityListItem.svelte
index c63232ae..75be31cf 100644
--- a/src/routes/(election)/STVPriorityListItem.svelte
+++ b/src/routes/(election)/STVPriorityListItem.svelte
@@ -9,7 +9,7 @@
-
+
{alternative.description}
@@ -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%);
@@ -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 {
@@ -86,11 +92,6 @@
}
}
.drag {
- position: absolute;
- height: 100%;
- line-height: 60px;
- width: 10%;
- height: 100%;
- vertical-align: middle;
+ margin-left: 10px;
}
diff --git a/vite.client.ts b/vite.client.ts
index 36ae81ba..74fb086a 100644
--- a/vite.client.ts
+++ b/vite.client.ts
@@ -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,
},
},
},
diff --git a/vite.config.ts b/vite.config.ts
index a767c6c0..d1cd91a9 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -36,6 +36,6 @@ export default defineConfig({
}),
],
optimizeDeps: {
- exclude: ['nib'],
+ exclude: ['nib', 'webpack', 'webpack-dev-middleware'],
},
});