@appscode/design-system 1.0.43-alpha.154 → 1.0.43-alpha.157

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": "@appscode/design-system",
3
- "version": "1.0.43-alpha.154",
3
+ "version": "1.0.43-alpha.157",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -24,7 +24,7 @@
24
24
  </div>
25
25
  <div class="profile-info" style="width: calc(100% - 60px)">
26
26
  <a
27
- :href="`/${user.username}`"
27
+ :href="`${serverDomain}/${user.username}`"
28
28
  :title="user.username.toUpperCase()"
29
29
  class="line-break-anywhere is-ellipsis-1"
30
30
  >{{ user.username.toUpperCase() }}</a
@@ -36,7 +36,7 @@
36
36
  <li key="settings">
37
37
  <a :href="`${serverDomain}/user/settings/`">Settings</a>
38
38
  </li>
39
- <li v-if="user.is_admin" key="site-admin">
39
+ <li v-if="isLoggedinUserAdmin" key="site-admin">
40
40
  <a :href="`${accountsDomain}/admin`">Site Administration</a>
41
41
  </li>
42
42
  <li
@@ -57,9 +57,9 @@
57
57
  <span>Switch Account</span>
58
58
  <span
59
59
  ><i
60
- :class="`fa fa-angle-${
61
- dropDownStatus === 'open' ? 'up' : 'down'
62
- }`"
60
+ :class="
61
+ `fa fa-angle-${dropDownStatus === 'open' ? 'up' : 'down'}`
62
+ "
63
63
  ></i
64
64
  ></span>
65
65
  </a>
@@ -142,36 +142,40 @@ export default {
142
142
  // active user info
143
143
  user: {
144
144
  type: Object,
145
- default: () => ({}),
145
+ default: () => ({})
146
146
  },
147
147
  serverDomain: {
148
148
  type: String,
149
- default: "",
149
+ default: ""
150
150
  },
151
151
  accountsDomain: {
152
152
  type: String,
153
- default: "",
153
+ default: ""
154
154
  },
155
155
  showAccountSwitcher: {
156
156
  type: Boolean,
157
- default: false,
157
+ default: false
158
158
  },
159
159
  // all available organization list including personal account
160
160
  organizations: {
161
161
  type: Array,
162
- default: () => [],
162
+ default: () => []
163
163
  },
164
+ isLoggedinUserAdmin: {
165
+ type: Boolean,
166
+ default: false
167
+ }
164
168
  },
165
169
 
166
170
  components: {
167
171
  NavbarItem: () => import("./NavbarItem.vue"),
168
- NavbarItemContent: () => import("./NavbarItemContent.vue"),
172
+ NavbarItemContent: () => import("./NavbarItemContent.vue")
169
173
  },
170
174
 
171
175
  computed: {
172
176
  formattedOrganizations() {
173
177
  let activeUser;
174
- const filteredList = this.organizations.filter((item) => {
178
+ const filteredList = this.organizations.filter(item => {
175
179
  if (item.username === this.user.username) {
176
180
  activeUser = item;
177
181
  } else {
@@ -183,13 +187,13 @@ export default {
183
187
  filteredList.unshift(activeUser);
184
188
 
185
189
  return filteredList || [];
186
- },
190
+ }
187
191
  },
188
192
 
189
193
  data() {
190
194
  return {
191
195
  dropDownStatus: "close",
192
- dropDownSectionHeight: null,
196
+ dropDownSectionHeight: null
193
197
  };
194
198
  },
195
199
 
@@ -206,7 +210,7 @@ export default {
206
210
  },
207
211
  onMouseLeave() {
208
212
  this.dropDownStatus = "close";
209
- },
213
+ }
210
214
  },
211
215
 
212
216
  watch: {
@@ -222,9 +226,9 @@ export default {
222
226
  } else {
223
227
  this.dropDownSectionHeight = null;
224
228
  }
225
- },
226
- },
227
- },
229
+ }
230
+ }
231
+ }
228
232
  };
229
233
  </script>
230
234
  <style lang="scss" scoped>
@@ -234,4 +238,4 @@ export default {
234
238
  .line-break-anywhere {
235
239
  line-break: anywhere;
236
240
  }
237
- </style>
241
+ </style>
@@ -15,7 +15,12 @@
15
15
  <button class="camera-icon"></button>
16
16
  </div>
17
17
  <div class="profile-info" style="width: calc(100% - 60px);">
18
- <p :title="user.username.toUpperCase()" class="line-break-anywhere is-ellipsis-1">{{ user.username.toUpperCase() }}</p>
18
+ <a
19
+ :href="`${serverDomain}/${user.username}`"
20
+ :title="user.username.toUpperCase()"
21
+ class="line-break-anywhere is-ellipsis-1"
22
+ >{{ user.username.toUpperCase() }}</a
23
+ >
19
24
  <a :href="`mailto:${user.email}`"> {{ user.email }}</a>
20
25
  </div>
21
26
  </div>
@@ -24,7 +29,7 @@
24
29
  <a :href="`${serverDomain}/user/settings/`">Settings</a>
25
30
  </li>
26
31
  <li v-if="user.is_admin" key="site-admin">
27
- <a :href="`${serverDomain}/admin`">Site Administration</a>
32
+ <a :href="`${accountsDomain}/admin`">Site Administration</a>
28
33
  </li>
29
34
  <li v-if="showAccountSwitcher" :class="`is-${dropDownStatus}`" key="switcher">
30
35
  <a class="
@@ -104,7 +109,7 @@
104
109
  <a :href="`${serverDomain}/dashboard`"> Dashboard </a>
105
110
  </li>
106
111
  <li key="signout">
107
- <a :href="`${serverDomain}/user/logout`"> Sign out </a>
112
+ <a :href="`${accountsDomain}/user/logout`"> Sign out </a>
108
113
  </li>
109
114
  </transition-group>
110
115
  </div>
@@ -126,6 +131,10 @@ export default defineComponent({
126
131
  type: String,
127
132
  default: "",
128
133
  },
134
+ accountsDomain: {
135
+ type: String,
136
+ default: "",
137
+ },
129
138
  showAccountSwitcher: {
130
139
  type: Boolean,
131
140
  default: false,