Browse Source

feat: add workflows location selection

Ahmad Kholid 2 years ago
parent
commit
104c254e3f

+ 1 - 1
package.json

@@ -47,7 +47,7 @@
     "@tiptap/vue-3": "^2.0.0-beta.209",
     "@viselect/vanilla": "^3.2.4",
     "@vue-flow/additional-components": "^1.3.3",
-    "@vue-flow/core": "^1.12.0",
+    "@vue-flow/core": "^1.12.1",
     "@vueuse/head": "^1.0.22",
     "@vueuse/rxjs": "^9.1.1",
     "@vuex-orm/core": "^0.36.4",

+ 1 - 1
src/components/newtab/workflows/WorkflowsLocal.vue

@@ -1,7 +1,7 @@
 <template>
   <div
     v-if="workflowStore.getWorkflows.length === 0"
-    class="flex items-center py-12"
+    class="md:flex items-center md:text-left text-center py-12"
   >
     <img src="@/assets/svg/alien.svg" class="w-96" />
     <div class="ml-4">

+ 16 - 1
src/newtab/pages/workflows/index.vue

@@ -156,7 +156,7 @@
             />
             <ui-popover>
               <template #trigger>
-                <ui-button variant="accent" class="ml-4 md:hidden">
+                <ui-button variant="accent" class="ml-4 lg:hidden">
                   <v-remixicon name="riAddLine" class="mr-2 -ml-1" />
                   <span>{{ t('common.workflow') }}</span>
                 </ui-button>
@@ -230,6 +230,21 @@
                 </option>
               </ui-select>
             </div>
+            <ui-select
+              v-model="state.activeTab"
+              class="ml-4 lg:hidden"
+              :placeholder="t('common.workflow', 2)"
+            >
+              <option value="local">
+                {{ t('workflow.type.local') }}
+              </option>
+              <option v-if="userStore.user" value="shared">
+                {{ t('workflow.type.shared') }}
+              </option>
+              <option v-if="hostedWorkflows?.length > 0" value="host">
+                {{ t('workflow.type.host') }}
+              </option>
+            </ui-select>
           </div>
         </div>
         <ui-tab-panels v-model="state.activeTab" class="mt-6 flex-1">

+ 4 - 4
yarn.lock

@@ -1791,10 +1791,10 @@
     d3-selection "^3.0.0"
     d3-zoom "^3.0.0"
 
-"@vue-flow/core@^1.12.0":
-  version "1.12.0"
-  resolved "https://registry.yarnpkg.com/@vue-flow/core/-/core-1.12.0.tgz#14a6c01eb376178fc7b6afaef7c6bfffc48d1880"
-  integrity sha512-kxfQNd/Vx9H3kMG+lBbJzwhXX4CVkfBwb7sdi5Bk64bRilLfzZIo90f842yohhLuKx3I7VQ7Xx2aO+9iUETUjQ==
+"@vue-flow/core@^1.12.1":
+  version "1.12.1"
+  resolved "https://registry.yarnpkg.com/@vue-flow/core/-/core-1.12.1.tgz#f0c6ad4278a7be07e13b924ccb8942339ddaf582"
+  integrity sha512-1Rl3CQ6JS5Wz+s4qhx7KwY4q4JCoJlry92JSwKP1d+YNRll3vncSeBhdk/BjoMxlvLWKXDh/2nJDrc0t4zRqPQ==
   dependencies:
     "@vueuse/core" "^9.6.0"
     d3-drag "^3.0.0"