From f1d1effa7e2ab6dc6ee5af876ef9395221af8140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B5=D0=BB=D0=B5=D0=BD=D1=81=D0=BA=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=81=D1=82=D0=B0=D1=81=D0=B8=D1=8F=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5=D0=B2=D0=BD=D0=B0?= Date: Fri, 28 Jun 2024 15:37:47 +0300 Subject: [PATCH 1/6] sidebar --- back/object/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/object/models.py b/back/object/models.py index 0dfc53e..113b884 100644 --- a/back/object/models.py +++ b/back/object/models.py @@ -29,7 +29,7 @@ class Scene3D(models.Model): elements = models.ManyToManyField(Element3D) min_distance = models.IntegerField( - validators=[MinValueValidator(1), MaxValueValidator(200)], blank=True, null=True + validators=[MinValueValidator(1), MaxValueValidator(400)], blank=True, null=True ) max_distance = models.IntegerField( validators=[MinValueValidator(2), MaxValueValidator(500)], blank=True, null=True From 2768ee987703f33a0e4b614dc3ef376d2dda07bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B5=D0=BB=D0=B5=D0=BD=D1=81=D0=BA=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=81=D1=82=D0=B0=D1=81=D0=B8=D1=8F=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5=D0=B2=D0=BD=D0=B0?= Date: Fri, 28 Jun 2024 15:42:26 +0300 Subject: [PATCH 2/6] side --- front/src/components/Promo/sidebar.vue | 32 +++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/front/src/components/Promo/sidebar.vue b/front/src/components/Promo/sidebar.vue index 9a38597..ba2d512 100644 --- a/front/src/components/Promo/sidebar.vue +++ b/front/src/components/Promo/sidebar.vue @@ -19,9 +19,10 @@ onClickOutside(sidebar_obj, () => sidebar.close()) - + {{ sidebar.target_name }} + @@ -59,5 +60,34 @@ onClickOutside(sidebar_obj, () => sidebar.close()) margin: 1rem 0; font-size: 1.25rem; } + .btn { + color: white; + transition: .2s linear; + background: #0B63F6; + padding-top: 5px; + padding-bottom: 7px; + display: block; + text-align: center; + text-decoration: none; + min-width: 300px; + min-height: 60px; + display: inline-flex; + font-family: 'Nunito', sans-serif; + font-size: 22px; + align-items: center; + justify-content: center; + text-transform: uppercase; + letter-spacing: 1.3px; + font-weight: 700; + color: #313133; + background: #4FD1C5; +background: linear-gradient(90deg, rgba(129,230,217,1) 0%, rgba(79,209,197,1) 100%); + border-radius: 1000px; + box-shadow: 12px 12px 24px rgba(79,209,197,.64); +} + +.btn:hover { + box-shadow: 0 0 0 2px white, 0 0 0 4px #3C82F8; +} } \ No newline at end of file From 6b795a332908903ed6071a9da006366c40410efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B5=D0=BB=D0=B5=D0=BD=D1=81=D0=BA=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=81=D1=82=D0=B0=D1=81=D0=B8=D1=8F=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5=D0=B2=D0=BD=D0=B0?= Date: Fri, 28 Jun 2024 15:51:17 +0300 Subject: [PATCH 3/6] nodel --- back/object/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/back/object/models.py b/back/object/models.py index 113b884..a9d6c21 100644 --- a/back/object/models.py +++ b/back/object/models.py @@ -29,10 +29,10 @@ class Scene3D(models.Model): elements = models.ManyToManyField(Element3D) min_distance = models.IntegerField( - validators=[MinValueValidator(1), MaxValueValidator(400)], blank=True, null=True + validators=[MinValueValidator(1), MaxValueValidator(600)], blank=True, null=True ) max_distance = models.IntegerField( - validators=[MinValueValidator(2), MaxValueValidator(500)], blank=True, null=True + validators=[MinValueValidator(2), MaxValueValidator(1000)], blank=True, null=True ) def __str__(self): From 575b4b5f11c9563981fe42259a2e57e2ceedb6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B5=D0=BB=D0=B5=D0=BD=D1=81=D0=BA=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=81=D1=82=D0=B0=D1=81=D0=B8=D1=8F=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5=D0=B2=D0=BD=D0=B0?= Date: Fri, 28 Jun 2024 16:22:09 +0300 Subject: [PATCH 4/6] main --- front/src/components/Promo/main.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/components/Promo/main.vue b/front/src/components/Promo/main.vue index 27d307a..ddd9ab3 100644 --- a/front/src/components/Promo/main.vue +++ b/front/src/components/Promo/main.vue @@ -77,7 +77,7 @@ watch(() => route.params.target, () => { - + From e88b91476b8fe2fb588b728c94b0139cab94e7c0 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Fri, 28 Jun 2024 16:34:29 +0300 Subject: [PATCH 5/6] remove raycaster --- .vscode/PythonImportHelper-v2-Completion.json | 2 +- front/src/components/Promo/load_models.vue | 95 ++++++++++--------- front/src/components/Promo/main.vue | 14 +-- front/src/components/Promo/sidebar.vue | 61 ++++++------ front/src/index.d.ts | 1 + front/src/stores/promo_sidebar.ts | 6 +- 6 files changed, 91 insertions(+), 88 deletions(-) diff --git a/.vscode/PythonImportHelper-v2-Completion.json b/.vscode/PythonImportHelper-v2-Completion.json index 2bd7e33..ed15c0c 100644 --- a/.vscode/PythonImportHelper-v2-Completion.json +++ b/.vscode/PythonImportHelper-v2-Completion.json @@ -1100,7 +1100,7 @@ "kind": 6, "importPath": "back.object.models", "description": "back.object.models", - "peekOfCode": "class Scene3D(models.Model):\n name = models.CharField(\n max_length=120,\n )\n elements = models.ManyToManyField(Element3D)\n min_distance = models.IntegerField(\n validators=[MinValueValidator(1), MaxValueValidator(200)], blank=True, null=True\n )\n max_distance = models.IntegerField(\n validators=[MinValueValidator(2), MaxValueValidator(200)], blank=True, null=True", + "peekOfCode": "class Scene3D(models.Model):\n name = models.CharField(\n max_length=120,\n )\n elements = models.ManyToManyField(Element3D)\n min_distance = models.IntegerField(\n validators=[MinValueValidator(1), MaxValueValidator(400)], blank=True, null=True\n )\n max_distance = models.IntegerField(\n validators=[MinValueValidator(2), MaxValueValidator(500)], blank=True, null=True", "detail": "back.object.models", "documentation": {} }, diff --git a/front/src/components/Promo/load_models.vue b/front/src/components/Promo/load_models.vue index 9ab16da..7ecd0d3 100644 --- a/front/src/components/Promo/load_models.vue +++ b/front/src/components/Promo/load_models.vue @@ -1,7 +1,7 @@ @@ -60,34 +60,35 @@ onClickOutside(sidebar_obj, () => sidebar.close()) margin: 1rem 0; font-size: 1.25rem; } - .btn { - color: white; - transition: .2s linear; - background: #0B63F6; - padding-top: 5px; - padding-bottom: 7px; - display: block; - text-align: center; - text-decoration: none; - min-width: 300px; - min-height: 60px; - display: inline-flex; - font-family: 'Nunito', sans-serif; - font-size: 22px; - align-items: center; - justify-content: center; - text-transform: uppercase; - letter-spacing: 1.3px; - font-weight: 700; - color: #313133; - background: #4FD1C5; -background: linear-gradient(90deg, rgba(129,230,217,1) 0%, rgba(79,209,197,1) 100%); - border-radius: 1000px; - box-shadow: 12px 12px 24px rgba(79,209,197,.64); -} -.btn:hover { - box-shadow: 0 0 0 2px white, 0 0 0 4px #3C82F8; -} + .btn { + color: white; + transition: .2s linear; + background: #0B63F6; + padding-top: 5px; + padding-bottom: 7px; + display: block; + text-align: center; + text-decoration: none; + min-width: 300px; + min-height: 60px; + display: inline-flex; + font-family: 'Nunito', sans-serif; + font-size: 22px; + align-items: center; + justify-content: center; + text-transform: uppercase; + letter-spacing: 1.3px; + font-weight: 700; + color: #313133; + background: #4FD1C5; + background: linear-gradient(90deg, rgba(129, 230, 217, 1) 0%, rgba(79, 209, 197, 1) 100%); + border-radius: 1000px; + box-shadow: 12px 12px 24px rgba(79, 209, 197, .64); + } + + .btn:hover { + box-shadow: 0 0 0 2px white, 0 0 0 4px #3C82F8; + } } \ No newline at end of file diff --git a/front/src/index.d.ts b/front/src/index.d.ts index 3d77e52..7e432e4 100644 --- a/front/src/index.d.ts +++ b/front/src/index.d.ts @@ -37,6 +37,7 @@ interface clickableAreaType { object_name: string; source: number; target: number; + target_name?: string } interface PromoSidebarData { title: string diff --git a/front/src/stores/promo_sidebar.ts b/front/src/stores/promo_sidebar.ts index 4553a91..0921385 100644 --- a/front/src/stores/promo_sidebar.ts +++ b/front/src/stores/promo_sidebar.ts @@ -20,8 +20,10 @@ export const usePromoSidebar = defineStore('promo_sidebar', { this.$state = Object.assign(this.$state, data) }, close() { - this.$reset() - this.is_open = false + if (this.is_open) { + this.$reset() + this.is_open = false + } } } }) From 5ebd162e248d243f33fae2193504bf45cca0e5cb Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Fri, 28 Jun 2024 16:35:28 +0300 Subject: [PATCH 6/6] merge --- .vscode/PythonImportHelper-v2-Completion.json | 2 +- front/src/components/Promo/main.vue | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.vscode/PythonImportHelper-v2-Completion.json b/.vscode/PythonImportHelper-v2-Completion.json index ed15c0c..ec758ce 100644 --- a/.vscode/PythonImportHelper-v2-Completion.json +++ b/.vscode/PythonImportHelper-v2-Completion.json @@ -1100,7 +1100,7 @@ "kind": 6, "importPath": "back.object.models", "description": "back.object.models", - "peekOfCode": "class Scene3D(models.Model):\n name = models.CharField(\n max_length=120,\n )\n elements = models.ManyToManyField(Element3D)\n min_distance = models.IntegerField(\n validators=[MinValueValidator(1), MaxValueValidator(400)], blank=True, null=True\n )\n max_distance = models.IntegerField(\n validators=[MinValueValidator(2), MaxValueValidator(500)], blank=True, null=True", + "peekOfCode": "class Scene3D(models.Model):\n name = models.CharField(\n max_length=120,\n )\n elements = models.ManyToManyField(Element3D)\n min_distance = models.IntegerField(\n validators=[MinValueValidator(1), MaxValueValidator(600)], blank=True, null=True\n )\n max_distance = models.IntegerField(\n validators=[MinValueValidator(2), MaxValueValidator(1000)], blank=True, null=True", "detail": "back.object.models", "documentation": {} }, diff --git a/front/src/components/Promo/main.vue b/front/src/components/Promo/main.vue index e76bb6b..47f854e 100644 --- a/front/src/components/Promo/main.vue +++ b/front/src/components/Promo/main.vue @@ -68,10 +68,6 @@ watch(() => route.params.target, () => { - - - -