Skip to content

Conversation

@NeoIsRecursive
Copy link
Collaborator

No description provided.

@NeoIsRecursive NeoIsRecursive linked an issue Jan 15, 2025 that may be closed by this pull request
@NeoIsRecursive NeoIsRecursive added the enhancement New feature or request label Jan 16, 2025
@NeoIsRecursive NeoIsRecursive marked this pull request as ready for review February 24, 2025 09:55
@NeoIsRecursive NeoIsRecursive merged commit b3c59a3 into main Feb 25, 2025
5 checks passed
@NeoIsRecursive NeoIsRecursive deleted the feature/server-state branch February 25, 2025 09:24
@NeoIsRecursive NeoIsRecursive requested a review from Copilot March 7, 2025 15:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR introduces a new backup feature that polls the server for state changes and updates the UI based on user permissions. Key changes include:

  • Adding a new Vuex module (backup-provider) to manage backup state and polling logic.
  • Adjusting component logic to use computed getters for permission checks.
  • Updating documentation and linter configurations to support these changes.

Reviewed Changes

File Description
client/src/store.js New store module for backup state and polling actions with some mutation issues.
mago.toml Updated linter rules to adjust error levels on certain checks.
client/src/main.js Registers the backup component on Statamic booting.
docs/pages/getting-started.md Updated installation instructions for required cache driver.
client/src/components/Upload.vue Refactored permission checks to use computed getters and improved dropzone logic.
client/src/components/Listing.vue Changed conditionals for rendering based on updated backup state and permissions.
client/src/components/Backup.vue Added module registration and polling on component creation, with module unregistration on destroy.
client/src/components/Actions.vue Updated permission checks and dispatches to reflect new state management.

Copilot reviewed 45 out of 45 changed files in this pull request and generated 1 comment.

},
cancelPoll(state) {
clearTimeout(state.timeout);
state.commit("timeout", null);
Copy link

Copilot AI Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a Vuex mutation, calling state.commit is not valid because mutations only receive the state. Instead, directly assign state.timeout = null or refactor to commit a separate mutation from an action.

Suggested change
state.commit("timeout", null);
state.timeout = null;
},
setTimeout(state, payload) {
state.timeout = payload;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Large backups on cloud storage time out

2 participants