Skip to content

Commit

Permalink
update UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Jogeleit committed Dec 9, 2023
1 parent c12ef36 commit d8a8ab2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
4 changes: 4 additions & 0 deletions frontend/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ const { data: sources } = useAPI<string[]>(
.main-height {
min-height: calc(100vh - 64px);
}
.no-scrollbar {
overflow: hidden!important;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<v-list lines="two">
<template v-for="item in data.items" :key="item.id">
<v-divider />
<v-list-item>
<v-list-item :to="`/resource/${item.id}`">
<v-list-item-title>{{ item.name }}</v-list-item-title>
<v-list-item-subtitle>{{ item.apiVersion }} {{ item.kind }}</v-list-item-subtitle>
<template v-slot:append>
Expand Down
4 changes: 2 additions & 2 deletions frontend/modules/core/plugins/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export default defineNuxtPlugin(async () => {

api.setPrefix(apiConfig.default)

kinds.value = apiConfig.defaultFilter.resources
clusterKinds.value = apiConfig.defaultFilter.clusterResources
kinds.value = apiConfig.defaultFilter.resources || []
clusterKinds.value = apiConfig.defaultFilter.clusterResources || []

const store = useConfigStore()

Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<LazyClusterResourceResultList />
</v-col>
</v-row>
<v-infinite-scroll :items="loaded" :onLoad="load">
<v-infinite-scroll :onLoad="load" class="no-scrollbar">
<template v-for="ns in loaded" :key="ns">
<v-row>
<v-col>
Expand Down
12 changes: 11 additions & 1 deletion frontend/pages/resource/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
<v-card elevation="2" rounded>
<div class="bg-indigo">
<v-card-title>
<span v-if="data?.resource.namespace">{{ data?.resource.namespace }}/</span>{{ data.resource.name }}
<v-container fluid class="ma-0 pa-0">
<v-row>
<v-col>
<span v-if="data?.resource.namespace">{{ data?.resource.namespace }}/</span>{{ data.resource.name }}
</v-col>
<v-col class="text-right">
<v-btn variant="text" color="white" prepend-icon="mdi-arrow-left" @click="router.back()">back</v-btn>
</v-col>
</v-row>
</v-container>
</v-card-title>
<v-card-subtitle class="pb-4">{{ data?.resource.apiVersion }} {{ data.resource.kind }}</v-card-subtitle>
</div>
Expand Down Expand Up @@ -34,6 +43,7 @@ import ResourceResultCounts from "~/modules/core/components/chart/ResourceResult
import type { Source } from "~/modules/core/types";
const route = useRoute()
const router = useRouter()
const { data } = useAPI(
(api) => Promise.all([
Expand Down

0 comments on commit d8a8ab2

Please sign in to comment.