Skip to content

Commit

Permalink
feat: confirm before trigger.
Browse files Browse the repository at this point in the history
  • Loading branch information
everythinginjs committed Mar 24, 2024
1 parent 6e9d47a commit 260ee30
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
/node_modules
DS_Store
.vscode
/.vscode
yarn-error.log
dist
/dist
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

5 changes: 5 additions & 0 deletions admin/src/pages/PluginPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,14 @@ function PluginPage() {
const SEE_MORE_BUTTON = useFormattedLabel('button.seeMore');
const REFRESH_BUTTON = useFormattedLabel('button.refresh');
const BACK_BUTTON = useFormattedLabel('button.back');
const CONFIRM_MSG = useFormattedLabel('confirm.message');

// Callbacks
async function triggerGithubActions() {
const isConfirmed = confirm(CONFIRM_MSG);

if (!isConfirmed) return;

try {
setLoadingTriggerButton(true);
await post(`/${pluginId}/github-actions-trigger`);
Expand Down
3 changes: 2 additions & 1 deletion admin/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
"button.seeMore": "See More",
"button.refresh": "Refresh",
"button.back": "Back",
"button.details": "Details"
"button.details": "Details",
"confirm.message": "Do you confirm to trigger this action ?"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strapi-plugin-update-static-content",
"version": "2.0.6",
"version": "2.0.7",
"description": "An strapi plugin to rebuild and deploy your SSG website via Github Actions.",
"strapi": {
"name": "update-static-content",
Expand Down

0 comments on commit 260ee30

Please sign in to comment.