Skip to content

Commit da0f380

Browse files
fix history list cards primary actions; enforce rename button visibility
Fixes #21839 The previous styling commits also resolved all the bugs from this issue.
1 parent 2f986a3 commit da0f380

3 files changed

Lines changed: 4 additions & 15 deletions

File tree

client/src/components/Common/GCard.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -751,17 +751,9 @@ function onKeyDown(event: KeyboardEvent) {
751751
}
752752
753753
.g-card-rename {
754-
visibility: hidden;
755754
align-self: flex-start;
756755
}
757756
758-
&:hover,
759-
&:focus-within {
760-
.g-card-rename {
761-
visibility: visible;
762-
}
763-
}
764-
765757
.g-card-content {
766758
background-color: $body-bg;
767759
border: 1px solid $brand-secondary;

client/src/components/History/HistoryCard.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
3030
import { storeToRefs } from "pinia";
3131
import { computed } from "vue";
32-
import { useRouter } from "vue-router/composables";
3332
3433
import { userOwnsHistory } from "@/api";
3534
import type { AnyHistoryEntry } from "@/api/histories";
@@ -120,8 +119,6 @@ const props = withDefaults(defineProps<Props>(), {
120119
highlighted: false,
121120
});
122121
123-
const router = useRouter();
124-
125122
const historyStore = useHistoryStore();
126123
127124
const userStore = useUserStore();
@@ -184,8 +181,8 @@ const emit = defineEmits<{
184181
* Handles clicking on the history title to navigate to the history view
185182
* @function onTitleClick
186183
*/
187-
function onTitleClick() {
188-
router.push(`/histories/view?id=${props.history.id}`);
184+
async function onTitleClick() {
185+
await historyStore.setCurrentHistory(props.history.id);
189186
}
190187
191188
/**
@@ -195,7 +192,7 @@ function onTitleClick() {
195192
const historyCardTitle = computed(() => {
196193
return {
197194
label: props.history.name,
198-
title: localize("Click to view this history"),
195+
title: localize("Click to set as current"),
199196
handler: onTitleClick,
200197
};
201198
});

client/src/components/Workflow/List/WorkflowCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function onKeyDown(event: KeyboardEvent) {
129129
<GCard
130130
:id="workflow.id"
131131
class="workflow-card"
132-
can-rename-title
132+
:can-rename-title="!props.workflow.deleted"
133133
:title="workflowCardTitle"
134134
:title-badges="workflowCardTitleBadges"
135135
:title-n-lines="2"

0 commit comments

Comments
 (0)