diff --git a/.env.dev b/.env.dev index 5f9b7ff2..c31a2280 100644 --- a/.env.dev +++ b/.env.dev @@ -3,5 +3,5 @@ VITE_APP_SITE="https://7tv.app" VITE_APP_API="https://7tv.io/v3" VITE_APP_API_GQL="https://7tv.io/v3/gql" VITE_APP_API_EVENTS="wss://events.7tv.io/v3" -VITE_APP_API_EGVAULT="https://egvault.7tv.io/v1" +VITE_APP_API_EGVAULT="https://7tv.io/egvault/v1" VITE_APP_HOST="https://extension.7tv.gg" diff --git a/.env.production b/.env.production index 924ba281..b90b2106 100644 --- a/.env.production +++ b/.env.production @@ -3,6 +3,5 @@ VITE_APP_SITE="https://7tv.app" VITE_APP_API="https://7tv.io/v3" VITE_APP_API_GQL="https://7tv.io/v3/gql" VITE_APP_API_EVENTS="wss://events.7tv.io/v3" -VITE_APP_API_EGVAULT="https://egvault.7tv.io/v1" +VITE_APP_API_EGVAULT="https://7tv.io/egvault/v1" VITE_APP_HOST="https://extension.7tv.gg" - diff --git a/CHANGELOG-nightly.md b/CHANGELOG-nightly.md index 7aa9b761..20eefa39 100644 --- a/CHANGELOG-nightly.md +++ b/CHANGELOG-nightly.md @@ -1,3 +1,7 @@ +### 3.1.3.1000 + +- Fixed extension login + ### 3.1.2.4000 - Fixed a bug that could cause issues when clicking an emoji in chat diff --git a/package.json b/package.json index 2c9fa718..14f64def 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "displayName": "7TV", "description": "Improve your viewing experience on Twitch & YouTube with new features, emotes, vanity and performance.", "private": true, - "version": "3.1.2", - "dev_version": "4.0", + "version": "3.1.3", + "dev_version": "1.0", "scripts": { "start": "NODE_ENV=dev yarn build:dev && NODE_ENV=dev vite --mode dev", "build:section:app": "vite build --config vite.config.mts", diff --git a/src/apollo/apollo.ts b/src/apollo/apollo.ts index 5279b0c0..80347984 100644 --- a/src/apollo/apollo.ts +++ b/src/apollo/apollo.ts @@ -4,13 +4,12 @@ import { ApolloClient, ApolloLink, InMemoryCache, createHttpLink } from "@apollo export const httpLink = createHttpLink({ uri: import.meta.env.VITE_APP_API_GQL, - credentials: "include", }); const token = useConfig("app.7tv.token"); const authLink = new ApolloLink((op, next) => { const jwt = decodeJWT(token.value); - if (!jwt || jwt.exp * 1000 < Date.now()) { + if (!jwt || jwt.exp * 1000 < Date.now() || !jwt.sub) { token.value = ""; return next(op); } diff --git a/src/app/settings/SettingsMenu.vue b/src/app/settings/SettingsMenu.vue index 82272548..f3f4cdc7 100644 --- a/src/app/settings/SettingsMenu.vue +++ b/src/app/settings/SettingsMenu.vue @@ -106,7 +106,7 @@
diff --git a/src/common/Constant.ts b/src/common/Constant.ts index 9af7c37a..01878b9f 100644 --- a/src/common/Constant.ts +++ b/src/common/Constant.ts @@ -22,7 +22,7 @@ export const UNICODE_TAG_0_REGEX = new RegExp(UNICODE_TAG_0, "g"); export const HOSTNAME_SUPPORTED_REGEXP = /([a-z0-9]+[.])*(youtube|kick)[.]com/; export const SEVENTV_EMOTE_LINK = new RegExp( - "https?:\\/\\/(?:www\\.)?7tv.app\\/emotes\\/(?[0-9a-f]{24})", + "https?:\\/\\/(?:www\\.)?7tv.app\\/emotes\\/(?[0-7][0-9A-HJKMNP-TV-Z]{25})", "i", ); export const SEVENTV_EMOTE_ID = new RegExp("[0-9a-f]{24}"); diff --git a/src/common/Roles.ts b/src/common/Roles.ts index c525759d..23c35910 100644 --- a/src/common/Roles.ts +++ b/src/common/Roles.ts @@ -1,4 +1,4 @@ export enum SevenTVRoles { - ADMIN = "6102002eab1aa12bf648cfcd", - MODERATOR = "60724f65e93d828bf8858789", + ADMIN = "01FBQX1CXG000AP6N15FV4HKYD", + MODERATOR = "01F2Z8C8M8000EJFC2HFW8B1W9", } diff --git a/src/composable/useActor.ts b/src/composable/useActor.ts index f5986dfb..a93b2b7b 100644 --- a/src/composable/useActor.ts +++ b/src/composable/useActor.ts @@ -1,4 +1,4 @@ -import { InjectionKey, inject, provide, reactive, toRaw, watch } from "vue"; +import { InjectionKey, inject, nextTick, provide, reactive, toRaw, watch } from "vue"; import { useConfig } from "@/composable/useSettings"; import { userByConnectionQuery, userQuery } from "@/assets/gql/seventv.user.gql"; import { SubscriptionResponse, useEgVault } from "@/app/store/egvault"; @@ -23,11 +23,7 @@ class ActorContext { } logout(): void { - fetch(import.meta.env.VITE_APP_API + "/auth/logout", { - method: "POST", - credentials: "include", - }).then(() => { - // So the user can re-authenticate if needed + nextTick(() => { this.token = ""; }); } diff --git a/src/composable/useSetMutation.ts b/src/composable/useSetMutation.ts index 5528232c..1b0ed9ba 100644 --- a/src/composable/useSetMutation.ts +++ b/src/composable/useSetMutation.ts @@ -33,7 +33,7 @@ export function useSetMutation(setID?: string): SetMutation { () => ctx.user, (u) => { if (!u) return; - setID = u.connections?.find((s) => s.platform === ctx.platform)?.emote_set?.id; + setID = u.connections?.find((s) => s.platform === ctx.platform)?.emote_set_id; }, { immediate: true }, ); diff --git a/src/site/twitch.tv/modules/custom-commands/Commands/Dashboard.vue b/src/site/twitch.tv/modules/custom-commands/Commands/Dashboard.vue index bff5484f..c565259f 100644 --- a/src/site/twitch.tv/modules/custom-commands/Commands/Dashboard.vue +++ b/src/site/twitch.tv/modules/custom-commands/Commands/Dashboard.vue @@ -210,7 +210,7 @@ const actor = useActor(); const perms = [SevenTVRoles.ADMIN, SevenTVRoles.MODERATOR] as string[]; const commandEditAnySet: Twitch.ChatCommand = { - name: "letmemamageemoteset", + name: "letmemanageemoteset", description: " Lets you edit any 7TV emote set", helpText: "", permissionLevel: 0, diff --git a/src/types/app.d.ts b/src/types/app.d.ts index d9971f9c..9094fb15 100644 --- a/src/types/app.d.ts +++ b/src/types/app.d.ts @@ -54,12 +54,11 @@ declare namespace SevenTV { } interface JWT { - u: string; - v: number; iss: string; + sub: string; exp: number; - nbf: number; iat: number; + jti: string; } interface EmoteSet {