diff --git a/js/src/views/Admin/AdminGroupProfile.vue b/js/src/views/Admin/AdminGroupProfile.vue index 33d22c198..74087dcc6 100644 --- a/js/src/views/Admin/AdminGroupProfile.vue +++ b/js/src/views/Admin/AdminGroupProfile.vue @@ -344,16 +344,14 @@ export default class AdminGroupProfile extends Vue { } confirmSuspendProfile(): void { - const message = ( - this.group.domain - ? this.$t( - "Are you sure you want to suspend this group? As this group originates from instance {instance}, this will only remove local members and delete the local data, as well as rejecting all the future data.", - { instance: this.group.domain } - ) - : this.$t( - "Are you sure you want to suspend this group? All members - including remote ones - will be notified and removed from the group, and all of the group data (events, posts, discussions, todos…) will be irretrievably destroyed." - ) - ) as string; + const message = (this.group.domain + ? this.$t( + "Are you sure you want to suspend this group? As this group originates from instance {instance}, this will only remove local members and delete the local data, as well as rejecting all the future data.", + { instance: this.group.domain } + ) + : this.$t( + "Are you sure you want to suspend this group? All members - including remote ones - will be notified and removed from the group, and all of the group data (events, posts, discussions, todos…) will be irretrievably destroyed." + )) as string; this.$buefy.dialog.confirm({ title: this.$t("Suspend group") as string, diff --git a/js/src/views/Event/Edit.vue b/js/src/views/Event/Edit.vue index 0533093d1..e3402dbee 100644 --- a/js/src/views/Event/Edit.vue +++ b/js/src/views/Event/Edit.vue @@ -773,11 +773,9 @@ export default class EditEvent extends Vue { get updateEventMessage(): string { if (this.unmodifiedEvent.draft && !this.event.draft) return this.$i18n.t("The event has been updated and published") as string; - return ( - this.event.draft - ? this.$i18n.t("The draft event has been updated") - : this.$i18n.t("The event has been updated") - ) as string; + return (this.event.draft + ? this.$i18n.t("The draft event has been updated") + : this.$i18n.t("The event has been updated")) as string; } private handleError(err: any) { diff --git a/js/src/views/Event/Event.vue b/js/src/views/Event/Event.vue index 9dbe00338..fac4f62b6 100755 --- a/js/src/views/Event/Event.vue +++ b/js/src/views/Event/Event.vue @@ -874,8 +874,7 @@ export default class Event extends EventMixin { try { if (window.isSecureContext) { - this.anonymousParticipation = - await this.anonymousParticipationConfirmed(); + this.anonymousParticipation = await this.anonymousParticipationConfirmed(); } } catch (e) { if (e instanceof AnonymousParticipationNotFoundError) { diff --git a/js/src/views/Resources/ResourceFolder.vue b/js/src/views/Resources/ResourceFolder.vue index 1ae5a4e98..645b03ffb 100644 --- a/js/src/views/Resources/ResourceFolder.vue +++ b/js/src/views/Resources/ResourceFolder.vue @@ -562,10 +562,9 @@ export default class Resources extends Mixins(ResourceMixin) { const updatedResource: IResource = data.updateResource; // eslint-disable-next-line vue/max-len - oldParentCachedResource.children.elements = - oldParentCachedResource.children.elements.filter( - (cachedResource) => cachedResource.id !== updatedResource.id - ); + oldParentCachedResource.children.elements = oldParentCachedResource.children.elements.filter( + (cachedResource) => cachedResource.id !== updatedResource.id + ); store.writeQuery({ query: GET_RESOURCE, diff --git a/js/src/views/Settings/AccountSettings.vue b/js/src/views/Settings/AccountSettings.vue index a4c3ee31c..3702a3356 100644 --- a/js/src/views/Settings/AccountSettings.vue +++ b/js/src/views/Settings/AccountSettings.vue @@ -155,10 +155,7 @@

{{ $t("Deleting your Mobilizon account") }} diff --git a/js/src/views/Settings/Notifications.vue b/js/src/views/Settings/Notifications.vue index e5250e227..c6e697b1d 100644 --- a/js/src/views/Settings/Notifications.vue +++ b/js/src/views/Settings/Notifications.vue @@ -251,10 +251,8 @@ export default class Notifications extends Vue { if (this.loggedUser && this.loggedUser.settings) { this.notificationOnDay = this.loggedUser.settings.notificationOnDay; this.notificationEachWeek = this.loggedUser.settings.notificationEachWeek; - this.notificationBeforeEvent = - this.loggedUser.settings.notificationBeforeEvent; - this.notificationPendingParticipation = - this.loggedUser.settings.notificationPendingParticipation; + this.notificationBeforeEvent = this.loggedUser.settings.notificationBeforeEvent; + this.notificationPendingParticipation = this.loggedUser.settings.notificationPendingParticipation; } } diff --git a/js/tests/e2e/support/commands.js b/js/tests/e2e/support/commands.js index 442fb374e..8268b7ee3 100644 --- a/js/tests/e2e/support/commands.js +++ b/js/tests/e2e/support/commands.js @@ -106,27 +106,29 @@ const decreaseFetches = () => { Cypress.env("fetchCount", count - 1); }; -const buildTrackableFetchWithSessionId = - (fetch) => (fetchUrl, fetchOptions) => { - const { headers } = fetchOptions; - const modifiedHeaders = { - "x-session-id": Cypress.env("sessionId"), - ...headers, - }; - - const modifiedOptions = { ...fetchOptions, headers: modifiedHeaders }; - - return fetch(fetchUrl, modifiedOptions) - .then((result) => { - decreaseFetches(); - return Promise.resolve(result); - }) - .catch((result) => { - decreaseFetches(); - return Promise.reject(result); - }); +const buildTrackableFetchWithSessionId = (fetch) => ( + fetchUrl, + fetchOptions +) => { + const { headers } = fetchOptions; + const modifiedHeaders = { + "x-session-id": Cypress.env("sessionId"), + ...headers, }; + const modifiedOptions = { ...fetchOptions, headers: modifiedHeaders }; + + return fetch(fetchUrl, modifiedOptions) + .then((result) => { + decreaseFetches(); + return Promise.resolve(result); + }) + .catch((result) => { + decreaseFetches(); + return Promise.reject(result); + }); +}; + Cypress.on("window:before:load", (win) => { cy.stub(win, "fetch", buildTrackableFetchWithSessionId(fetch)); });