@appscode/design-system 1.0.43-alpha.165 → 1.0.43-alpha.168

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.
@@ -578,16 +578,20 @@
578
578
  }
579
579
  .theme-choicee {
580
580
  border: 1px solid $ac-white-light;
581
- li{
581
+ li {
582
+ border-right: 1px solid $ac-white-light;
582
583
  cursor: pointer;
583
584
  transition: 0.3s ease-in-out;
585
+ &:last-child {
586
+ border-right: none;
587
+ }
584
588
  &:hover {
585
589
  color: $ac-black;
586
590
  }
587
591
  &.is-active {
588
592
  background-color: $ac-white-light;
589
593
  }
590
- }
594
+ }
591
595
  }
592
596
  // start dark theme
593
597
  .is-dark-theme {
@@ -23,7 +23,7 @@
23
23
  }
24
24
  .key-value-save {
25
25
  display: grid;
26
- grid-template-columns: 1fr 1fr auto;
26
+ grid-template-columns: 1fr 1fr auto auto;
27
27
  grid-gap: 15px;
28
28
  }
29
29
  .value-list-save {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "1.0.43-alpha.165",
3
+ "version": "1.0.43-alpha.168",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -2,37 +2,47 @@
2
2
  <div class="ac-preview is-active is-not-fixed">
3
3
  <div class="ac-preview-inner">
4
4
  <!-- preview body start -->
5
- <div class="ac-preview-body mt-0 pt-20">
6
- <div
7
- v-if="isPreviewLoading || (!isPreviewLoading && previewYamls)"
8
- class="left-content"
9
- >
10
- <div class="ac-files pt-0">
11
- <ul v-if="!isPreviewLoading">
12
- <li
13
- v-for="(previewYaml, idx) in filteredYamls"
14
- :key="previewYaml.name + idx"
15
- :class="{ 'is-active': activeKey === previewYaml.uid }"
16
- >
17
- <a @click.prevent="setActivePreview(previewYaml.uid)">
18
- <span>
19
- <img
20
- src="~@appscode/design-system-images/icons/file-icon.svg"
21
- alt=""
22
- />
23
- </span>
24
- <span>{{ previewYaml.name }}</span>
25
- </a>
26
- </li>
27
- </ul>
28
- <sidebar-loader v-else />
5
+ <div
6
+ class="ac-preview-body mt-0 pt-20"
7
+ :class="{ 'is-justify-content-center': isYamlsEmpty && !isPreviewLoading }"
8
+ >
9
+ <strong v-if="isYamlsEmpty && !isPreviewLoading">
10
+ No Data Available
11
+ <i class="pl-5 fa fa-exclamation-circle" aria-hidden="true"></i>
12
+ </strong>
13
+ <template v-else>
14
+ <div
15
+ v-if="!isPreviewLoading && previewYamls"
16
+ class="left-content"
17
+ >
18
+ <div class="ac-files pt-0">
19
+ <ul v-if="!isPreviewLoading">
20
+ <li
21
+ v-for="(previewYaml, idx) in filteredYamls"
22
+ :key="previewYaml.name + idx"
23
+ :class="{ 'is-active': activeKey === previewYaml.uid }"
24
+ :title="previewYaml.name"
25
+ >
26
+ <a @click.prevent="setActivePreview(previewYaml.uid)">
27
+ <span>
28
+ <img
29
+ src="~@appscode/design-system-images/icons/file-icon.svg"
30
+ alt=""
31
+ />
32
+ </span>
33
+ <span>{{ previewYaml.name }}</span>
34
+ </a>
35
+ </li>
36
+ </ul>
37
+ <sidebar-loader v-else />
38
+ </div>
29
39
  </div>
30
- </div>
31
- <div class="right-content">
32
40
  <div class="right-content">
33
41
  <resource-loader v-if="isPreviewLoading" />
42
+ <strong v-else-if="isYamlsNotSelected">Selecet a data from sidebar</strong>
43
+ <strong v-else-if="hideValue"> *************** </strong>
34
44
  <editor
35
- v-else-if="!isPreviewLoading && !hideValue"
45
+ v-else
36
46
  v-model="activeFile.content"
37
47
  :original-value="originalValue"
38
48
  :language="activeFile.format"
@@ -40,9 +50,8 @@
40
50
  :editor-height="editorHeight"
41
51
  :show-minimap="showMinimap"
42
52
  />
43
- <span v-else> *************** </span>
44
53
  </div>
45
- </div>
54
+ </template>
46
55
  </div>
47
56
  </div>
48
57
  </div>
@@ -132,6 +141,15 @@ export default defineComponent({
132
141
  return element.uid === this.activeKey;
133
142
  });
134
143
  return val === undefined ? false : true;
144
+ },
145
+ isYamlsEmpty(){
146
+ return this.filteredYamls.length === 0;
147
+ },
148
+ isYamlsNotSelected(){
149
+ const val = this.filteredYamls.find(element => {
150
+ return element.uid === this.activeKey;
151
+ })
152
+ return val === undefined;
135
153
  }
