lint all
This commit is contained in:
parent
f66845efa4
commit
19863fc6bf
|
@ -60,7 +60,8 @@ const CustomImage = Image.extend({
|
||||||
top: realEvent.clientY,
|
top: realEvent.clientY,
|
||||||
});
|
});
|
||||||
if (!coordinates) return false;
|
if (!coordinates) return false;
|
||||||
const client = apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
|
const client =
|
||||||
|
apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
images.forEach(async (image) => {
|
images.forEach(async (image) => {
|
||||||
|
|
|
@ -8,7 +8,8 @@ import { IPerson } from "@/types/actor";
|
||||||
import pDebounce from "p-debounce";
|
import pDebounce from "p-debounce";
|
||||||
import { NormalizedCacheObject } from "@apollo/client/cache/inmemory/types";
|
import { NormalizedCacheObject } from "@apollo/client/cache/inmemory/types";
|
||||||
|
|
||||||
const client = apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
|
const client =
|
||||||
|
apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
|
||||||
|
|
||||||
const fetchItems = async (query: string): Promise<IPerson[]> => {
|
const fetchItems = async (query: string): Promise<IPerson[]> => {
|
||||||
const result = await client.query({
|
const result = await client.query({
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import MobilizonLogo from "../assets/logo_chapril_mobilizon.png";
|
// import MobilizonLogo from "../assets/logo_chapril_mobilizon.png";
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default class Logo extends Vue {
|
export default class Logo extends Vue {
|
||||||
|
|
|
@ -160,7 +160,7 @@ export const DELETE_DISCUSSION = gql`
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const DISCUSSION_COMMENT_CHANGED = gql`
|
export const DISCUSSION_COMMENT_CHANGED = gql`
|
||||||
subscription($slug: String!) {
|
subscription ($slug: String!) {
|
||||||
discussionCommentChanged(slug: $slug) {
|
discussionCommentChanged(slug: $slug) {
|
||||||
id
|
id
|
||||||
lastComment {
|
lastComment {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import gql from "graphql-tag";
|
import gql from "graphql-tag";
|
||||||
|
|
||||||
export const GROUP_FOLLOWERS = gql`
|
export const GROUP_FOLLOWERS = gql`
|
||||||
query(
|
query (
|
||||||
$name: String!
|
$name: String!
|
||||||
$followersPage: Int
|
$followersPage: Int
|
||||||
$followersLimit: Int
|
$followersLimit: Int
|
||||||
|
|
|
@ -55,7 +55,7 @@ export const REJECT_INVITATION = gql`
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const GROUP_MEMBERS = gql`
|
export const GROUP_MEMBERS = gql`
|
||||||
query($name: String!, $roles: String, $page: Int, $limit: Int) {
|
query ($name: String!, $roles: String, $page: Int, $limit: Int) {
|
||||||
group(preferredUsername: $name) {
|
group(preferredUsername: $name) {
|
||||||
id
|
id
|
||||||
url
|
url
|
||||||
|
|
|
@ -14,9 +14,8 @@ export default class IdentityEditionMixin extends Mixins(Vue) {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (this.identity.preferredUsername === oldUsername) {
|
if (this.identity.preferredUsername === oldUsername) {
|
||||||
this.identity.preferredUsername = IdentityEditionMixin.convertToUsername(
|
this.identity.preferredUsername =
|
||||||
newDisplayName
|
IdentityEditionMixin.convertToUsername(newDisplayName);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.oldDisplayName = newDisplayName;
|
this.oldDisplayName = newDisplayName;
|
||||||
|
|
|
@ -398,14 +398,16 @@ export default class AdminGroupProfile extends Vue {
|
||||||
}
|
}
|
||||||
|
|
||||||
confirmSuspendProfile(): void {
|
confirmSuspendProfile(): void {
|
||||||
const message = (this.group.domain
|
const message = (
|
||||||
? this.$t(
|
this.group.domain
|
||||||
"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.",
|
? this.$t(
|
||||||
{ instance: this.group.domain }
|
"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 }
|
||||||
: 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>."
|
: this.$t(
|
||||||
)) as string;
|
"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;
|
||||||
|
|
||||||
this.$buefy.dialog.confirm({
|
this.$buefy.dialog.confirm({
|
||||||
title: this.$t("Suspend group") as string,
|
title: this.$t("Suspend group") as string,
|
||||||
|
|
|
@ -684,7 +684,8 @@ export default class Event extends EventMixin {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (window.isSecureContext) {
|
if (window.isSecureContext) {
|
||||||
this.anonymousParticipation = await this.anonymousParticipationConfirmed();
|
this.anonymousParticipation =
|
||||||
|
await this.anonymousParticipationConfirmed();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof AnonymousParticipationNotFoundError) {
|
if (e instanceof AnonymousParticipationNotFoundError) {
|
||||||
|
|
|
@ -621,9 +621,10 @@ 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.filter(
|
oldParentCachedResource.children.elements =
|
||||||
(cachedResource) => cachedResource.id !== updatedResource.id
|
oldParentCachedResource.children.elements.filter(
|
||||||
);
|
(cachedResource) => cachedResource.id !== updatedResource.id
|
||||||
|
);
|
||||||
|
|
||||||
store.writeQuery({
|
store.writeQuery({
|
||||||
query: GET_RESOURCE,
|
query: GET_RESOURCE,
|
||||||
|
|
|
@ -155,7 +155,10 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div
|
<div
|
||||||
class="column is-one-third-desktop is-offset-one-third-desktop"
|
class="
|
||||||
|
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") }}
|
||||||
|
|
|
@ -106,29 +106,27 @@ const decreaseFetches = () => {
|
||||||
Cypress.env("fetchCount", count - 1);
|
Cypress.env("fetchCount", count - 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
const buildTrackableFetchWithSessionId = (fetch) => (
|
const buildTrackableFetchWithSessionId =
|
||||||
fetchUrl,
|
(fetch) => (fetchUrl, fetchOptions) => {
|
||||||
fetchOptions
|
const { headers } = fetchOptions;
|
||||||
) => {
|
const modifiedHeaders = {
|
||||||
const { headers } = fetchOptions;
|
"x-session-id": Cypress.env("sessionId"),
|
||||||
const modifiedHeaders = {
|
...headers,
|
||||||
"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));
|
||||||
});
|
});
|
||||||
|
|
|
@ -85,8 +85,7 @@ export const eventCommentThreadsMock = {
|
||||||
__typename: "Comment",
|
__typename: "Comment",
|
||||||
id: "2",
|
id: "2",
|
||||||
uuid: "e37910ea-fd5a-4756-9679-00971f3f4107",
|
uuid: "e37910ea-fd5a-4756-9679-00971f3f4107",
|
||||||
url:
|
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-00971f3f4107",
|
||||||
"https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-00971f3f4107",
|
|
||||||
text: "my comment text",
|
text: "my comment text",
|
||||||
local: true,
|
local: true,
|
||||||
visibility: "PUBLIC",
|
visibility: "PUBLIC",
|
||||||
|
@ -116,8 +115,7 @@ export const eventCommentThreadsMock = {
|
||||||
__typename: "Comment",
|
__typename: "Comment",
|
||||||
id: "29",
|
id: "29",
|
||||||
uuid: "e37910ea-fd5a-4756-9679-01171f3f4107",
|
uuid: "e37910ea-fd5a-4756-9679-01171f3f4107",
|
||||||
url:
|
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4107",
|
||||||
"https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4107",
|
|
||||||
text: "a second comment",
|
text: "a second comment",
|
||||||
local: true,
|
local: true,
|
||||||
visibility: "PUBLIC",
|
visibility: "PUBLIC",
|
||||||
|
@ -161,8 +159,7 @@ export const newCommentForEventResponse: DataMock = {
|
||||||
__typename: "Comment",
|
__typename: "Comment",
|
||||||
id: "79",
|
id: "79",
|
||||||
uuid: "e37910ea-fd5a-4756-9679-01171f3f4444",
|
uuid: "e37910ea-fd5a-4756-9679-01171f3f4444",
|
||||||
url:
|
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4444",
|
||||||
"https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4444",
|
|
||||||
text: newCommentForEventMock.text,
|
text: newCommentForEventMock.text,
|
||||||
local: true,
|
local: true,
|
||||||
visibility: "PUBLIC",
|
visibility: "PUBLIC",
|
||||||
|
|
Loading…
Reference in New Issue