adata-ui 0.1.97 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "0.1.97",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -83,6 +83,7 @@ export default {
83
83
 
84
84
  display: flex;
85
85
  justify-content: center;
86
+ align-items: center;
86
87
 
87
88
  @media screen and (max-width: 560px) {
88
89
  width: 100%;
@@ -41,14 +41,13 @@
41
41
  <slot name="mobileSearch"></slot>
42
42
  </div>
43
43
  <div class="header__right" v-show="!noAuth">
44
- <slot name="chooseCountry"></slot>
45
44
  <Profile
46
45
  :mode="mode"
47
46
  :activeTabKey="activeTabKey"
48
47
  :isAuthenticated="isAuthenticated"
49
48
  :email="email"
50
49
  :loginUrl="loginUrl"
51
- :rate="rateCodes[rate]"
50
+ :rate="rate"
52
51
  :balance="this.thousandSeparator(balance)"
53
52
  @showBalanceModal="
54
53
  (val) => {
@@ -95,7 +94,7 @@
95
94
  <div class="empty-space" @click="changeValue"></div>
96
95
  <div class="menu-wrapper">
97
96
  <div class="menu-wrapper__top">
98
- <div class="mobile-table-head">
97
+ <div class="mobile-table-head">
99
98
  <button
100
99
  @click.prevent="goAuth"
101
100
  class="sign"
@@ -112,14 +111,26 @@
112
111
  <span>Войти</span>
113
112
  </button>
114
113
  <div v-else class="menu-wrapper__top-left">
115
- <div class="svg-wrapper">
116
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
117
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8 9C8 6.79086 9.79086 5 12 5C14.2091 5 16 6.79086 16 9C16 11.2091 14.2091 13 12 13C9.79086 13 8 11.2091 8 9ZM14.8148 13.133C16.134 12.2329 17 10.7176 17 9C17 6.23858 14.7614 4 12 4C9.23858 4 7 6.23858 7 9C7 10.7176 7.86603 12.2329 9.18525 13.133C6.22569 13.741 4 16.3606 4 19.5H5C5 16.4624 7.46243 14 10.5 14H12H13.5C16.5376 14 19 16.4624 19 19.5H20C20 16.3606 17.7743 13.741 14.8148 13.133Z" fill="#2C3E50"/>
118
- </svg>
119
- </div>
120
114
  <div class="text-wrapper">
121
- <p>{{ email }}</p>
122
- <p>Тариф {{ rateCodes[rate] }}</p>
115
+ <p>{{ email }}
116
+ <span @click.stop="changeValue">
117
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
118
+ <path d="M1.99902 1.99957L13.9996 14.0002" stroke="#2C3E50" stroke-linecap="round"/>
119
+ <path d="M14 1.99957L1.9994 14.0002" stroke="#2C3E50" stroke-linecap="round"/>
120
+ </svg>
121
+ </span>
122
+ </p>
123
+ <p>Тариф {{ rate }}
124
+ <span @click.stop.prevent="isActiveMenu = true">
125
+ Перейти
126
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
127
+ <rect width="24" height="24" rx="12" transform="matrix(-1 0 0 1 24 0)" fill="#007AFF" fill-opacity="0.12"/>
128
+ <path d="M14.0005 8.00311L18.0005 12.0096L14.0005 16.0031" stroke="#007AFF" stroke-width="1.2" stroke-miterlimit="10"
129
+ stroke-linecap="round" stroke-linejoin="round"/>
130
+ <path d="M18 12L6 12" stroke="#007AFF" stroke-width="1.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
131
+ </svg>
132
+ </span>
133
+ </p>
123
134
  </div>
124
135
  </div>
125
136
  <div v-if="!isAuthenticated" class="menu-wrapper__top-right" @click.stop="changeValue">
@@ -144,11 +155,6 @@
144
155
  ></path>
145
156
  </svg>
146
157
  </div>
147
- <div v-else class="menu-wrapper__top-right" @click.stop.prevent="isActiveMenu = true">
148
- <svg width="8" height="16" viewBox="0 0 8 16" fill="none" xmlns="http://www.w3.org/2000/svg">
149
- <path d="M1 15.5L7 8L1 0.500001" stroke="#2C3E50" stroke-linecap="round" stroke-linejoin="round"/>
150
- </svg>
151
- </div>
152
158
  </div>
153
159
  <div class="menu__link">
154
160
  <a
@@ -407,9 +413,12 @@
407
413
  <div v-show="isAuthenticated" class="menu_mobile-footer">
408
414
  <button class="sign" @click="$emit('logout')">
409
415
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
410
- <path d="M16.5 15L19.5 12L16.5 9" stroke="white" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
411
- <path d="M15 16.875L15 19.5L4.5 19.5L4.5 4.5L15 4.5L15 6.5625" stroke="white" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
412
- <path d="M19 12H8" stroke="white" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
416
+ <path d="M16.5 15L19.5 12L16.5 9" stroke="white" stroke-miterlimit="10" stroke-linecap="round"
417
+ stroke-linejoin="round"/>
418
+ <path d="M15 16.875L15 19.5L4.5 19.5L4.5 4.5L15 4.5L15 6.5625" stroke="white" stroke-miterlimit="10"
419
+ stroke-linecap="round" stroke-linejoin="round"/>
420
+ <path d="M19 12H8" stroke="white" stroke-miterlimit="10" stroke-linecap="round"
421
+ stroke-linejoin="round"/>
413
422
  </svg>
414
423
  <span>Выход</span>
415
424
  </button>
@@ -429,19 +438,19 @@
429
438
  </div>
430
439
  </MobileToggle>
431
440
  <MobileToggle v-slot="{ animationClass }">
432
- <ProfileMobile
433
- v-show="isActiveMenu"
434
- :rate="rateCodes[rate]"
435
- :class="animationClass"
436
- :email="email"
437
- :mode="mode"
438
- :balance="thousandSeparator(balance)"
439
- :activeTabKey="activeTabKey"
440
- :daysLeft="daysRemaining"
441
- @changeValue="changeValue"
442
- @close="isActiveMenu = false"
443
- @logout="$emit('logout')"
444
- />
441
+ <ProfileMobile
442
+ v-show="isActiveMenu"
443
+ :rate="rate"
444
+ :class="animationClass"
445
+ :email="email"
446
+ :mode="mode"
447
+ :balance="thousandSeparator(balance)"
448
+ :activeTabKey="activeTabKey"
449
+ :daysLeft="daysRemaining"
450
+ @changeValue="changeValue"
451
+ @close="isActiveMenu = false"
452
+ @logout="$emit('logout')"
453
+ />
445
454
  </MobileToggle>
446
455
  </div>
447
456
  </header>
@@ -463,9 +472,7 @@ export default {
463
472
  props: {
464
473
  rate: {
465
474
  type: String,
466
- validator: function (value) {
467
- return ['basic', 'basic_plus', 'adata_pro', 'adata', 'vip'].indexOf(value) !== -1
468
- }
475
+ default: ""
469
476
  },
470
477
  mode: {
471
478
  type: String,
@@ -520,13 +527,6 @@ export default {
520
527
  data() {
521
528
  return {
522
529
  isActiveMenu: false,
523
- rateCodes: {
524
- basic: 'Базовый',
525
- basic_plus: 'Базовый+',
526
- adata: 'Adata',
527
- adata_pro: 'Adata Pro',
528
- vip: 'VIP'
529
- },
530
530
  main: {
531
531
  dev: "https://adtdev.kz",
532
532
  prod: "https://adata.kz",
@@ -792,15 +792,19 @@ export default {
792
792
  display: none;
793
793
  grid-template-columns: 10% 90%;
794
794
  z-index: 1000000;
795
- position: absolute!important;
795
+ position: absolute !important;
796
+
796
797
  .empty-space {
797
798
  background: rgba(0, 0, 0, 0.40);
798
799
  }
800
+
799
801
  &::-webkit-scrollbar {
800
802
  width: 4px;
803
+
801
804
  &-thumb {
802
805
  background: #c4c4c4;
803
806
  }
807
+
804
808
  &-track {
805
809
  background: #fff;
806
810
  }
@@ -829,7 +833,7 @@ export default {
829
833
 
830
834
  @media (max-width: 1025px) {
831
835
  display: grid;
832
- background: transparent!important;
836
+ background: transparent !important;
833
837
  .mobile-table-head {
834
838
  display: flex;
835
839
  justify-content: space-between;
@@ -847,8 +851,8 @@ export default {
847
851
  color: #2c3e50;
848
852
  display: block;
849
853
 
850
- &:last-child {
851
- border-bottom: 1px solid #9da3ac4c;
854
+ &:first-child {
855
+ border-top: none;
852
856
  }
853
857
 
854
858
  &.active-burger-tab {
@@ -861,6 +865,7 @@ export default {
861
865
  justify-content: center;
862
866
  }
863
867
  }
868
+
864
869
  .menu-wrapper {
865
870
  height: 100%;
866
871
  display: flex;
@@ -868,11 +873,14 @@ export default {
868
873
  justify-content: space-between;
869
874
  box-shadow: -6px 4px 12px rgb(157 163 172 / 40%);
870
875
  background: #fff;
876
+
871
877
  &__top {
872
878
  &-left {
873
879
  display: flex;
874
880
  gap: 8px;
875
881
  align-items: center;
882
+ width: 100%;
883
+
876
884
  .svg-wrapper {
877
885
  width: 32px;
878
886
  height: 32px;
@@ -881,24 +889,51 @@ export default {
881
889
  justify-content: center;
882
890
  align-items: center;
883
891
  border-radius: 50%;
892
+
884
893
  svg {
885
894
  width: 24px;
886
895
  height: 24px;
887
896
  }
888
897
  }
898
+
889
899
  .text-wrapper {
900
+ width: 100%;
890
901
  p {
891
902
  font-size: 14px;
892
903
  font-weight: 500;
904
+ display: flex;
905
+ justify-content: space-between;
906
+ align-items: center;
907
+
893
908
  &:first-child {
894
- margin-bottom: 4px;
909
+ border-bottom: 0.5px solid rgba(157, 163, 172, 0.5);
910
+ padding-bottom: 12px;
911
+ margin-bottom: 12px;
912
+ span {
913
+ cursor: pointer;
914
+ svg {
915
+ width: 16px;
916
+ height: 16px;
917
+ }
918
+ }
895
919
  }
920
+
896
921
  &:nth-child(2) {
922
+ color: #007AFF;
923
+ font-size: 12px;
897
924
  font-weight: 600;
925
+ span {
926
+ display: flex;
927
+ align-items: center;
928
+ gap: 8px;
929
+ cursor: pointer;
930
+ font-weight: 400;
931
+ }
898
932
  }
899
933
  }
900
934
  }
901
935
  }
936
+
902
937
  &-right {
903
938
  display: flex;
904
939
  align-items: center;
@@ -907,6 +942,7 @@ export default {
907
942
  }
908
943
  }
909
944
  }
945
+
910
946
  &-footer {
911
947
  width: 100%;
912
948
  background: #007AFF;
@@ -915,6 +951,7 @@ export default {
915
951
  margin-top: auto;
916
952
  position: relative;
917
953
  z-index: 1000000;
954
+
918
955
  button.sign {
919
956
  span {
920
957
  color: #fff;
@@ -924,7 +961,7 @@ export default {
924
961
  }
925
962
 
926
963
  .menu-wrapper__bottom {
927
- margin: 20px 0 0;
964
+ margin: 80px 0 0;
928
965
 
929
966
  &-header {
930
967
  background: rgba(189, 199, 206, 0.2);
@@ -960,9 +997,11 @@ export default {
960
997
  display: flex;
961
998
  align-items: center;
962
999
  gap: 8px;
1000
+
963
1001
  &:first-child {
964
1002
  justify-content: flex-start;
965
1003
  }
1004
+
966
1005
  &:nth-child(2), &:nth-child(3) {
967
1006
  justify-content: flex-end;
968
1007
  width: 60px;;
@@ -264,7 +264,6 @@ export default {
264
264
  const array = this.profileDropDown;
265
265
  array.forEach((el, idx) => {
266
266
  if (index === idx) {
267
- console.log(!el.opened);
268
267
  this.$set(el, 'opened', !el.opened);
269
268
  } else this.$set(el, 'opened', false)
270
269
  });
@@ -53,7 +53,7 @@
53
53
  </svg>
54
54
  </div>
55
55
  </div>
56
- <SlideToggle v-slot="{ animationClass }">
56
+ <SlideToggle>
57
57
  <div v-show="item.opened" class="mobile-table-item__children">
58
58
  <a v-for="(elem, id) in item.children" :key="'elem' + id" :href="elem[mode]">{{ elem.name }}</a>
59
59
  </div>
@@ -105,7 +105,7 @@ export default {
105
105
  },
106
106
  daysLeft: {
107
107
  type: Number,
108
- default: ""
108
+ default: 0
109
109
  },
110
110
  mode: {
111
111
  type: String,
@@ -192,6 +192,7 @@ export default {
192
192
  color: #fff;
193
193
  padding: 2px 8px;
194
194
  border-radius: 100px;
195
+ line-height: 20px;
195
196
  }
196
197
  }
197
198
  a.button {
@@ -226,6 +227,7 @@ export default {
226
227
  background: #ECEFF1;
227
228
  border-radius: 100px;
228
229
  padding: 2px 8px;
230
+ line-height: 20px;
229
231
  }
230
232
  }
231
233
  }
@@ -132,7 +132,6 @@ export default {
132
132
  if (!this.email.length || !regex.test(this.email)) {
133
133
  this.emailError = "Введите валидный email";
134
134
  this.isLoading = false;
135
- return;
136
135
  } else {
137
136
  this.emailError = "";
138
137
  }
@@ -140,12 +139,13 @@ export default {
140
139
  if (this.message.length < 20) {
141
140
  this.messageError = "Введите больше чем 20 символов";
142
141
  this.isLoading = false;
143
- return;
144
142
  } else {
145
143
  this.messageError = "";
146
144
  }
147
145
 
148
- this.requestSupport();
146
+ if(this.email.length && regex.test(this.email) && this.message.length >= 20) {
147
+ this.requestSupport();
148
+ }
149
149
  },
150
150
  async requestSupport() {
151
151
  const requestBody = {