136
154
  },
137
155
  methods: {
@@ -9,6 +9,7 @@
9
9
  <ac-button
10
10
  modifier-classes="is-square is-primary"
11
11
  :icon-class="toggleHideValue ? 'eye-slash' : 'eye'"
12
+ :disabled="previewYamls.length === 0"
12
13
  @click.prevent="toggleHideValue = !toggleHideValue"
13
14
  />
14
15
  </header-item>
@@ -1,21 +1,14 @@
1
1
  <template>
2
- <li class="">
3
- <a @click="showTheme = !showTheme" class="ac-dropdown-button is-fullwidth is-flex is-justify-content-space-between is-align-items-center">
4
- <span>Theme Change</span>
5
- <span>
6
- <i v-if="showTheme" class="fa fa-angle-up"></i>
7
- <i v-else class="fa fa-angle-down"></i>
8
- </span>
9
- </a>
10
- <ul v-if="showTheme" class="ac-vscrollbar">
2
+ <li class="mt-10 b-t-1 pt-10">
3
+ <ul class="ac-vscrollbar">
11
4
  <li>
12
5
  <div class="ac-menu-contentt theme-choicee">
13
- <ul class="is-flex is-flex-direction-row is-justify-content-space-between">
6
+ <ul class="is-flex is-flex-direction-row is-justify-content-center">
14
7
  <li
15
8
  v-for="theme of Object.keys(themeModes)"
16
9
  :title="themeModes[theme].displayName"
17
10
  @click="themeMode = theme"
18
- class="p-10 pl-30 pr-30"
11
+ class="p-10 pl-30 pr-30 is-flex-grow-1 has-text-centered"
19
12
  :class="{ 'is-active': themeMode === theme }"
20
13
  :key="theme"
21
14
  >
@@ -24,8 +17,8 @@
24
17
  </ul>
25
18
  </div>
26
19
  </li>
27
- </ul>
28
- </li>
20
+ </ul>
21
+ </li>
29
22
  </template>
30
23
  <script>
31
24
  import { defineComponent } from "vue";
@@ -33,13 +26,8 @@ import { defineComponent } from "vue";
33
26
  export default defineComponent({
34
27
  data() {
35
28
  return {
36
- showTheme: false,
37
29
  themeMode: "",
38
30
  themeModes: {
39
- system: {
40
- displayName: "System Theme",
41
- iconClass: "fa-desktop",
42
- },
43
31
  light: {
44
32
  displayName: "Light Theme",
45
33
  iconClass: "fa-sun-o",
@@ -48,6 +36,10 @@ export default defineComponent({
48
36
  displayName: "Dark Theme",
49
37
  iconClass: "fa-moon-o",
50
38
  },
39
+ system: {
40
+ displayName: "System Theme",
41
+ iconClass: "fa-desktop",
42
+ },
51
43
  },
52
44
  };
53
45
  },