diff --git a/build.gradle b/build.gradle index 6e21027..914ee93 100644 --- a/build.gradle +++ b/build.gradle @@ -41,6 +41,6 @@ build { } halo { - version = '2.10.2' + version = '2.11' debug = true } \ No newline at end of file diff --git a/console/src/components/AppStoreTab.vue b/console/src/components/AppStoreTab.vue index f3088a7..ae502d8 100644 --- a/console/src/components/AppStoreTab.vue +++ b/console/src/components/AppStoreTab.vue @@ -17,7 +17,7 @@ import AppCard from "./AppCard.vue"; import { useLocalStorage } from "@vueuse/core"; import AppDetailModal from "./AppDetailModal.vue"; import { nextTick } from "vue"; -import type { ApplicationSearchResult, ListResponse } from "@/types"; +import type { ApplicationSearchResult, ApplicationTag, ListResponse } from "@/types"; import storeApiClient from "@/utils/store-api-client"; import AgreementsModal from "./AgreementsModal.vue"; @@ -48,9 +48,26 @@ const page = ref(1); const size = ref(20); const selectedSort = ref("latestReleaseTimestamp,desc"); const selectedPriceMode = ref(); +const selectedTag = ref(); + +const { data: tags } = useQuery({ + queryKey: ["app-tags"], + queryFn: async () => { + const { data } = await storeApiClient.get>("/apis/store.halo.run/v1alpha1/tags"); + + if (data?.items.length) { + // sort by privileged + return data.items.sort((a: ApplicationTag, b: ApplicationTag) => { + return +b.spec.privileged - +a.spec.privileged; + }); + } + + return []; + }, +}); const { data, isFetching, isLoading, refetch } = useQuery>({ - queryKey: ["store-apps", keyword, selectedSort, page, size, selectedPriceMode, props.type], + queryKey: ["store-apps", keyword, selectedSort, page, size, selectedPriceMode, props.type, selectedTag], queryFn: async () => { const { data } = await storeApiClient.get>( `/apis/api.store.halo.run/v1alpha1/applications`, @@ -62,6 +79,7 @@ const { data, isFetching, isLoading, refetch } = useQuery { }, ]" /> + +withDefaults( + defineProps<{ + selected: boolean; + }>(), + { + selected: false, + } +); + + + + + diff --git a/console/src/components/detail/DetailSidebar.vue b/console/src/components/detail/DetailSidebar.vue index e64fdf0..34f8901 100644 --- a/console/src/components/detail/DetailSidebar.vue +++ b/console/src/components/detail/DetailSidebar.vue @@ -1,7 +1,11 @@