diff --git a/client/src/components/ActivityBar/ActivityBar.vue b/client/src/components/ActivityBar/ActivityBar.vue index 7f12bc1545aa..345be2ad2178 100644 --- a/client/src/components/ActivityBar/ActivityBar.vue +++ b/client/src/components/ActivityBar/ActivityBar.vue @@ -19,7 +19,6 @@ import FlexPanel from "@/components/Panels/FlexPanel.vue"; import NotificationsPanel from "@/components/Panels/NotificationsPanel.vue"; import SettingsPanel from "@/components/Panels/SettingsPanel.vue"; import ToolPanel from "@/components/Panels/ToolPanel.vue"; -import WorkflowPanel from "@/components/Panels/WorkflowPanel.vue"; const { config, isConfigLoaded } = useConfig(); @@ -151,7 +150,7 @@ function onToggleSidebar(toggle: string) { :to="activity.to" @click="onToggleSidebar()" /> - diff --git a/client/src/components/Common/AsyncButton.vue b/client/src/components/Common/AsyncButton.vue index 2d6ccd4881e7..75265c6f2dad 100644 --- a/client/src/components/Common/AsyncButton.vue +++ b/client/src/components/Common/AsyncButton.vue @@ -3,39 +3,36 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { BButton } from "bootstrap-vue"; import { ref } from "vue"; -const loading = ref(false); +interface Props { + icon: string | object; + title?: string; + disabled?: boolean; + loadingTitle?: string; + size?: "sm" | "md" | "lg"; + action: () => Promise; + + variant?: + | "outline-primary" + | "primary" + | "secondary" + | "success" + | "danger" + | "warning" + | "info" + | "light" + | "dark" + | "link"; +} -const props = defineProps({ - icon: { - type: String, - required: true, - }, - title: { - type: String, - required: false, - default: "", - }, - action: { - type: Function, - required: true, - }, - size: { - type: String, - required: false, - default: "md", - }, - variant: { - type: String, - required: false, - default: "link", - }, - disabled: { - type: Boolean, - required: false, - default: false, - }, +const props = withDefaults(defineProps(), { + title: "", + size: "md", + variant: "link", + loadingTitle: "Loading...", }); +const loading = ref(false); + async function onClick() { loading.value = true; await props.action(); @@ -51,8 +48,8 @@ async function onClick() { :variant="variant" :disabled="loading || disabled" @click="onClick"> - - + + diff --git a/client/src/components/Common/ListHeader.vue b/client/src/components/Common/ListHeader.vue new file mode 100644 index 000000000000..e2e16cce18e1 --- /dev/null +++ b/client/src/components/Common/ListHeader.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/client/src/components/Common/LoginRequired.vue b/client/src/components/Common/LoginRequired.vue new file mode 100644 index 000000000000..c96c9b091491 --- /dev/null +++ b/client/src/components/Common/LoginRequired.vue @@ -0,0 +1,20 @@ + + + diff --git a/client/src/components/Common/TextSummary.vue b/client/src/components/Common/TextSummary.vue index 277a46e07007..9f0ba44c566d 100644 --- a/client/src/components/Common/TextSummary.vue +++ b/client/src/components/Common/TextSummary.vue @@ -2,63 +2,39 @@ import { library } from "@fortawesome/fontawesome-svg-core"; import { faChevronDown, faChevronUp } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; -import { computed } from "vue"; +import { computed, ref } from "vue"; -const props = defineProps({ - description: { - type: String, - required: true, - }, - showDetails: { - type: Boolean, - default: false, - }, - maxLength: { - type: Number, - default: 150, - }, -}); +library.add(faChevronUp, faChevronDown); -const emit = defineEmits<{ - (e: "update:show-details", showDetails: boolean): void; -}>(); +interface Props { + maxLength?: number; + description: string; +} -const propShowDetails = computed({ - get: () => { - return props.showDetails; - }, - set: (val) => { - emit("update:show-details", val); - }, +const props = withDefaults(defineProps(), { + maxLength: 150, }); -library.add(faChevronUp, faChevronDown); -const collapsedEnableIcon = "fas fa-chevron-down"; -const collapsedDisableIcon = "fas fa-chevron-up"; - -// summarized length -const x = Math.round(props.maxLength - props.maxLength / 2); +const showDetails = ref(false); -const summary = computed(() => props.description.length > props.maxLength); +const textTooLong = computed(() => props.description.length > props.maxLength); const text = computed(() => - props.description.length > props.maxLength ? props.description.slice(0, x) : props.description + textTooLong.value && !showDetails.value + ? props.description.slice(0, Math.round(props.maxLength - props.maxLength / 2)) + "..." + : props.description ); diff --git a/client/src/components/Panels/WorkflowPanel.vue b/client/src/components/Panels/WorkflowPanel.vue deleted file mode 100644 index bef5d682603d..000000000000 --- a/client/src/components/Panels/WorkflowPanel.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - diff --git a/client/src/components/TagsMultiselect/HeadlessMultiselect.vue b/client/src/components/TagsMultiselect/HeadlessMultiselect.vue index 6cd518e8bb73..3a07de33a790 100644 --- a/client/src/components/TagsMultiselect/HeadlessMultiselect.vue +++ b/client/src/components/TagsMultiselect/HeadlessMultiselect.vue @@ -9,7 +9,7 @@ import { library } from "@fortawesome/fontawesome-svg-core"; import { faCheck, faChevronUp, faPlus, faTags, faTimes } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; -import { useElementBounding } from "@vueuse/core"; +import { useElementBounding, whenever } from "@vueuse/core"; import { computed, nextTick, ref, watch } from "vue"; // @ts-ignore missing types import Vue2Teleport from "vue2-teleport"; @@ -254,6 +254,11 @@ watch( bounds.update(); } ); + +whenever(isOpen, async () => { + await nextTick(); + bounds.update(); +});