This commit is contained in:
Tykayn 2021-06-14 12:23:05 +02:00 committed by tykayn
parent 4dafbca54b
commit 98bfe24fe3
7 changed files with 39 additions and 48 deletions

View File

@ -344,16 +344,14 @@ export default class AdminGroupProfile extends Vue {
} }
confirmSuspendProfile(): void { confirmSuspendProfile(): void {
const message = ( const message = (this.group.domain
this.group.domain ? this.$t(
? this.$t( "Are you sure you want to <b>suspend</b> 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.",
"Are you sure you want to <b>suspend</b> 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 }
{ instance: this.group.domain } )
) : this.$t(
: this.$t( "Are you sure you want to <b>suspend</b> this group? All members - including remote ones - will be notified and removed from the group, and <b>all of the group data (events, posts, discussions, todos…) will be irretrievably destroyed</b>."
"Are you sure you want to <b>suspend</b> this group? All members - including remote ones - will be notified and removed from the group, and <b>all of the group data (events, posts, discussions, todos…) will be irretrievably destroyed</b>." )) as string;
)
) as string;
this.$buefy.dialog.confirm({ this.$buefy.dialog.confirm({
title: this.$t("Suspend group") as string, title: this.$t("Suspend group") as string,

View File

@ -773,11 +773,9 @@ export default class EditEvent extends Vue {
get updateEventMessage(): string { get updateEventMessage(): string {
if (this.unmodifiedEvent.draft && !this.event.draft) if (this.unmodifiedEvent.draft && !this.event.draft)
return this.$i18n.t("The event has been updated and published") as string; return this.$i18n.t("The event has been updated and published") as string;
return ( return (this.event.draft
this.event.draft ? this.$i18n.t("The draft event has been updated")
? this.$i18n.t("The draft event has been updated") : this.$i18n.t("The event has been updated")) as string;
: this.$i18n.t("The event has been updated")
) as string;
} }
private handleError(err: any) { private handleError(err: any) {

View File

@ -874,8 +874,7 @@ export default class Event extends EventMixin {
try { try {
if (window.isSecureContext) { if (window.isSecureContext) {
this.anonymousParticipation = this.anonymousParticipation = await this.anonymousParticipationConfirmed();
await this.anonymousParticipationConfirmed();
} }
} catch (e) { } catch (e) {
if (e instanceof AnonymousParticipationNotFoundError) { if (e instanceof AnonymousParticipationNotFoundError) {

View File

@ -562,10 +562,9 @@ export default class Resources extends Mixins(ResourceMixin) {
const updatedResource: IResource = data.updateResource; const updatedResource: IResource = data.updateResource;
// eslint-disable-next-line vue/max-len // eslint-disable-next-line vue/max-len
oldParentCachedResource.children.elements = oldParentCachedResource.children.elements = oldParentCachedResource.children.elements.filter(
oldParentCachedResource.children.elements.filter( (cachedResource) => cachedResource.id !== updatedResource.id
(cachedResource) => cachedResource.id !== updatedResource.id );
);
store.writeQuery({ store.writeQuery({
query: GET_RESOURCE, query: GET_RESOURCE,

View File

@ -155,10 +155,7 @@
<div class="container"> <div class="container">
<div class="columns"> <div class="columns">
<div <div
class=" class="column is-one-third-desktop is-offset-one-third-desktop"
column
is-one-third-desktop is-offset-one-third-desktop
"
> >
<h1 class="title"> <h1 class="title">
{{ $t("Deleting your Mobilizon account") }} {{ $t("Deleting your Mobilizon account") }}

View File

@ -251,10 +251,8 @@ export default class Notifications extends Vue {
if (this.loggedUser && this.loggedUser.settings) { if (this.loggedUser && this.loggedUser.settings) {
this.notificationOnDay = this.loggedUser.settings.notificationOnDay; this.notificationOnDay = this.loggedUser.settings.notificationOnDay;
this.notificationEachWeek = this.loggedUser.settings.notificationEachWeek; this.notificationEachWeek = this.loggedUser.settings.notificationEachWeek;
this.notificationBeforeEvent = this.notificationBeforeEvent = this.loggedUser.settings.notificationBeforeEvent;
this.loggedUser.settings.notificationBeforeEvent; this.notificationPendingParticipation = this.loggedUser.settings.notificationPendingParticipation;
this.notificationPendingParticipation =
this.loggedUser.settings.notificationPendingParticipation;
} }
} }

View File

@ -106,27 +106,29 @@ const decreaseFetches = () => {
Cypress.env("fetchCount", count - 1); Cypress.env("fetchCount", count - 1);
}; };
const buildTrackableFetchWithSessionId = const buildTrackableFetchWithSessionId = (fetch) => (
(fetch) => (fetchUrl, fetchOptions) => { fetchUrl,
const { headers } = fetchOptions; fetchOptions
const modifiedHeaders = { ) => {
"x-session-id": Cypress.env("sessionId"), const { headers } = fetchOptions;
...headers, 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 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) => { Cypress.on("window:before:load", (win) => {
cy.stub(win, "fetch", buildTrackableFetchWithSessionId(fetch)); cy.stub(win, "fetch", buildTrackableFetchWithSessionId(fetch));
}); });