Skip to content

Commit

Permalink
Add send to cloud feature
Browse files Browse the repository at this point in the history
  • Loading branch information
baguse committed Nov 13, 2023
1 parent 101d035 commit 58987f8
Show file tree
Hide file tree
Showing 8 changed files with 449 additions and 69 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ You can install it via ``npm install directus-extension-flow-manager``
- [x] Add flow validation when Restore
- [x] Feature for keeping original flow id when restore
- [x] Add flow grouping
- [x] Add feature to import directly to another directus instance

Screenshoots
![Alt text](https://raw.githubusercontent.com/baguse/directus-extension-flow-manager/634b5085908e9fc33133a78c7578276d1a08e888/screenshoots/image.png)
![Alt text](https://raw.githubusercontent.com/baguse/directus-extension-flow-manager/101d0356d40602b11d1a2dfb1cc025224cf79fee/screenshoots/image.png)

Changelogs:
- 1.0.0: (13 July 2023)
Expand All @@ -23,5 +24,10 @@ Changelogs:
- 1.2.1: (14 September 2023)
* Add feature for keeping original flow id when restore
* Add New flow name textfield on restore confirmation dialog

- 1.2.2: (22 September 2023)
* Add flow grouping
- 1.2.3: (13 November 2023)
* Add feature to import directly to another directus instance
You need to install the `directus-extension-flow-manager-endpoint` to use this feature

If you want to contribute kindly to create a PR and if you want to request a feature or report of a bug kindly create the Issue
31 changes: 27 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "directus-extension-flow-manager",
"description": "This is a custom module for managing Flow",
"icon": "extension",
"version": "1.2.2",
"version": "1.2.3",
"author": "Bagus Andreanto<[email protected]>",
"homepage": "https://github.com/baguse/directus-extension-flow-manager",
"license": "MIT",
Expand All @@ -29,5 +29,8 @@
"vue": "^3.3.4",
"vue-router": "^4.2.4",
"vuedraggable": "^4.1.0"
},
"dependencies": {
"secure-ls": "^1.2.6"
}
}
Binary file modified screenshoots/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions src/components/flow-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
@update:model-value="onGroupSortChange"
>
<template #item="{ element }">
<flow-item :item="element" :items="items" @set-nested-sort="($event) => $emit('setNestedSort', $event, element.id)" />
<flow-item
:item="element"
:items="items"
@set-nested-sort="($event) => $emit('setNestedSort', $event, element.id)"
/>
</template>
</draggable>
</transition-expand>
Expand Down Expand Up @@ -70,7 +74,7 @@ export default defineComponent({
required: true,
},
},
emits: ["editCollection", "setNestedSort"],
emits: ["setNestedSort"],
setup(props, { emit }) {
const router = useRouter();
const { item, items } = toRefs(props);
Expand Down
12 changes: 12 additions & 0 deletions src/components/item-options.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
</v-list-item-icon>
<v-list-item-content> Backup </v-list-item-content>
</v-list-item>
<v-list-item clickable @click="showPushToCloud(item)">
<v-list-item-icon>
<v-icon name="cloud_upload" />
</v-list-item-icon>
<v-list-item-content> Push to Cloud </v-list-item-content>
</v-list-item>
</v-list>
</v-menu>
</template>
Expand All @@ -42,6 +48,7 @@ export default defineComponent({
const flowManagerUtils = inject<{
duplicate: (item: IFlow, isDuplicate?: boolean) => Promise<void>;
backup: (item: IFlow) => Promise<void>;
showPushToCloud: (item: IFlow) => Promise<void>;
}>("flowManagerUtils");
const duplicate = (item: IFlow, isDuplicate?: boolean) => {
Expand All @@ -52,10 +59,15 @@ export default defineComponent({
flowManagerUtils?.backup(item);
};
const showPushToCloud = (item: IFlow) => {
flowManagerUtils?.showPushToCloud(item);
};
return {
item,
duplicate,
backup,
showPushToCloud,
};
},
});
Expand Down
Loading

0 comments on commit 58987f8

Please sign in to comment.