diff --git a/client/src/components/Workflow/WorkflowListActions.vue b/client/src/components/Workflow/WorkflowListActions.vue index 1c03e3c31ca9..f2d2a08a91d3 100644 --- a/client/src/components/Workflow/WorkflowListActions.vue +++ b/client/src/components/Workflow/WorkflowListActions.vue @@ -3,12 +3,35 @@ import { library } from "@fortawesome/fontawesome-svg-core"; import { faPlus, faUpload } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { BButton } from "bootstrap-vue"; +import { storeToRefs } from "pinia"; +import { computed } from "vue"; import { useRouter } from "vue-router/composables"; +import { useUserStore } from "@/stores/userStore"; + library.add(faPlus, faUpload); const router = useRouter(); +const userStore = useUserStore(); + +const { isAnonymous } = storeToRefs(userStore); + +const createButtonTitle = computed(() => { + if (isAnonymous.value) { + return "Log in to create workflow"; + } else { + return "Create new workflow"; + } +}); +const importButtonTitle = computed(() => { + if (isAnonymous.value) { + return "Log in to import workflow"; + } else { + return "Import workflow from URL or file"; + } +}); + function navigateToImport() { router.push("/workflows/import"); } @@ -23,10 +46,11 @@ function navigateToOldCreate() {
Create @@ -34,10 +58,11 @@ function navigateToOldCreate() { Import diff --git a/client/src/entry/analysis/router.js b/client/src/entry/analysis/router.js index 21bea064f018..43f7e851848f 100644 --- a/client/src/entry/analysis/router.js +++ b/client/src/entry/analysis/router.js @@ -123,7 +123,11 @@ export function getRouter(Galaxy) { }), }, /** Workflow editor */ - { path: "/workflows/edit", component: WorkflowEditorModule }, + { + path: "/workflows/edit", + component: WorkflowEditorModule, + redirect: redirectAnon(), + }, /** Published resources routes */ { path: "/published/history", @@ -521,6 +525,7 @@ export function getRouter(Galaxy) { { path: "workflows/import", component: WorkflowImport, + redirect: redirectAnon(), }, { path: "workflows/invocations",