From 03f459b76fe73a3a84ddf5bab5339405ffad8832 Mon Sep 17 00:00:00 2001 From: Moises Sacal Date: Tue, 12 Dec 2023 16:30:35 +1100 Subject: [PATCH] changed buttons on sidebar --- package-lock.json | 4 +- package.json | 2 +- src/components.d.ts | 2 - src/components/Input.vue | 743 +++++++++++++------------- src/components/layouts/BaseHeader.vue | 2 +- 5 files changed, 387 insertions(+), 366 deletions(-) diff --git a/package-lock.json b/package-lock.json index 935b8f9..4e4221c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "socrates-web", - "version": "1.0.7", + "version": "1.0.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "socrates-web", - "version": "1.0.7", + "version": "1.0.9", "dependencies": { "chart.js": "^4.3.0", "element-plus": "^2.3.5", diff --git a/package.json b/package.json index e6a8a18..53c65be 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "socrates-web", "private": true, - "version": "1.0.8", + "version": "1.0.9", "type": "module", "homepage": "https://soil-and-land.github.io/socrates-web/", "scripts": { diff --git a/src/components.d.ts b/src/components.d.ts index 576a5df..cc6bb00 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -13,7 +13,6 @@ declare module '@vue/runtime-core' { BaseHeader: typeof import('./components/layouts/BaseHeader.vue')['default'] BaseSide: typeof import('./components/layouts/BaseSide.vue')['default'] Contact: typeof import('./components/Contact.vue')['default'] - ElAlert: typeof import('element-plus/es')['ElAlert'] ElButton: typeof import('element-plus/es')['ElButton'] ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] @@ -26,7 +25,6 @@ declare module '@vue/runtime-core' { ElOption: typeof import('element-plus/es')['ElOption'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] - ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] Help: typeof import('./components/Help.vue')['default'] diff --git a/src/components/Input.vue b/src/components/Input.vue index 10e02d2..4032ce9 100644 --- a/src/components/Input.vue +++ b/src/components/Input.vue @@ -31,7 +31,7 @@ const plants = [ {'id': 2, 'name': 'Oats', 'short_name': 'Oa'}, {'id': 3, 'name': 'Canola', 'short_name': 'Ca'}, {'id': 4, 'name': 'Grain Legume', 'short_name': 'GL'}, - {'id': 5, 'name': 'Legume Pasture', 'short_name': 'LP'}, + {'id': 5, 'name': 'Improved Pasture', 'short_name': 'IP'}, {'id': 6, 'name': 'Fallow', 'short_name': 'Fa'}, {'id': 7, 'name': 'Grass Pasture', 'short_name': 'GP'} ]; @@ -324,7 +324,11 @@ function saveInputs() { function scrollToTop(id) { setTimeout(function () { // window.scroll({top: 0, left:0, behavior: 'smooth'}); - document.getElementById(id).scrollIntoView({behavior: 'smooth'}); + // document.getElementById(id).scrollIntoView({behavior: 'smooth'}); + const yOffset = -40; + const element = document.getElementById(id); + const y = element.getBoundingClientRect().top + window.pageYOffset + yOffset; + window.scrollTo({top: y, behavior: 'smooth'}); }, 100); } @@ -366,397 +370,416 @@ function isIterable(obj) {