@appscode/design-system 2.7.4 → 2.7.6
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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { setCookie } from "tiny-cookie";
|
|
3
3
|
import { computed, defineAsyncComponent, ref } from "vue";
|
|
4
4
|
import GridIcon from "../icons/GridIcon.vue";
|
|
5
|
+
import platformIcon from "/platformIcon.svg";
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
7
8
|
currentApp?: "console" | "db" | "platform" | "billing" | "selfhost" | "learn" | "grafana";
|
|
@@ -20,6 +21,13 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
20
21
|
});
|
|
21
22
|
|
|
22
23
|
const appList = [
|
|
24
|
+
{
|
|
25
|
+
name: "id",
|
|
26
|
+
icon_url: platformIcon,
|
|
27
|
+
title: "Platform",
|
|
28
|
+
port: "8080",
|
|
29
|
+
sub_title: "Manage your platform & accounts",
|
|
30
|
+
},
|
|
23
31
|
{
|
|
24
32
|
name: "db",
|
|
25
33
|
icon_url: "https://cdn.appscode.com/images/products/kubedb/kubedb-512x512_1.svg",
|
|
@@ -58,7 +66,7 @@ const appList = [
|
|
|
58
66
|
];
|
|
59
67
|
|
|
60
68
|
if (props.activeOrgType !== 3) {
|
|
61
|
-
appList.
|
|
69
|
+
appList.splice(1, 0, {
|
|
62
70
|
name: "console",
|
|
63
71
|
icon_url: "https://cdn.appscode.com/images/products/console/console_512x512.svg",
|
|
64
72
|
title: "Console",
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { defineAsyncComponent, ref, watch, computed, nextTick } from "vue";
|
|
3
|
-
import HeroiconsCog6Tooth from "~icons/heroicons/cog-6-tooth";
|
|
4
|
-
import HeroiconsWrenchScrewdriver from "~icons/heroicons/wrench-screwdriver";
|
|
5
3
|
import HeroiconsUserGroup from "~icons/heroicons/user-group";
|
|
6
4
|
import HeroiconsPower from "~icons/heroicons/power";
|
|
7
5
|
import HeroiconsCheck from "~icons/heroicons/check";
|
|
@@ -74,8 +72,6 @@ const onOrganizationClick = (orgName: string, idx: number) => {
|
|
|
74
72
|
handleIsActiveChange("");
|
|
75
73
|
};
|
|
76
74
|
|
|
77
|
-
const isDocsUi = window.location.pathname.startsWith("/docs/");
|
|
78
|
-
|
|
79
75
|
watch(dropDownStatus, (n) => {
|
|
80
76
|
if (n === "open") {
|
|
81
77
|
nextTick(() => {
|
|
@@ -138,33 +134,6 @@ function handleIsActiveChange(isActive: string) {
|
|
|
138
134
|
</div>
|
|
139
135
|
</a>
|
|
140
136
|
<transition-group name="list" tag="ul" class="list-items ac-scrollbar py-2">
|
|
141
|
-
<li key="settings" v-if="(!isPlatformDomain || isDocsUi) && !isClientOrgUser">
|
|
142
|
-
<a
|
|
143
|
-
v-if="user.isPersonalAccount"
|
|
144
|
-
data-testid="user-settings-link"
|
|
145
|
-
:href="`${serverDomain}/id/user/settings/`"
|
|
146
|
-
>
|
|
147
|
-
<span class="icon">
|
|
148
|
-
<HeroiconsCog6Tooth />
|
|
149
|
-
</span>
|
|
150
|
-
<span>Settings</span>
|
|
151
|
-
</a>
|
|
152
|
-
<a v-else data-testid="user-settings-link" :href="`${serverDomain}/id/${user.username}/settings`">
|
|
153
|
-
<span class="icon"> <HeroiconsCog6Tooth /> </span><span>Settings</span>
|
|
154
|
-
</a>
|
|
155
|
-
</li>
|
|
156
|
-
<li key="settings-platform" v-else-if="!isClientOrgUser">
|
|
157
|
-
<NuxtLink v-if="user.isPersonalAccount" data-testid="user-settings-link" to="/user/settings/">
|
|
158
|
-
<span class="icon">
|
|
159
|
-
<HeroiconsCog6Tooth />
|
|
160
|
-
</span>
|
|
161
|
-
<span>Settings</span>
|
|
162
|
-
</NuxtLink>
|
|
163
|
-
<NuxtLink v-else data-testid="user-settings-link" :to="`/${user.username}/settings`">
|
|
164
|
-
<span class="icon"> <HeroiconsCog6Tooth /> </span><span>Settings</span>
|
|
165
|
-
</NuxtLink>
|
|
166
|
-
</li>
|
|
167
|
-
|
|
168
137
|
<li v-if="showAccountSwitcher" :class="`is-${dropDownStatus}`" key="switcher">
|
|
169
138
|
<a
|
|
170
139
|
class="ac-dropdown-button is-fullwidth is-flex is-justify-content-space-between is-align-items-center"
|
|
@@ -205,11 +174,6 @@ function handleIsActiveChange(isActive: string) {
|
|
|
205
174
|
</li>
|
|
206
175
|
</transition-group>
|
|
207
176
|
</li>
|
|
208
|
-
<li v-if="isLoggedinUserAdmin || user.is_admin" key="site-admin">
|
|
209
|
-
<a data-testid="site-admin-link" :href="`${accountsDomain}/admin`"
|
|
210
|
-
><span class="icon"> <HeroiconsWrenchScrewdriver /> </span><span>Site Administration</span></a
|
|
211
|
-
>
|
|
212
|
-
</li>
|
|
213
177
|
<li key="signout" @click="$emit('on-logout')">
|
|
214
178
|
<a data-testid="user-logout-link" :href="`${accountsDomain}/user/logout`">
|
|
215
179
|
<span class="icon">
|