From 9fc3e9082f035aa28382f3e6424b6456e559a9e4 Mon Sep 17 00:00:00 2001 From: William Oldham Date: Thu, 29 Feb 2024 21:36:04 +0000 Subject: [PATCH 1/4] feat: automatically prefix backend url with https:// if not provided --- src/pages/Settings.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx index 5fe8843b..eec41eb2 100644 --- a/src/pages/Settings.tsx +++ b/src/pages/Settings.tsx @@ -208,7 +208,13 @@ export function SettingsPage() { // when backend url gets changed, log the user out first if (state.backendUrl.changed) { await logout(); - setBackendUrl(state.backendUrl.state); + + let url = state.backendUrl.state; + if (url && !url.startsWith("http://") && !url.startsWith("https://")) { + url = `https://${url}`; + } + + setBackendUrl(url); } }, [ state, From 5e334246f4b9c3c4c9106a5d9e2a2c909655f455 Mon Sep 17 00:00:00 2001 From: William Oldham Date: Thu, 29 Feb 2024 23:17:52 +0000 Subject: [PATCH 2/4] Fix linting --- src/pages/Settings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx index eec41eb2..b6bf4fc4 100644 --- a/src/pages/Settings.tsx +++ b/src/pages/Settings.tsx @@ -1,5 +1,5 @@ import classNames from "classnames"; -import { useCallback, useEffect, useMemo, useRef } from "react"; +import { useCallback, useEffect, useMemo } from "react"; import { useTranslation } from "react-i18next"; import { useAsyncFn } from "react-use"; From 6388ebb8ef308306255b3d98e1613679e11f9b84 Mon Sep 17 00:00:00 2001 From: William Oldham Date: Thu, 29 Feb 2024 23:18:15 +0000 Subject: [PATCH 3/4] Update providers to 2.2.2 --- package.json | 2 +- pnpm-lock.yaml | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 8031308c..5884e842 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@formkit/auto-animate": "^0.8.1", "@headlessui/react": "^1.7.17", "@ladjs/country-language": "^1.0.3", - "@movie-web/providers": "^2.2.0", + "@movie-web/providers": "^2.2.2", "@noble/hashes": "^1.3.3", "@plasmohq/messaging": "^0.6.1", "@react-spring/web": "^9.7.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0e19baec..ed583cf8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,8 +22,8 @@ dependencies: specifier: ^1.0.3 version: 1.0.3 '@movie-web/providers': - specifier: ^2.2.0 - version: 2.2.0 + specifier: ^2.2.2 + version: 2.2.2 '@noble/hashes': specifier: ^1.3.3 version: 1.3.3 @@ -1936,8 +1936,8 @@ packages: engines: {node: '>= 14'} dev: false - /@movie-web/providers@2.2.0: - resolution: {integrity: sha512-7rKUpLPklwOtS5P2CAeh0P3sPIuYvtkKIgm0kVMp+OsSpKd9IcuYm79bbDrA0MDi3IMGik1W6la9Mzy91+8uYQ==} + /@movie-web/providers@2.2.2: + resolution: {integrity: sha512-pTlErE5bdu+b68mUW2YAKOJKz2hwSx63auGAfTkGQ+0SHDMlCV9QQ8S8O9IoSsvdXps7/YlWJWOMX8pmKuYbPQ==} dependencies: cheerio: 1.0.0-rc.12 cookie: 0.6.0 @@ -7359,7 +7359,6 @@ packages: /workbox-google-analytics@7.0.0: resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==} - deprecated: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained dependencies: workbox-background-sync: 7.0.0 workbox-core: 7.0.0 From 34cb2bfb367e35f40435186b1d9c5c351d415a1c Mon Sep 17 00:00:00 2001 From: William Oldham Date: Thu, 29 Feb 2024 23:27:50 +0000 Subject: [PATCH 4/4] Bump version to 4.5.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5884e842..fe2cc3d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "movie-web", - "version": "4.5.0", + "version": "4.5.1", "private": true, "homepage": "https://github.com/movie-web/movie-web", "scripts": {