From a25fb939b31ca22de26253808ebcb61e9842ecd7 Mon Sep 17 00:00:00 2001 From: nquidox Date: Tue, 7 Oct 2025 20:38:52 +0300 Subject: [PATCH 01/10] small update --- src/components/ChartBlock.vue | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/components/ChartBlock.vue b/src/components/ChartBlock.vue index c70f039..96a5243 100644 --- a/src/components/ChartBlock.vue +++ b/src/components/ChartBlock.vue @@ -137,11 +137,9 @@ const chartOptions = { watch( () => props.chartsData, (newData) => { - // Сброс состояния showPlaceholder.value = false placeholderMessage.value = '' - // Случай 1: null или undefined if (newData === null || newData === undefined) { showPlaceholder.value = true placeholderMessage.value = 'No prices found' @@ -149,7 +147,6 @@ watch( return } - // Случай 2: явная ошибка в объекте if (typeof newData === 'object' && newData.error) { showPlaceholder.value = true placeholderMessage.value = newData.error @@ -157,13 +154,11 @@ watch( return } - // Случай 3: нормальный объект — пробуем преобразовать let datasets = [] if (newData.origins && Array.isArray(newData.origins)) { datasets = transformToChartJSSeries(newData) } - // 🔥 Ключевое изменение: проверяем, есть ли хоть один датасет if (datasets.length === 0) { showPlaceholder.value = true placeholderMessage.value = 'No prices found' From d25d121293bbeb98fa14e1c25dc95f5ea3119878 Mon Sep 17 00:00:00 2001 From: nquidox Date: Tue, 7 Oct 2025 20:39:03 +0300 Subject: [PATCH 02/10] created --- src/components/CopyToClipboard.vue | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/components/CopyToClipboard.vue diff --git a/src/components/CopyToClipboard.vue b/src/components/CopyToClipboard.vue new file mode 100644 index 0000000..0100e5f --- /dev/null +++ b/src/components/CopyToClipboard.vue @@ -0,0 +1,48 @@ + + + + + From f3660160a5deefb0fc6c1129787b9b73d38edc6a Mon Sep 17 00:00:00 2001 From: nquidox Date: Tue, 7 Oct 2025 20:39:15 +0300 Subject: [PATCH 03/10] styles added --- src/styles/styles.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/styles/styles.css b/src/styles/styles.css index b8994a0..665f0c1 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -100,3 +100,15 @@ :deep(.mobile-full-width) { width: 100%; } + +.default-color{ + color: #18a058; +} + +.underline { + text-decoration: underline; +} + +.link-like-text { + cursor: pointer; +} From 5593d592792654ee57cb4f42144c99d4199b0ff7 Mon Sep 17 00:00:00 2001 From: nquidox Date: Tue, 7 Oct 2025 20:39:35 +0300 Subject: [PATCH 04/10] providers added --- src/App.vue | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/App.vue b/src/App.vue index d6e1430..8d44dae 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,21 +3,36 @@ import NavBar from '@/components/Navbar/NavBar.vue' From 3a068f57dcea963d3f336daac480b49f4eb944f0 Mon Sep 17 00:00:00 2001 From: nquidox Date: Tue, 7 Oct 2025 20:39:49 +0300 Subject: [PATCH 05/10] link edit refactor --- src/views/DetailsView.vue | 73 +++++++++++++-- src/views/DetailsView/EditLink.vue | 141 +++++++++++++++-------------- 2 files changed, 142 insertions(+), 72 deletions(-) diff --git a/src/views/DetailsView.vue b/src/views/DetailsView.vue index 587d625..1c54897 100644 --- a/src/views/DetailsView.vue +++ b/src/views/DetailsView.vue @@ -6,6 +6,7 @@ import PeriodSelector from '@/components/PeriodSelector.vue' import ChartBlock from '@/components/ChartBlock.vue' import { useChartsApi } from '@/api/charts.js' import EditLink from '@/views/DetailsView/EditLink.vue' +import CopyToClipboard from '@/components/CopyToClipboard.vue' const { getMerchDetails, deleteMerch } = useMerchApi() const { getDistinctPrices } = useChartsApi() @@ -17,6 +18,11 @@ const props = defineProps({ }, }) +const editing = ref({ + surugaya: false, + mandarake: false, +}) + const merchDetails = ref(null) const loading = ref(true) const error = ref(null) @@ -76,11 +82,15 @@ const fetchPrices = async (days = 7) => { } } +function handleLinkUpdate(origin, newLink) { + merchDetails.value[`origin_${origin}`].link = newLink + editing.value[origin] = false +} + function handleSelectDays(days) { fetchPrices(days) } - onMounted(() => { fetchMerch() fetchPrices(7) @@ -102,20 +112,71 @@ onMounted(() => { - Surugaya + + + Surugaya + +
+ + +
+ + :model-value="merchDetails.origin_surugaya?.link || ''" + @update:model-value="handleLinkUpdate('surugaya', $event)" + @cancel-edit="editing.surugaya = false" + /> + + + + Mandarake + +
+ + +
- Mandarake - + :model-value="merchDetails.origin_mandarake?.link || ''" + @update:model-value="handleLinkUpdate('mandarake', $event)" + @cancel-edit="editing.mandarake = false" + />
Not found
diff --git a/src/views/DetailsView/EditLink.vue b/src/views/DetailsView/EditLink.vue index 81a2376..eb78956 100644 --- a/src/views/DetailsView/EditLink.vue +++ b/src/views/DetailsView/EditLink.vue @@ -1,5 +1,5 @@ From 122f123ba6922496ccb1608e1197e323ed89dff9 Mon Sep 17 00:00:00 2001 From: nquidox Date: Sun, 12 Oct 2025 13:41:28 +0300 Subject: [PATCH 06/10] update --- Dockerfile | 14 +++++++++++++- src/main.js | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6ff35c8..7737ca2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,17 @@ +FROM node:24.10-alpine3.22 AS builder + +WORKDIR /app + +COPY package*.json ./ +RUN npm ci --prefer-offline --no-audit + +COPY . . + +RUN npm run build + FROM nginx:alpine -COPY dist/ /usr/share/nginx/html + +COPY --from=builder /app/dist/ /usr/share/nginx/html/ COPY nginx.conf /etc/nginx/nginx.conf diff --git a/src/main.js b/src/main.js index aa2ca8c..0c32ddd 100644 --- a/src/main.js +++ b/src/main.js @@ -7,7 +7,7 @@ import App from './App.vue' import router from './router' const app = createApp(App) -export const BASE_URL = 'http://localhost:9090/api/v2' +export const BASE_URL = 'https://api.nqws.ru/api/v2' app.use(createPinia()) app.use(router) From a62258819f67d74d3ba05de2f83b2b14d6dd26ad Mon Sep 17 00:00:00 2001 From: nquidox Date: Sun, 12 Oct 2025 14:20:25 +0300 Subject: [PATCH 07/10] added --- src/App.vue | 2 ++ src/components/Footer/Footer.vue | 12 ++++++++++++ src/styles/styles.css | 8 ++++++++ 3 files changed, 22 insertions(+) create mode 100644 src/components/Footer/Footer.vue diff --git a/src/App.vue b/src/App.vue index 8d44dae..ec2a28a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,6 @@ diff --git a/src/styles/styles.css b/src/styles/styles.css index 665f0c1..5c4660b 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -2,6 +2,10 @@ margin-top: 10px; } +.mb-10 { + margin-bottom: 10px; +} + .mb-20 { margin-bottom: 30px; } @@ -53,6 +57,10 @@ text-align: center; } +.text-muted { + opacity: 0.6; +} + .sticky-search-container { position: sticky; top: 0; From 4735899c394ab335f18326365bc96b956d868462 Mon Sep 17 00:00:00 2001 From: nquidox Date: Sun, 12 Oct 2025 14:21:37 +0300 Subject: [PATCH 08/10] base link exported --- src/main.js | 3 +++ src/views/AddMerchView.vue | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.js b/src/main.js index 0c32ddd..753d4a0 100644 --- a/src/main.js +++ b/src/main.js @@ -8,6 +8,9 @@ import router from './router' const app = createApp(App) export const BASE_URL = 'https://api.nqws.ru/api/v2' +// export const BASE_URL = 'http://localhost:9090/api/v2' + +export const BASE_MANDARAKE_LINK = 'https://order.mandarake.co.jp/order/listPage/list?soldOut=1&keyword=' app.use(createPinia()) app.use(router) diff --git a/src/views/AddMerchView.vue b/src/views/AddMerchView.vue index eb12ff6..a1af5f8 100644 --- a/src/views/AddMerchView.vue +++ b/src/views/AddMerchView.vue @@ -2,11 +2,10 @@ import router from '@/router/index.js' import { computed, ref } from 'vue' import { useMerchApi } from '@/api/merch.js' +import { BASE_MANDARAKE_LINK } from '@/main.js' const { addMerch } = useMerchApi() -const mandarakeLink = 'https://order.mandarake.co.jp/order/listPage/list?soldOut=1&keyword=' - const name = ref('') // surugaya block @@ -17,7 +16,7 @@ const checkAutoComplete = ref(true) const customLink = ref('') const mandarakeAutocomplete = computed(() => { - return `${mandarakeLink}${name.value}` + return `${BASE_MANDARAKE_LINK}${name.value}` }) const mandarakeResultLink = computed({ From 142a422052a8329ee658a1a1897167cd9dc1541c Mon Sep 17 00:00:00 2001 From: nquidox Date: Sun, 12 Oct 2025 14:42:14 +0300 Subject: [PATCH 09/10] insert auto-completed link button for mandarake --- src/views/DetailsView/EditLink.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/views/DetailsView/EditLink.vue b/src/views/DetailsView/EditLink.vue index eb78956..d855a40 100644 --- a/src/views/DetailsView/EditLink.vue +++ b/src/views/DetailsView/EditLink.vue @@ -1,6 +1,7 @@