codex2
This commit is contained in:
13
webui/Dockerfile
Normal file
13
webui/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM node:20-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package.json ./
|
||||
COPY package-lock.json* ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
13
webui/index.html
Normal file
13
webui/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>PriceWatch Web UI</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
17
webui/nginx.conf
Normal file
17
webui/nginx.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://api:8000/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
22
webui/package.json
Normal file
22
webui/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "pricewatch-webui",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^6.5.2",
|
||||
"vue": "^3.4.27"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^5.1.2",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"postcss": "^8.4.41",
|
||||
"tailwindcss": "^3.4.10",
|
||||
"vite": "^5.4.2"
|
||||
}
|
||||
}
|
||||
6
webui/postcss.config.js
Normal file
6
webui/postcss.config.js
Normal file
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
5
webui/public/favicon.svg
Normal file
5
webui/public/favicon.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<rect width="64" height="64" rx="14" fill="#3c3836" />
|
||||
<circle cx="32" cy="32" r="18" fill="#fe8019" />
|
||||
<path d="M18 34c6-6 22-6 28 0" fill="none" stroke="#282828" stroke-width="4" stroke-linecap="round" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 281 B |
1566
webui/src/App.vue
Normal file
1566
webui/src/App.vue
Normal file
File diff suppressed because it is too large
Load Diff
281
webui/src/index.css
Normal file
281
webui/src/index.css
Normal file
@@ -0,0 +1,281 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
:root {
|
||||
color-scheme: light dark;
|
||||
}
|
||||
|
||||
.app-root {
|
||||
--bg: #282828;
|
||||
--surface: #3c3836;
|
||||
--surface-2: #504945;
|
||||
--text: #ebdbb2;
|
||||
--muted: #a89984;
|
||||
--accent: #fe8019;
|
||||
--danger: #fb4934;
|
||||
--success: #b8bb26;
|
||||
--warning: #fabd2f;
|
||||
--shadow: rgba(0, 0, 0, 0.45);
|
||||
--radius: 14px;
|
||||
--font-title: "Space Mono", "JetBrains Mono", "Fira Code", monospace;
|
||||
--font-body: "JetBrains Mono", "Fira Code", "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
|
||||
--font-mono: "JetBrains Mono", "Fira Code", "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
|
||||
--font-size: 16px;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-height: 100vh;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--font-size);
|
||||
}
|
||||
|
||||
.app-root.theme-gruvbox-dark {
|
||||
--bg: #282828;
|
||||
--surface: #3c3836;
|
||||
--surface-2: #504945;
|
||||
--text: #ebdbb2;
|
||||
--muted: #a89984;
|
||||
--accent: #fe8019;
|
||||
--danger: #fb4934;
|
||||
--success: #b8bb26;
|
||||
--warning: #fabd2f;
|
||||
--shadow: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
.app-root.theme-gruvbox-light {
|
||||
--bg: #fbf1c7;
|
||||
--surface: #f2e5bc;
|
||||
--surface-2: #ebdbb2;
|
||||
--text: #3c3836;
|
||||
--muted: #7c6f64;
|
||||
--accent: #d65d0e;
|
||||
--danger: #cc241d;
|
||||
--success: #98971a;
|
||||
--warning: #d79921;
|
||||
--shadow: rgba(60, 56, 54, 0.25);
|
||||
}
|
||||
|
||||
.app-root.theme-monokai-dark {
|
||||
--bg: #1f1f1b;
|
||||
--surface: #272822;
|
||||
--surface-2: #3b3c35;
|
||||
--text: #f8f8f2;
|
||||
--muted: #9b9a84;
|
||||
--accent: #f92672;
|
||||
--danger: #fd5ff1;
|
||||
--success: #a6e22e;
|
||||
--warning: #fd971f;
|
||||
--shadow: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.app-root.theme-monokai-light {
|
||||
--bg: #f8f8f2;
|
||||
--surface: #e8e8e3;
|
||||
--surface-2: #dcdcd2;
|
||||
--text: #272822;
|
||||
--muted: #75715e;
|
||||
--accent: #f92672;
|
||||
--danger: #c0005f;
|
||||
--success: #2d8f2d;
|
||||
--warning: #fd971f;
|
||||
--shadow: rgba(39, 40, 34, 0.2);
|
||||
}
|
||||
|
||||
.app-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 40;
|
||||
background: linear-gradient(90deg, var(--surface), var(--surface-2));
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
box-shadow: 0 10px 24px var(--shadow);
|
||||
}
|
||||
|
||||
.vintage-shadow {
|
||||
box-shadow: 0 14px 28px var(--shadow);
|
||||
}
|
||||
|
||||
.icon-btn {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 50%;
|
||||
background: var(--surface-2);
|
||||
color: var(--text);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: transform 0.15s ease, background 0.15s ease;
|
||||
}
|
||||
|
||||
.icon-btn:hover {
|
||||
background: var(--accent);
|
||||
color: #1b1b1b;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.icon-btn:active {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
.pill {
|
||||
border-radius: 999px;
|
||||
padding: 4px 10px;
|
||||
font-size: 0.75rem;
|
||||
background: var(--surface-2);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.panel {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
box-shadow: 0 10px 24px var(--shadow);
|
||||
}
|
||||
|
||||
.card-accent {
|
||||
border: 1px solid rgba(254, 128, 25, 0.5);
|
||||
box-shadow: 0 10px 30px rgba(254, 128, 25, 0.2);
|
||||
}
|
||||
|
||||
.density-dense .card {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.density-comfort .card {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-family: var(--font-title);
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 0.8rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 100%;
|
||||
background: var(--surface-2);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 10px;
|
||||
padding: 8px 10px;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.input:focus {
|
||||
outline: 2px solid rgba(254, 128, 25, 0.4);
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 280px;
|
||||
min-width: 240px;
|
||||
}
|
||||
|
||||
.detail-panel {
|
||||
width: 320px;
|
||||
min-width: 280px;
|
||||
}
|
||||
|
||||
.image-toggle {
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 12px;
|
||||
padding: 2px;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
transition: transform 0.15s ease, background 0.15s ease, border 0.15s ease;
|
||||
}
|
||||
|
||||
.image-toggle:hover {
|
||||
border-color: rgba(254, 128, 25, 0.8);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.image-toggle.selected {
|
||||
background: rgba(254, 128, 25, 0.15);
|
||||
border-color: rgba(254, 128, 25, 0.9);
|
||||
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.log-status-panel {
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.log-entry {
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
|
||||
.log-entry-error {
|
||||
border-color: rgba(251, 73, 52, 0.7);
|
||||
background: rgba(251, 73, 52, 0.07);
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.detail-popup {
|
||||
border-radius: calc(var(--radius) * 1.2);
|
||||
border-width: 1px;
|
||||
max-height: calc(100vh - 60px);
|
||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.view-mode-btn.active-view {
|
||||
background: var(--accent);
|
||||
color: #1b1b1b;
|
||||
}
|
||||
|
||||
.app-root.layout-compact .sidebar,
|
||||
.app-root.layout-compact .detail-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.app-root.layout-compact .product-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.app-root.layout-wide .sidebar {
|
||||
width: 320px;
|
||||
}
|
||||
|
||||
.app-root.layout-wide .detail-panel {
|
||||
width: 360px;
|
||||
}
|
||||
|
||||
.compare-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.product-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.sidebar {
|
||||
display: none;
|
||||
}
|
||||
.detail-panel {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.app-header .toolbar-text {
|
||||
display: none;
|
||||
}
|
||||
.icon-btn {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
.product-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
6
webui/src/main.js
Normal file
6
webui/src/main.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createApp } from "vue";
|
||||
import App from "./App.vue";
|
||||
import "./index.css";
|
||||
import "@fortawesome/fontawesome-free/css/all.min.css";
|
||||
|
||||
createApp(App).mount("#app");
|
||||
7
webui/tailwind.config.js
Normal file
7
webui/tailwind.config.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export default {
|
||||
content: ["./index.html", "./src/**/*.{vue,js,ts}"],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
9
webui/vite.config.js
Normal file
9
webui/vite.config.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
server: {
|
||||
port: 3000,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user