Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Add project indicator in the issue dashboard if project is specified

天舟5708d67a8e81
diff --git a/frontend/src/views/IssueDashboard.vue b/frontend/src/views/IssueDashboard.vue
index a2a99611cc..616bb9edc8 100644
--- a/frontend/src/views/IssueDashboard.vue
+++ b/frontend/src/views/IssueDashboard.vue
@@ -7,6 +7,21 @@
@select-environment="selectEnvironment"
/>
<div class="flex flex-row space-x-4">
+ <button
+ v-if="project"
+ class="
+ px-4
+ cursor-pointer
+ rounded-md
+ text-control text-sm
+ bg-link-hover
+ focus:outline-none
+ hover:underline
+ "
+ @click.prevent="goProject"
+ >
+ {{ project.key }}
+ </button>
<MemberSelect
v-if="scopeByPrincipal"
:selectedId="state.selectedPrincipalId"
@@ -38,7 +53,7 @@ import IssueTable from "../components/IssueTable.vue";
import MemberSelect from "../components/MemberSelect.vue";
import { Environment, Issue, PrincipalId, ProjectId } from "../types";
import { computed, onMounted, watchEffect } from "@vue/runtime-core";
-import { activeEnvironment } from "../utils";
+import { activeEnvironment, projectSlug } from "../utils";
import { BBTableSectionDataSource } from "../bbkit/types";
interface LocalState {
@@ -98,6 +113,13 @@ export default {
return router.currentRoute.value.query.user || !state.selectedProjectId;
});
+ const project = computed(() => {
+ if (state.selectedProjectId) {
+ return store.getters["project/projectById"](state.selectedProjectId);
+ }
+ return undefined;
+ });
+
const prepareIssueList = () => {
// We call open and close separately because normally the number of open issues is limited
// while the closed issues could be a lot.
@@ -205,14 +227,25 @@ export default {
state.searchText = searchText;
};
+ const goProject = () => {
+ router.push({
+ name: "workspace.project.detail",
+ params: {
+ projectSlug: projectSlug(project.value),
+ },
+ });
+ };
+
return {
searchField,
state,
scopeByPrincipal,
+ project,
sectionList,
selectEnvironment,
selectPrincipal,
changeSearchText,
+ goProject,
};
},
};