Skip to content

Commit

Permalink
fix: name of emote state property (#865)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatoleAM authored Jan 16, 2023
1 parent ffe4ef1 commit 736b2da
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/apollo/query/emote-search.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const SearchEmotes = gql`
items {
id
name
states
state
trending
owner {
id
Expand Down
2 changes: 1 addition & 1 deletion src/apollo/query/emote-set.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const GetEmoteSet = gql`
id
name
flags
states
state
lifecycle
host {
url
Expand Down
10 changes: 5 additions & 5 deletions src/apollo/query/emote.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const emoteForEmotePageQuery = gql`
created_at
name
lifecycle
states
state
trending
tags
owner {
Expand All @@ -31,7 +31,7 @@ export const emoteForEmotePageQuery = gql`
description
created_at
lifecycle
states
state
host {
...HostFragment
}
Expand Down Expand Up @@ -144,7 +144,7 @@ export const GetEmote = gql`
created_at
name
lifecycle
states
state
trending
tags
owner {
Expand All @@ -167,7 +167,7 @@ export const GetEmote = gql`
description
created_at
lifecycle
states
state
host {
url
files {
Expand All @@ -190,7 +190,7 @@ export const GetEmotes = gql`
id
name
flags
states
state
tags
owner {
id
Expand Down
2 changes: 1 addition & 1 deletion src/apollo/query/user.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const userOwnedEmotesQuery = gql`
name
lifecycle
flags
states
state
trending
host {
url
Expand Down
8 changes: 4 additions & 4 deletions src/components/utility/EmoteCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
>
<div
class="img-wrapper"
:censor="!emote.states.includes('LISTED') && !actor.hasPermission(Permissions.EditAnyEmote)"
:censor="!emote.state.includes('LISTED') && !actor.hasPermission(Permissions.EditAnyEmote)"
>
<img v-if="src" :src="src" />
</div>
Expand Down Expand Up @@ -122,7 +122,7 @@ const indicators = computed(() => {
color: isForeign ? "#4d66b3" : "#9146ff",
});
}
if (props.emote.states.includes("LISTED") === false) {
if (props.emote.state.includes("LISTED") === false) {
list.push({
icon: "eye-slash",
tooltip: "Unlisted",
Expand Down Expand Up @@ -184,15 +184,15 @@ const indicators = computed(() => {
}

if (props.personalContext) {
if (props.emote.states.includes("NO_PERSONAL")) {
if (props.emote.state.includes("NO_PERSONAL")) {
list = [
{
icon: "user-slash",
tooltip: t("emote_set.personal.not_allowed"),
color: "salmon",
},
];
} else if (!props.emote.states.includes("PERSONAL")) {
} else if (!props.emote.state.includes("PERSONAL")) {
list.push({
icon: "user-clock",
tooltip: t("emote_set.personal.pending_review"),
Expand Down
4 changes: 2 additions & 2 deletions src/structures/Emote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface Emote {
parent_id: string;
trending?: number | null;
versions: EmoteVersion[];
states: EmoteVersionState[];
state: EmoteVersionState[];
common_names: Emote.CommonName[];
animated: boolean;
}
Expand All @@ -32,7 +32,7 @@ export interface EmoteVersion {
id: string;
name: string;
description: string;
states: EmoteVersionState[];
state: EmoteVersionState[];
host: ImageHost;
lifecycle: Emote.Lifecycle;
error?: string | null;
Expand Down
4 changes: 2 additions & 2 deletions src/views/emote/EmotePropertiesModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ const form = reactive({
name: props.emote.name,
private: Emote.IsPrivate(props.emote),
zero_width: Emote.IsZeroWidth(props.emote),
listed: props.emote.states.includes("LISTED"),
personal_use: props.emote.states.includes("PERSONAL"),
listed: props.emote.state.includes("LISTED"),
personal_use: props.emote.state.includes("PERSONAL"),
});
const formRules = {
Expand Down
2 changes: 1 addition & 1 deletion src/views/emote/EmoteRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ onUnmounted(() => (ctx.emote = { id: "" } as Emote));
watchEffect(() => {
visible.value =
!ctx.emote.id ||
ctx.emote.states.includes("LISTED") ||
ctx.emote.state.includes("LISTED") ||
ctx.emote.owner?.id === actor.id ||
actor.hasPermission(Permissions.EditAnyEmote);
});
Expand Down
2 changes: 1 addition & 1 deletion src/views/emote/EmoteVersions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div
v-if="
version.states.includes('LISTED') ||
version.state.includes('LISTED') ||
visible?.includes(version.id) ||
actor.id === emote.owner_id ||
actor.hasPermission(Permissions.EditAnyEmote)
Expand Down

0 comments on commit 736b2da

Please sign in to comment.