Skip to content

Commit

Permalink
Merge branch 'dev' into eLabFTW
Browse files Browse the repository at this point in the history
  • Loading branch information
kysrpex committed Dec 12, 2024
2 parents c00d250 + 3c82972 commit 3b311ca
Show file tree
Hide file tree
Showing 180 changed files with 5,392 additions and 2,740 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/pr-title-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@ name: Update PR title

on:
pull_request_target:
types: [opened, edited]
branches:
- "release_**"
types: [opened, edited, reopened]

jobs:
update-title:
if: github.event.action != 'edited' || github.event.changes.base.ref.from != ''
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Update PR title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
TARGET_BRANCH: "${{ github.base_ref }}"
PR_TITLE: "${{ github.event.pull_request.title }}"
REPO: "${{ github.repository }}"
run: |
VERSION=$(echo $TARGET_BRANCH | grep -oP '\d+\.\d+')
if [[ -n "$VERSION" && ! "$PR_TITLE" =~ ^\[$VERSION\] ]]; then
NEW_TITLE="[$VERSION] $PR_TITLE"
gh pr edit $PR_NUMBER --title "$NEW_TITLE"
VERSION=$(echo $TARGET_BRANCH | grep -oP '^release_\K\d+.\d+$' || true)
NEW_TITLE=$(echo "$PR_TITLE" | sed -E "s/\[[0-9]+\.[0-9]+\] //")
if [[ -n "$VERSION" ]]; then
NEW_TITLE="[$VERSION] $NEW_TITLE"
fi
if [[ "$NEW_TITLE" != "$PR_TITLE" ]]; then
gh pr edit $PR_NUMBER --repo "$REPO" --title "$NEW_TITLE"
fi
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"elkjs": "^0.8.2",
"file-saver": "^2.0.5",
"flush-promises": "^1.0.2",
"font-awesome-6": "npm:@fortawesome/free-solid-svg-icons@6",
"glob": "^10.3.10",
"handsontable": "^4.0.0",
"hsluv": "^1.0.1",
Expand Down
3 changes: 3 additions & 0 deletions client/src/api/datatypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { type components } from "@/api";

export type CompositeFileInfo = components["schemas"]["CompositeFileInfo"];
3 changes: 3 additions & 0 deletions client/src/api/histories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { type components } from "@/api";

export type HistoryContentsResult = components["schemas"]["HistoryContentsResult"];
2 changes: 2 additions & 0 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18464,6 +18464,8 @@ export interface components {
* }
*/
WorkflowJobMetric: {
/** Job Id */
job_id: string;
/**
* Name
* @description The name of the metric variable.
Expand Down
18 changes: 15 additions & 3 deletions client/src/components/ActivityBar/ActivityBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ const dragItem: Ref<Activity | null> = ref(null);
// drag state
const isDragging = ref(false);
// computed values
const canDrag = computed(() => isActiveSideBar("settings"));
const isSideBarOpen = computed(() => activityStore.toggledSideBar !== "");
/**
* Checks if the route of an activity is currently being visited and panels are collapsed
*/
Expand All @@ -112,8 +116,6 @@ function isActiveSideBar(menuKey: string) {
return activityStore.toggledSideBar === menuKey;
}
const isSideBarOpen = computed(() => activityStore.toggledSideBar !== "");
/**
* Checks if an activity that has a panel should have the `is-active` prop
*/
Expand Down Expand Up @@ -209,14 +211,18 @@ defineExpose({
<draggable
:list="activities"
:class="{ 'activity-popper-disabled': isDragging }"
:disabled="!canDrag"
:force-fallback="true"
chosen-class="activity-chosen-class"
:delay="DRAG_DELAY"
drag-class="activity-drag-class"
ghost-class="activity-chosen-class"
@start="isDragging = true"
@end="isDragging = false">
<div v-for="(activity, activityIndex) in activities" :key="activityIndex">
<div
v-for="(activity, activityIndex) in activities"
:key="activityIndex"
:class="{ 'activity-can-drag': canDrag }">
<div v-if="activity.visible && (activity.anonymous || !isAnonymous)">
<UploadItem
v-if="activity.id === 'upload'"
Expand Down Expand Up @@ -346,6 +352,12 @@ defineExpose({
display: none;
}
.activity-can-drag .activity-item {
border-radius: $border-radius-extralarge;
outline: 2px dashed $border-color;
outline-offset: -3px;
}
.activity-chosen-class {
background: $brand-secondary;
border-radius: $border-radius-extralarge;
Expand Down
Loading

0 comments on commit 3b311ca

Please sign in to comment.