adata-ui 0.1.39 → 0.1.40

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.39",
3
+ "version": "0.1.40",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -2,7 +2,7 @@
2
2
  <header class="a-header" :class="[{'bordered': isBordered}, {'fixed': isFixed}]">
3
3
  <div class="container">
4
4
  <div class="a-header__left">
5
- <a class="logo" :href="toAdtdev('https://adata.kz')">
5
+ <a class="logo" :href="main[mode]">
6
6
  <svg class="adata-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 48">
7
7
  <path d="M62.926 38.22v-28h10.316c10.342 0 15.511 4.55 15.508 13.652 0 4.36-1.41 7.843-4.232 10.448-2.822 2.605-6.58 3.907-11.276 3.904l-10.316-.004zm6.56-22.868v17.752h3.248c2.839 0 5.069-.82 6.69-2.46 1.622-1.64 2.43-3.873 2.424-6.7 0-2.667-.8-4.767-2.403-6.3-1.602-1.533-3.853-2.297-6.752-2.292h-3.206zM118.5 38.22h-7.131l-2.079-6.228H98.958l-2.079 6.228h-7.093l10.598-28h7.775l10.341 28zm-10.723-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.162c-.07.83-.24 1.649-.508 2.44l-3.168 9.492h7.451zm31.833-11.796h-8.316V38.22h-6.557V15.352h-8.274v-5.136h23.147v5.136zM166 38.22h-7.143l-2.079-6.228h-10.349l-2.05 6.228h-7.106l10.598-28h7.776l10.353 28zm-10.719-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.163c-.069.83-.239 1.649-.507 2.44l-3.168 9.492h7.451zM24.553 15.252h-.163c-.069.83-.24 1.649-.507 2.44L20.715 27.2h7.45l-3.126-9.412a12.02 12.02 0 01-.486-2.536z"></path>
8
8
  <path d="M44.905 0H4.99a5.091 5.091 0 00-3.528 1.406A4.71 4.71 0 000 4.8v38.4a4.71 4.71 0 001.461 3.394A5.091 5.091 0 004.99 48h39.916a5.091 5.091 0 003.528-1.406 4.71 4.71 0 001.462-3.394V4.8a4.71 4.71 0 00-1.462-3.394A5.091 5.091 0 0044.905 0zM31.737 38.26l-2.079-6.232H19.305l-2.05 6.232h-7.097l10.598-28h7.776l10.353 28h-7.148z"></path>
@@ -13,7 +13,7 @@
13
13
  :key="index"
14
14
  class="menu__wrapper menu__items"
15
15
  :class="{active: item.key === activeTabKey}"
16
- :href="toAdtdev(item.url)"
16
+ :href="item[mode]"
17
17
  >
18
18
  {{ item.name }}
19
19
  </a>
@@ -23,7 +23,7 @@
23
23
  <slot name="chooseCountry"></slot>
24
24
  <Profile
25
25
  v-bind:profileDropDown="profileDropDown"
26
- :isDev="isDev"
26
+ :mode="mode"
27
27
  :isAuthenticated="isAuthenticated"
28
28
  :requestCount="requestCount"
29
29
  :daysRemaining="daysRemaining"
@@ -133,6 +133,11 @@ export default {
133
133
  data() {
134
134
  return {
135
135
  profileDropDown,
136
+ main: {
137
+ dev: 'https://adtdev.kz',
138
+ prod: 'https://adata.kz',
139
+ staging: 'https://adada.kz'
140
+ },
136
141
  subheaderItems: [
137
142
  {
138
143
  id: 1,
@@ -241,9 +241,12 @@ export default {
241
241
  clickOutside: vClickOutside.directive,
242
242
  },
243
243
  props: {
244
- isDev: {
245
- type: Boolean,
246
- default: false
244
+ mode: {
245
+ type: String,
246
+ required: true,
247
+ validator: function (value) {
248
+ return ['prod', 'dev', 'staging'].indexOf(value) !== -1
249
+ }
247
250
  },
248
251
  profileDropDown: {
249
252
  type: Array,
@@ -316,17 +319,17 @@ export default {
316
319
  },
317
320
  async showModal(url, name) {
318
321
  if (name.includes('Текущий')) {
319
- if(window.location.href.includes(this.toAdtdev(url))) {
322
+ if(window.location.href.includes(url)) {
320
323
  this.$emit("setIsReplenishModal", true);
321
324
  this.setShowModal(true);
322
325
  } else {
323
- await window.open(this.toAdtdev(url) + "&modal=show", "_self")
326
+ await window.open(url + "&modal=show", "_self")
324
327
  }
325
328
  }
326
329
  },
327
330
  handleClick(url, name) {
328
331
  if (!name.includes('Текущий')) {
329
- window.open(this.toAdtdev(url), "_self");
332
+ window.open(url, "_self");
330
333
  this.active = false;
331
334
  if (this.chosenElem) this.chosenElem.opened = false;
332
335
  }
@@ -335,9 +338,6 @@ export default {
335
338
  this.chosenElem = this.listDropDown[index];
336
339
  this.$set(this.listDropDown[index], 'opened', !this.listDropDown[index].opened)
337
340
  },
338
- toAdtdev(url) {
339
- return this.isDev ? url.replace("adata", "adtdev") : url;
340
- }
341
341
  }
342
342
  };
343
343
  </script>