From 944069e41199d877d47cfe95122bc09f9dab7492 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Wed, 11 Dec 2024 11:38:36 +0200 Subject: [PATCH 01/47] refactor(StreamsList): addons install button --- .../MetaDetails/StreamsList/StreamsList.js | 19 ++++++++++++++----- .../MetaDetails/StreamsList/styles.less | 11 +++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/routes/MetaDetails/StreamsList/StreamsList.js b/src/routes/MetaDetails/StreamsList/StreamsList.js index 840664c8b..aa204000a 100644 --- a/src/routes/MetaDetails/StreamsList/StreamsList.js +++ b/src/routes/MetaDetails/StreamsList/StreamsList.js @@ -23,7 +23,7 @@ const StreamsList = ({ className, video, ...props }) => { if (video.deepLinks && typeof video.deepLinks.metaDetailsVideos === 'string') { window.location.replace(video.deepLinks.metaDetailsVideos + ( typeof video.season === 'number' ? - `?${new URLSearchParams({'season': video.season})}` + `?${new URLSearchParams({ 'season': video.season })}` : null )); @@ -157,13 +157,22 @@ const StreamsList = ({ className, video, ...props }) => { onClick={stream.onClick} /> ))} + } - + { + Object.keys(streamsByAddon).length < 2 && props.streams.every((streams) => streams.content.type === 'Ready') ? + + : + null + } ); }; diff --git a/src/routes/MetaDetails/StreamsList/styles.less b/src/routes/MetaDetails/StreamsList/styles.less index c22b14071..9859ea2d0 100644 --- a/src/routes/MetaDetails/StreamsList/styles.less +++ b/src/routes/MetaDetails/StreamsList/styles.less @@ -151,6 +151,17 @@ background-color: var(--secondary-accent-color); border-radius: 3rem; + &.streams { + padding: 1rem; + margin: 1rem auto; + max-width: 50%; + border-radius: 2rem; + + .label { + font-size: 1rem; + } + } + &:hover { outline: var(--focus-outline-size) solid var(--secondary-accent-color); background-color: transparent; From 203c04b8c872c26f0d9a27762a43b07119a5cc70 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Wed, 11 Dec 2024 11:48:17 +0200 Subject: [PATCH 02/47] refactor: logic for showing the button --- src/routes/MetaDetails/StreamsList/StreamsList.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/routes/MetaDetails/StreamsList/StreamsList.js b/src/routes/MetaDetails/StreamsList/StreamsList.js index aa204000a..05d3c94fc 100644 --- a/src/routes/MetaDetails/StreamsList/StreamsList.js +++ b/src/routes/MetaDetails/StreamsList/StreamsList.js @@ -157,15 +157,20 @@ const StreamsList = ({ className, video, ...props }) => { onClick={stream.onClick} /> ))} - + { + Object.keys(streamsByAddon).length > 1 ? + + : + null + } } { - Object.keys(streamsByAddon).length < 2 && props.streams.every((streams) => streams.content.type === 'Ready') ? + Object.keys(streamsByAddon).length < 2 && countLoadingAddons === 0 ? - - - - - ); -}; - -StreamingServerWarning.propTypes = { - className: PropTypes.string -}; - -module.exports = withCoreSuspender(StreamingServerWarning); diff --git a/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx b/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx new file mode 100644 index 000000000..5b2218bf0 --- /dev/null +++ b/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx @@ -0,0 +1,93 @@ +import React, { useCallback } from 'react'; +import { useTranslation } from 'react-i18next'; +import classnames from 'classnames'; +import { useServices } from 'stremio/services'; +import { Button } from 'stremio/components'; +import useProfile from 'stremio/common/useProfile'; +import { withCoreSuspender } from 'stremio/common/CoreSuspender'; +import styles from './styles.less'; + +type Props = { + className?: string; +}; + +const StreamingServerWarning = ({ className }: Props) => { + const { t } = useTranslation(); + const { core } = useServices(); + const profile = useProfile(); + + const createDate = (months: number, years: number): Date => { + const date = new Date(); + if (months) date.setMonth(date.getMonth() + months); + if (years) date.setFullYear(date.getFullYear() + years); + return date; + }; + + const updateSettings = useCallback((warningDismissed: Date) => { + core.transport.dispatch({ + action: 'Ctx', + args: { + action: 'UpdateSettings', + args: { + ...profile.settings, + warningDismissed + } + } + }); + }, [profile.settings]); + + const onLater = useCallback(() => { + updateSettings(createDate(1, 0)); + }, [updateSettings]); + + const onDismiss = useCallback(() => { + updateSettings(createDate(0, 50)); + }, [updateSettings]); + + return ( +
+
+ {t('SETTINGS_SERVER_UNAVAILABLE')} +
+
+ + + + + +
+
+ ); +}; + +export default withCoreSuspender(StreamingServerWarning); diff --git a/src/routes/Board/StreamingServerWarning/index.js b/src/routes/Board/StreamingServerWarning/index.js deleted file mode 100644 index 6e3f26596..000000000 --- a/src/routes/Board/StreamingServerWarning/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (C) 2017-2023 Smart code 203358507 - -const StreamingServerWarning = require('./StreamingServerWarning'); - -module.exports = StreamingServerWarning; diff --git a/src/routes/Board/StreamingServerWarning/index.ts b/src/routes/Board/StreamingServerWarning/index.ts new file mode 100644 index 000000000..f623704a5 --- /dev/null +++ b/src/routes/Board/StreamingServerWarning/index.ts @@ -0,0 +1,5 @@ +// Copyright (C) 2017-2024 Smart code 203358507 + +import StreamingServerWarning from './StreamingServerWarning'; + +export default StreamingServerWarning; diff --git a/src/routes/Board/StreamingServerWarning/styles.less b/src/routes/Board/StreamingServerWarning/styles.less index 42ab6bb4b..434c19e9c 100644 --- a/src/routes/Board/StreamingServerWarning/styles.less +++ b/src/routes/Board/StreamingServerWarning/styles.less @@ -1,6 +1,7 @@ // Copyright (C) 2017-2023 Smart code 203358507 @import (reference) '~@stremio/stremio-colors/less/stremio-colors.less'; +@import (reference) '~stremio/common/screen-sizes.less'; .warning-container { display: flex; @@ -8,53 +9,52 @@ align-items: center; padding: 1rem; background-color: @color-accent5-dark3; + border-radius: 0.5rem 0.5rem 0 0; + margin: 0 0.5rem; + box-shadow: 0px 0.25rem 1rem rgba(0, 0, 0, 0.48), 0px 0.5rem 3rem rgba(0, 0, 0, 0.64); .warning-statement { flex: 1; - margin-right: 1rem; font-size: 1.2rem; max-height: 2.4em; color: @color-surface-light5-90; } - .warning-button { - flex: none; - margin-left: 1rem; - color: @color-surface-light5-90; + .actions { + display: flex; + gap: 1rem; - &:first-child { - margin-left: 0; - } - - &:hover { - .warning-label { - text-decoration: underline; + .action { + flex: none; + color: @color-surface-light5-90; + + &:first-child { + margin-left: 0; + } + + .label { + font-size: 1.2rem; + max-height: 1.2em; + color: @color-surface-light5-90; + } + + &:hover { + .label { + text-decoration: underline; + } } } - - .warning-label { - font-size: 1.2rem; - max-height: 1.2em; - color: @color-surface-light5-90; - } - } - - .warning-button:hover { - text-decoration: underline; } } -@media only screen and (max-width: 500px) { +@media only screen and (max-width: @minimum) { .warning-container { - display: block; - height: auto !important; + flex-direction: column; text-align: center; - .warning-statement { - margin-bottom: 0.5rem; - margin-right: 0; - } - .warning-button { - display: inline-block; + padding: 1rem 0.5rem; + + .actions { + justify-content: space-around; } } } diff --git a/src/routes/Board/styles.less b/src/routes/Board/styles.less index 403e75869..00542559d 100644 --- a/src/routes/Board/styles.less +++ b/src/routes/Board/styles.less @@ -220,7 +220,7 @@ left: 0; right: 0; bottom: calc(var(--vertical-nav-bar-size) + var(--calculated-bottom-safe-inset, 0rem)); - height: 4rem; + height: 6rem; margin-bottom: 0rem; } } From f6080d9a9586a16d8b7de95d783c3ec66a77f88b Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Tue, 7 Jan 2025 16:57:19 +0200 Subject: [PATCH 06/47] refactor(StreamingServerWarning): add logs useMemo --- src/routes/Board/Board.js | 14 +++++++++++--- .../StreamingServerWarning.tsx | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/routes/Board/Board.js b/src/routes/Board/Board.js index d405ece67..2ba05ec4e 100644 --- a/src/routes/Board/Board.js +++ b/src/routes/Board/Board.js @@ -4,7 +4,7 @@ const React = require('react'); const classnames = require('classnames'); const debounce = require('lodash.debounce'); const { useTranslation } = require('react-i18next'); -const { useStreamingServer, useNotifications, withCoreSuspender, getVisibleChildrenRange } = require('stremio/common'); +const { useStreamingServer, useNotifications, withCoreSuspender, getVisibleChildrenRange, useProfile } = require('stremio/common'); const { ContinueWatchingItem, EventModal, MainNavBars, MetaItem, MetaRow, Transition } = require('stremio/components'); const useBoard = require('./useBoard'); const useContinueWatchingPreview = require('./useContinueWatchingPreview'); @@ -19,9 +19,15 @@ const Board = () => { const continueWatchingPreview = useContinueWatchingPreview(); const [board, loadBoardRows] = useBoard(); const notifications = useNotifications(); + const profile = useProfile(); const boardCatalogsOffset = continueWatchingPreview.items.length > 0 ? 1 : 0; const scrollContainerRef = React.useRef(); - const streamingServerWarningOpen = React.useMemo(() => streamingServer.settings !== null && streamingServer.settings.type === 'Err', [streamingServer.settings]); + const streamingServerWarningDismissed = React.useMemo(() => { + return streamingServer.settings !== null && + streamingServer.settings.type === 'Err' && + !isNaN(profile.settings.streamingServerWarningDismissed.getTime()) && + profile.settings.streamingServerWarningDismissed.getTime() > Date.now(); + }, [profile.settings, streamingServer.settings]); const onVisibleRangeChange = React.useCallback(() => { const range = getVisibleChildrenRange(scrollContainerRef.current); if (range === null) { @@ -40,6 +46,8 @@ const Board = () => { React.useLayoutEffect(() => { onVisibleRangeChange(); }, [board.catalogs, onVisibleRangeChange]); + console.log(streamingServerWarningDismissed); // eslint-disable-line no-console + console.log(profile.settings.streamingServerWarningDismissed); // eslint-disable-line no-console return (
@@ -95,7 +103,7 @@ const Board = () => { })}
- + diff --git a/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx b/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx index 5b2218bf0..b67c3dcf7 100644 --- a/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx +++ b/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx @@ -24,6 +24,7 @@ const StreamingServerWarning = ({ className }: Props) => { }; const updateSettings = useCallback((warningDismissed: Date) => { + console.log('updateSettings', warningDismissed); // eslint-disable-line no-console core.transport.dispatch({ action: 'Ctx', args: { From cb09644c3364ea8edbd2579f135049b3037eb6a9 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Sat, 11 Jan 2025 15:29:57 +0200 Subject: [PATCH 07/47] refactor(StreamingServerWarning): without transition --- src/common/animations.less | 13 --------- src/routes/Board/Board.js | 17 ++++++------ .../StreamingServerWarning.tsx | 27 ++++++++++++------- .../Board/StreamingServerWarning/styles.less | 4 +-- 4 files changed, 28 insertions(+), 33 deletions(-) diff --git a/src/common/animations.less b/src/common/animations.less index 00653433d..d4e24bc6e 100644 --- a/src/common/animations.less +++ b/src/common/animations.less @@ -53,19 +53,6 @@ transform: translateX(100%); } -.slide-up-enter { - transform: translateY(100%); -} - -.slide-up-active { - transform: translateY(0%); - transition: transform 0.3s cubic-bezier(0.32, 0, 0.67, 0); -} - -.slide-up-exit { - transform: translateY(100%); -} - @keyframes fade-in-no-motion { 0% { opacity: 0; diff --git a/src/routes/Board/Board.js b/src/routes/Board/Board.js index 2ba05ec4e..31d5ac28a 100644 --- a/src/routes/Board/Board.js +++ b/src/routes/Board/Board.js @@ -5,7 +5,7 @@ const classnames = require('classnames'); const debounce = require('lodash.debounce'); const { useTranslation } = require('react-i18next'); const { useStreamingServer, useNotifications, withCoreSuspender, getVisibleChildrenRange, useProfile } = require('stremio/common'); -const { ContinueWatchingItem, EventModal, MainNavBars, MetaItem, MetaRow, Transition } = require('stremio/components'); +const { ContinueWatchingItem, EventModal, MainNavBars, MetaItem, MetaRow } = require('stremio/components'); const useBoard = require('./useBoard'); const useContinueWatchingPreview = require('./useContinueWatchingPreview'); const styles = require('./styles'); @@ -25,8 +25,8 @@ const Board = () => { const streamingServerWarningDismissed = React.useMemo(() => { return streamingServer.settings !== null && streamingServer.settings.type === 'Err' && - !isNaN(profile.settings.streamingServerWarningDismissed.getTime()) && - profile.settings.streamingServerWarningDismissed.getTime() > Date.now(); + !isNaN(profile.settings.streamingServerWarningDismissed.getTime()) && + profile.settings.streamingServerWarningDismissed.getTime() > Date.now(); }, [profile.settings, streamingServer.settings]); const onVisibleRangeChange = React.useCallback(() => { const range = getVisibleChildrenRange(scrollContainerRef.current); @@ -46,8 +46,6 @@ const Board = () => { React.useLayoutEffect(() => { onVisibleRangeChange(); }, [board.catalogs, onVisibleRangeChange]); - console.log(streamingServerWarningDismissed); // eslint-disable-line no-console - console.log(profile.settings.streamingServerWarningDismissed); // eslint-disable-line no-console return (
@@ -103,9 +101,12 @@ const Board = () => { })}
- - - + { + !streamingServerWarningDismissed ? + + : + null + } ); }; diff --git a/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx b/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx index b67c3dcf7..39ea077cf 100644 --- a/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx +++ b/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx @@ -1,3 +1,5 @@ +// Copyright (C) 2017-2024 Smart code 203358507 + import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import classnames from 'classnames'; @@ -16,33 +18,38 @@ const StreamingServerWarning = ({ className }: Props) => { const { core } = useServices(); const profile = useProfile(); - const createDate = (months: number, years: number): Date => { - const date = new Date(); - if (months) date.setMonth(date.getMonth() + months); - if (years) date.setFullYear(date.getFullYear() + years); - return date; + const createDismissalDate = (months: number, years = 0): Date => { + const dismissalDate = new Date(); + + if (months) { + dismissalDate.setMonth(dismissalDate.getMonth() + months); + } + if (years) { + dismissalDate.setFullYear(dismissalDate.getFullYear() + years); + } + + return dismissalDate; }; - const updateSettings = useCallback((warningDismissed: Date) => { - console.log('updateSettings', warningDismissed); // eslint-disable-line no-console + const updateSettings = useCallback((streamingServerWarningDismissed: Date) => { core.transport.dispatch({ action: 'Ctx', args: { action: 'UpdateSettings', args: { ...profile.settings, - warningDismissed + streamingServerWarningDismissed } } }); }, [profile.settings]); const onLater = useCallback(() => { - updateSettings(createDate(1, 0)); + updateSettings(createDismissalDate(1)); }, [updateSettings]); const onDismiss = useCallback(() => { - updateSettings(createDate(0, 50)); + updateSettings(createDismissalDate(0, 50)); }, [updateSettings]); return ( diff --git a/src/routes/Board/StreamingServerWarning/styles.less b/src/routes/Board/StreamingServerWarning/styles.less index 434c19e9c..f4f963912 100644 --- a/src/routes/Board/StreamingServerWarning/styles.less +++ b/src/routes/Board/StreamingServerWarning/styles.less @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2023 Smart code 203358507 +// Copyright (C) 2017-2024 Smart code 203358507 @import (reference) '~@stremio/stremio-colors/less/stremio-colors.less'; @import (reference) '~stremio/common/screen-sizes.less'; @@ -34,7 +34,6 @@ .label { font-size: 1.2rem; - max-height: 1.2em; color: @color-surface-light5-90; } @@ -52,6 +51,7 @@ flex-direction: column; text-align: center; padding: 1rem 0.5rem; + border-radius: 0.5rem; .actions { justify-content: space-around; From 3e5c4a816f49b2a35d1ed47b024c52bdb2bdac11 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Sat, 11 Jan 2025 15:31:09 +0200 Subject: [PATCH 08/47] remove: unused keyframes --- src/common/animations.less | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/common/animations.less b/src/common/animations.less index d4e24bc6e..8c8c03179 100644 --- a/src/common/animations.less +++ b/src/common/animations.less @@ -52,21 +52,3 @@ .slide-left-exit { transform: translateX(100%); } - -@keyframes fade-in-no-motion { - 0% { - opacity: 0; - } - - 40% { - opacity: 0; - } - - 70% { - opacity: 0.6; - } - - 100% { - opacity: 1; - } -} \ No newline at end of file From 8e03f277520c3751ed07b8e7d81a3bf2147f9427 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Sat, 11 Jan 2025 15:31:21 +0200 Subject: [PATCH 09/47] Update animations.less --- src/common/animations.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/animations.less b/src/common/animations.less index 8c8c03179..6ca879343 100644 --- a/src/common/animations.less +++ b/src/common/animations.less @@ -51,4 +51,4 @@ .slide-left-exit { transform: translateX(100%); -} +} \ No newline at end of file From 8873435fd971c78e40d5b7b9ee059aff969f91bc Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 13 Jan 2025 14:07:54 +0200 Subject: [PATCH 10/47] refactor(StreamList): install addons btn --- .../MetaDetails/StreamsList/StreamsList.js | 30 +++++++++++-------- .../MetaDetails/StreamsList/styles.less | 23 ++++---------- src/types/models/Ctx.d.ts | 1 + 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/src/routes/MetaDetails/StreamsList/StreamsList.js b/src/routes/MetaDetails/StreamsList/StreamsList.js index a9f0d6ee6..bcb5cb015 100644 --- a/src/routes/MetaDetails/StreamsList/StreamsList.js +++ b/src/routes/MetaDetails/StreamsList/StreamsList.js @@ -9,7 +9,7 @@ const { Button, Image, Multiselect } = require('stremio/components'); const { useServices } = require('stremio/services'); const Stream = require('./Stream'); const styles = require('./styles'); -const { usePlatform } = require('stremio/common'); +const { usePlatform, useProfile } = require('stremio/common'); const ALL_ADDONS_KEY = 'ALL'; @@ -17,17 +17,21 @@ const StreamsList = ({ className, video, ...props }) => { const { t } = useTranslation(); const { core } = useServices(); const platform = usePlatform(); + const profile = useProfile(); const streamsContainerRef = React.useRef(null); const [selectedAddon, setSelectedAddon] = React.useState(ALL_ADDONS_KEY); const onAddonSelected = React.useCallback((event) => { streamsContainerRef.current.scrollTo({ top: 0, left: 0, behavior: platform.name === 'ios' ? 'smooth' : 'instant' }); setSelectedAddon(event.value); }, [platform]); + const showInstallAddonsButton = React.useMemo(() => { + return !profile || profile.auth === null || profile.auth?.user?.isNewUser === true; + }, [profile]); const backButtonOnClick = React.useCallback(() => { if (video.deepLinks && typeof video.deepLinks.metaDetailsVideos === 'string') { window.location.replace(video.deepLinks.metaDetailsVideos + ( typeof video.season === 'number' ? - `?${new URLSearchParams({'season': video.season})}` + `?${new URLSearchParams({ 'season': video.season })}` : null )); @@ -126,6 +130,15 @@ const StreamsList = ({ className, video, ...props }) => {
{'
{t('NO_STREAM')}
+ { + showInstallAddonsButton ? + + : + null + }
: filteredStreams.length === 0 ? @@ -162,8 +175,8 @@ const StreamsList = ({ className, video, ...props }) => { /> ))} { - Object.keys(streamsByAddon).length > 1 ? - @@ -173,15 +186,6 @@ const StreamsList = ({ className, video, ...props }) => { } - { - Object.keys(streamsByAddon).length < 2 && countLoadingAddons === 0 ? - - : - null - } ); }; diff --git a/src/routes/MetaDetails/StreamsList/styles.less b/src/routes/MetaDetails/StreamsList/styles.less index 7e80858b8..97235fd0d 100644 --- a/src/routes/MetaDetails/StreamsList/styles.less +++ b/src/routes/MetaDetails/StreamsList/styles.less @@ -19,7 +19,7 @@ display: flex; flex-direction: column; align-items: center; - padding: 1rem 1rem 0; + padding: 1rem; overflow-y: auto; .image { @@ -144,22 +144,11 @@ flex-direction: row; align-items: center; justify-content: center; - margin: 1rem; - padding: 1.5rem 1rem; - border-radius: var(--border-radius); background-color: var(--secondary-accent-color); - border-radius: 3rem; - - &.streams { - padding: 1rem; - margin: 1rem auto; - max-width: 50%; - border-radius: 2rem; - - .label { - font-size: 1rem; - } - } + padding: 1rem; + margin: 1rem auto; + max-width: 50%; + border-radius: 2rem; &:hover { outline: var(--focus-outline-size) solid var(--secondary-accent-color); @@ -176,7 +165,7 @@ .label { flex: 0 1 auto; - font-size: 1.5rem; + font-size: 1rem; font-weight: 700; max-height: 3.6em; text-align: center; diff --git a/src/types/models/Ctx.d.ts b/src/types/models/Ctx.d.ts index ffb5d7f0a..a86fd60fa 100644 --- a/src/types/models/Ctx.d.ts +++ b/src/types/models/Ctx.d.ts @@ -9,6 +9,7 @@ type Auth = { created_at: number, expires_in: number, }, + isNewUser: boolean, }, }; From 21967eeecbe3f843f8c1195c8b9e027758297935 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 13 Jan 2025 15:49:57 +0200 Subject: [PATCH 11/47] chore(pkgs): update core-web --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index be53e9ec7..cf559fac8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@babel/runtime": "7.26.0", "@sentry/browser": "8.42.0", "@stremio/stremio-colors": "5.2.0", - "@stremio/stremio-core-web": "0.48.4", + "@stremio/stremio-core-web": "https://stremio.github.io/stremio-core/stremio-core-web/feat/profile-new-user-field/dev/stremio-stremio-core-web-0.48.4.tgz", "@stremio/stremio-icons": "5.4.1", "@stremio/stremio-video": "0.0.48", "a-color-picker": "1.2.1", @@ -3372,8 +3372,8 @@ }, "node_modules/@stremio/stremio-core-web": { "version": "0.48.4", - "resolved": "https://registry.npmjs.org/@stremio/stremio-core-web/-/stremio-core-web-0.48.4.tgz", - "integrity": "sha512-848OLm0dtP75aAlYhUB0KoOqwosJIj+ubB8/abuaAzH/N3dtxs40vu2AezmMpGjwR4V60rlOUkUZeWFvrUOjrw==", + "resolved": "https://stremio.github.io/stremio-core/stremio-core-web/feat/profile-new-user-field/dev/stremio-stremio-core-web-0.48.4.tgz", + "integrity": "sha512-7Z4Pk6mp3rE6/5kTcroPbXO1QCuDWqw6mLlaeJN6Ic4g+UW/XB6ej8Ppat/Q95JawF3zAaUlckeX85LxqOY4Uw==", "license": "MIT", "dependencies": { "@babel/runtime": "7.24.1" diff --git a/package.json b/package.json index 79593f9d5..8aee01837 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@babel/runtime": "7.26.0", "@sentry/browser": "8.42.0", "@stremio/stremio-colors": "5.2.0", - "@stremio/stremio-core-web": "0.48.4", + "@stremio/stremio-core-web": "https://stremio.github.io/stremio-core/stremio-core-web/feat/profile-new-user-field/dev/stremio-stremio-core-web-0.48.4.tgz", "@stremio/stremio-icons": "5.4.1", "@stremio/stremio-video": "0.0.48", "a-color-picker": "1.2.1", From ce85c14f450d086bd3c6df912620e2dd99aa0329 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 13 Jan 2025 16:23:11 +0200 Subject: [PATCH 12/47] refactor(StreamingServerWarning): styles --- .../{styles.less => StreamingServerWarning.less} | 10 ++++++---- .../StreamingServerWarning/StreamingServerWarning.tsx | 2 +- src/routes/Board/styles.less | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) rename src/routes/Board/StreamingServerWarning/{styles.less => StreamingServerWarning.less} (80%) diff --git a/src/routes/Board/StreamingServerWarning/styles.less b/src/routes/Board/StreamingServerWarning/StreamingServerWarning.less similarity index 80% rename from src/routes/Board/StreamingServerWarning/styles.less rename to src/routes/Board/StreamingServerWarning/StreamingServerWarning.less index f4f963912..fbae07a6b 100644 --- a/src/routes/Board/StreamingServerWarning/styles.less +++ b/src/routes/Board/StreamingServerWarning/StreamingServerWarning.less @@ -9,9 +9,9 @@ align-items: center; padding: 1rem; background-color: @color-accent5-dark3; - border-radius: 0.5rem 0.5rem 0 0; + border-radius: 0.5rem; margin: 0 0.5rem; - box-shadow: 0px 0.25rem 1rem rgba(0, 0, 0, 0.48), 0px 0.5rem 3rem rgba(0, 0, 0, 0.64); + box-shadow: 0rem 0.25rem 1rem rgba(0, 0, 0, 0.48), 0rem 0.5rem 3rem rgba(0, 0, 0, 0.64); .warning-statement { flex: 1; @@ -26,7 +26,10 @@ .action { flex: none; + padding: 0.5rem 1rem; color: @color-surface-light5-90; + background-color: rgba(0, 0, 0, 0.24); + border-radius: var(--border-radius); &:first-child { margin-left: 0; @@ -50,8 +53,7 @@ .warning-container { flex-direction: column; text-align: center; - padding: 1rem 0.5rem; - border-radius: 0.5rem; + padding: 1rem 0.5rem;s .actions { justify-content: space-around; diff --git a/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx b/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx index 39ea077cf..7c9872c8b 100644 --- a/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx +++ b/src/routes/Board/StreamingServerWarning/StreamingServerWarning.tsx @@ -7,7 +7,7 @@ import { useServices } from 'stremio/services'; import { Button } from 'stremio/components'; import useProfile from 'stremio/common/useProfile'; import { withCoreSuspender } from 'stremio/common/CoreSuspender'; -import styles from './styles.less'; +import styles from './StreamingServerWarning.less'; type Props = { className?: string; diff --git a/src/routes/Board/styles.less b/src/routes/Board/styles.less index 00542559d..ef64a1807 100644 --- a/src/routes/Board/styles.less +++ b/src/routes/Board/styles.less @@ -38,7 +38,7 @@ .board-warning-container { flex: none; align-self: stretch; - margin-bottom: var(--calculated-bottom-safe-inset, 0rem); + margin-bottom: calc(max(var(--calculated-bottom-safe-inset), 0.5rem)) } } @@ -220,7 +220,7 @@ left: 0; right: 0; bottom: calc(var(--vertical-nav-bar-size) + var(--calculated-bottom-safe-inset, 0rem)); - height: 6rem; + height: 7rem; margin-bottom: 0rem; } } From 6d4117125ab99566a61ba60f2dac353de5d6d2d8 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 20 Jan 2025 09:52:53 +0200 Subject: [PATCH 13/47] refactor(NextVideoPopup): remove desc & styles --- src/common/screen-sizes.less | 2 +- .../Player/NextVideoPopup/NextVideoPopup.js | 8 ----- src/routes/Player/NextVideoPopup/styles.less | 31 ++++++++++++++----- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/common/screen-sizes.less b/src/common/screen-sizes.less index a4a37437a..493c899dc 100644 --- a/src/common/screen-sizes.less +++ b/src/common/screen-sizes.less @@ -21,5 +21,5 @@ @small-phone-portrait: ~"screen and (max-width: @{small-phone-landscape-size}) and (max-height: @{small-phone-portrait-size}) and (orientation: portrait)"; @phone-landscape: ~"screen and (max-width: @{phone-portrait-size}) and (max-height: @{phone-landscape-size}) and (orientation: landscape)"; -@phone-portrait: ~"screen and (max-width: @{phone-portrait-size}) and (max-height: @{phone-portrait-size}) and (orientation: portrait)"; +@phone-portrait: ~"screen and (max-width: @{phone-landscape-size}) and (max-height: @{phone-portrait-size}) and (orientation: portrait)"; diff --git a/src/routes/Player/NextVideoPopup/NextVideoPopup.js b/src/routes/Player/NextVideoPopup/NextVideoPopup.js index e772f4639..8b400bfe2 100644 --- a/src/routes/Player/NextVideoPopup/NextVideoPopup.js +++ b/src/routes/Player/NextVideoPopup/NextVideoPopup.js @@ -76,14 +76,6 @@ const NextVideoPopup = ({ className, metaItem, nextVideo, onDismiss, onNextVideo : null } - { - nextVideo !== null && typeof nextVideo.overview === 'string' ? -
- { nextVideo.overview } -
- : - null - }
@@ -717,6 +723,23 @@ const Settings = () => { : null } + { + typeof shell?.transport?.props?.shellVersion === 'string' ? +
+
+
+ Shell Version +
+
+
+
+ { shell.transport.props.shellVersion } +
+
+
+ : + null + }
From 0a1278b494863d2d82fa35a3deae4280656fa958 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 29 Jan 2025 19:04:33 +0100 Subject: [PATCH 34/47] build: remove commit hash from images path --- webpack.config.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 878d52f97..751c5cbb6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -163,7 +163,7 @@ module.exports = (env, argv) => ({ exclude: /node_modules/, type: 'asset/resource', generator: { - filename: `${COMMIT_HASH}/images/[name][ext][query]` + filename: 'images/[name][ext][query]' } }, { @@ -231,9 +231,9 @@ module.exports = (env, argv) => ({ }), new CopyWebpackPlugin({ patterns: [ - { from: 'favicons', to: `${COMMIT_HASH}/favicons` }, - { from: 'images', to: `${COMMIT_HASH}/images` }, - { from: 'screenshots/*.webp', to: `${COMMIT_HASH}` }, + { from: 'favicons', to: 'favicons' }, + { from: 'images', to: 'images' }, + { from: 'screenshots/*.webp', to: './' }, ] }), new MiniCssExtractPlugin({ @@ -243,8 +243,8 @@ module.exports = (env, argv) => ({ template: './src/index.html', inject: false, scriptLoading: 'blocking', - faviconsPath: `${COMMIT_HASH}/favicons`, - imagesPath: `${COMMIT_HASH}/images`, + faviconsPath: 'favicons', + imagesPath: '$images', }), new WebpackPwaManifest({ name: 'Stremio Web', @@ -261,33 +261,33 @@ module.exports = (env, argv) => ({ icons: [ { src: 'images/icon.png', - destination: `${COMMIT_HASH}/icons`, + destination: 'icons', sizes: [196, 512], purpose: 'any' }, { src: 'images/maskable_icon.png', - destination: `${COMMIT_HASH}/maskable_icons`, + destination: 'maskable_icons', sizes: [196, 512], purpose: 'maskable', ios: true }, { src: 'favicons/favicon.ico', - destination: `${COMMIT_HASH}/favicons`, + destination: 'favicons', sizes: [256], } ], screenshots : [ { - src: `${COMMIT_HASH}/screenshots/board_wide.webp`, + src: 'screenshots/board_wide.webp', sizes: '1440x900', type: 'image/webp', form_factor: 'wide', label: 'Homescreen of Stremio' }, { - src: `${COMMIT_HASH}/screenshots/board_narrow.webp`, + src: 'screenshots/board_narrow.webp', sizes: '414x896', type: 'image/webp', form_factor: 'narrow', From 33d80722e559c88b4d3ebbda91618b3852d3c1a9 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 29 Jan 2025 19:13:45 +0100 Subject: [PATCH 35/47] fix(ColorInput): ModalDialog import --- src/components/ColorInput/ColorInput.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ColorInput/ColorInput.js b/src/components/ColorInput/ColorInput.js index 88e9189ef..afa411f63 100644 --- a/src/components/ColorInput/ColorInput.js +++ b/src/components/ColorInput/ColorInput.js @@ -5,7 +5,8 @@ const PropTypes = require('prop-types'); const classnames = require('classnames'); const AColorPicker = require('a-color-picker'); const { useTranslation } = require('react-i18next'); -const { Button, ModalDialog } = require('stremio/components'); +const { Button } = require('stremio/components'); +const ModalDialog = require('stremio/components/ModalDialog'); const useBinaryState = require('stremio/common/useBinaryState'); const ColorPicker = require('./ColorPicker'); const styles = require('./styles'); From 7b8078421856cd5fe021469ec4831cd651b86206 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 29 Jan 2025 23:56:48 +0100 Subject: [PATCH 36/47] feat: implement shell updater banner --- src/App/App.js | 2 + src/App/UpdaterBanner/UpdaterBanner.less | 39 +++++++++++++++++++ src/App/UpdaterBanner/UpdaterBanner.tsx | 49 ++++++++++++++++++++++++ src/App/UpdaterBanner/index.ts | 2 + src/App/styles.less | 8 ++++ src/common/animations.less | 13 +++++++ 6 files changed, 113 insertions(+) create mode 100644 src/App/UpdaterBanner/UpdaterBanner.less create mode 100644 src/App/UpdaterBanner/UpdaterBanner.tsx create mode 100644 src/App/UpdaterBanner/index.ts diff --git a/src/App/App.js b/src/App/App.js index 730e75f28..999da04a7 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -10,6 +10,7 @@ const { PlatformProvider, ToastProvider, TooltipProvider, CONSTANTS, withCoreSus const ServicesToaster = require('./ServicesToaster'); const DeepLinkHandler = require('./DeepLinkHandler'); const SearchParamsHandler = require('./SearchParamsHandler'); +const { default: UpdaterBanner } = require('./UpdaterBanner'); const ErrorDialog = require('./ErrorDialog'); const withProtectedRoutes = require('./withProtectedRoutes'); const routerViewsConfig = require('./routerViewsConfig'); @@ -168,6 +169,7 @@ const App = () => { + { + const { shell } = useServices(); + const [visible, show, hide] = useBinaryState(false); + + const onInstallClick = () => { + shell.transport && shell.transport.send('autoupdater-notif-clicked'); + }; + + useEffect(() => { + shell.on('autoupdater-show-notif', show); + + return () => { + shell.off('autoupdater-show-notif', show); + }; + }); + + return ( +
+ +
+
+ A new version of Stremio is available +
+
+ + +
+
+
+
+ ); +}; + +export default UpdaterBanner; diff --git a/src/App/UpdaterBanner/index.ts b/src/App/UpdaterBanner/index.ts new file mode 100644 index 000000000..e4306ecb2 --- /dev/null +++ b/src/App/UpdaterBanner/index.ts @@ -0,0 +1,2 @@ +import UpdaterBanner from './UpdaterBanner'; +export default UpdaterBanner; diff --git a/src/App/styles.less b/src/App/styles.less index a413ed163..e2eed685a 100644 --- a/src/App/styles.less +++ b/src/App/styles.less @@ -208,6 +208,14 @@ html { } } + .updater-banner-container { + z-index: 1; + position: absolute; + left: 0; + right: 0; + bottom: 0; + } + .router { width: 100%; height: 100%; diff --git a/src/common/animations.less b/src/common/animations.less index c7a30d2fb..91dbe386d 100644 --- a/src/common/animations.less +++ b/src/common/animations.less @@ -69,6 +69,19 @@ transform: translateX(100%); } +.slide-up-enter { + transform: translateY(100%); +} + +.slide-up-active { + transform: translateY(0%); + transition: transform 0.3s cubic-bezier(0.32, 0, 0.67, 0); +} + +.slide-up-exit { + transform: translateY(100%); +} + @keyframes fade-in-no-motion { 0% { opacity: 0; From e5882ea143359d53f5af44c07b98070eb4d23c88 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 30 Jan 2025 11:10:45 +0100 Subject: [PATCH 37/47] refactor(App): update updater banner style --- src/App/UpdaterBanner/UpdaterBanner.less | 49 ++++++++++++++---------- src/App/UpdaterBanner/UpdaterBanner.tsx | 16 ++++---- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/src/App/UpdaterBanner/UpdaterBanner.less b/src/App/UpdaterBanner/UpdaterBanner.less index 83956ef50..9928fb493 100644 --- a/src/App/UpdaterBanner/UpdaterBanner.less +++ b/src/App/UpdaterBanner/UpdaterBanner.less @@ -2,38 +2,45 @@ height: 4rem; display: flex; align-items: center; - justify-content: space-between; + justify-content: center; + gap: 1rem; padding: 0 1rem; font-size: 1rem; font-weight: bold; color: var(--primary-foreground-color); background-color: var(--primary-accent-color); - .buttons { + .button { display: flex; flex-direction: row; - gap: 0.75rem; + align-items: center; + justify-content: center; + height: 2.5rem; + padding: 0 1rem; + border-radius: var(--border-radius); + color: var(--primary-background-color); + background-color: var(--primary-foreground-color); + transition: all 0.1s ease-out; - .button { - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - height: 2.75rem; - padding: 0 1rem; - border-radius: var(--border-radius); - transition: all 0.1s ease-out; + &:hover { + color: var(--primary-foreground-color); + background-color: transparent; + box-shadow: inset 0 0 0 0.15rem var(--primary-foreground-color); + } + } - &.suggested { - color: var(--primary-background-color); - background-color: var(--primary-foreground-color); - } + .close { + position: absolute; + right: 0; + height: 4rem; + width: 4rem; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; - &:hover { - color: var(--primary-foreground-color); - background-color: transparent; - box-shadow: inset 0 0 0 0.15rem var(--primary-foreground-color); - } + .icon { + height: 2rem; } } } \ No newline at end of file diff --git a/src/App/UpdaterBanner/UpdaterBanner.tsx b/src/App/UpdaterBanner/UpdaterBanner.tsx index bf18077a8..a6b48066d 100644 --- a/src/App/UpdaterBanner/UpdaterBanner.tsx +++ b/src/App/UpdaterBanner/UpdaterBanner.tsx @@ -1,9 +1,9 @@ import React, { useEffect } from 'react'; +import Icon from '@stremio/stremio-icons/react'; import { useServices } from 'stremio/services'; import { useBinaryState } from 'stremio/common'; import { Button, Transition } from 'stremio/components'; import styles from './UpdaterBanner.less'; -import classNames from 'classnames'; type Props = { className: string, @@ -32,14 +32,12 @@ const UpdaterBanner = ({ className }: Props) => {
A new version of Stremio is available
-
- - -
+ +
From 77e283d9344b5242b54d58fec2a70df50d918ec2 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 30 Jan 2025 14:57:37 +0100 Subject: [PATCH 38/47] refactor: use useShell hook for UpdaterBanner --- src/App/UpdaterBanner/UpdaterBanner.tsx | 9 +++++---- src/common/Platform/Platform.tsx | 2 +- src/common/index.js | 2 ++ src/common/{Platform => }/useShell.ts | 0 4 files changed, 8 insertions(+), 5 deletions(-) rename src/common/{Platform => }/useShell.ts (100%) diff --git a/src/App/UpdaterBanner/UpdaterBanner.tsx b/src/App/UpdaterBanner/UpdaterBanner.tsx index a6b48066d..cf80c198a 100644 --- a/src/App/UpdaterBanner/UpdaterBanner.tsx +++ b/src/App/UpdaterBanner/UpdaterBanner.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from 'react'; import Icon from '@stremio/stremio-icons/react'; import { useServices } from 'stremio/services'; -import { useBinaryState } from 'stremio/common'; +import { useBinaryState, useShell } from 'stremio/common'; import { Button, Transition } from 'stremio/components'; import styles from './UpdaterBanner.less'; @@ -11,17 +11,18 @@ type Props = { const UpdaterBanner = ({ className }: Props) => { const { shell } = useServices(); + const shellTransport = useShell(); const [visible, show, hide] = useBinaryState(false); const onInstallClick = () => { - shell.transport && shell.transport.send('autoupdater-notif-clicked'); + shellTransport.send('autoupdater-notif-clicked'); }; useEffect(() => { - shell.on('autoupdater-show-notif', show); + shell.transport && shell.transport.on('autoupdater-show-notif', show); return () => { - shell.off('autoupdater-show-notif', show); + shell.transport && shell.transport.off('autoupdater-show-notif', show); }; }); diff --git a/src/common/Platform/Platform.tsx b/src/common/Platform/Platform.tsx index 41e74b24f..375fe5e18 100644 --- a/src/common/Platform/Platform.tsx +++ b/src/common/Platform/Platform.tsx @@ -1,6 +1,6 @@ import React, { createContext, useContext } from 'react'; import { WHITELISTED_HOSTS } from 'stremio/common/CONSTANTS'; -import useShell from './useShell'; +import { useShell } from 'stremio/common'; import { name, isMobile } from './device'; interface PlatformContext { diff --git a/src/common/index.js b/src/common/index.js index 4c514dfbe..61d2a3933 100644 --- a/src/common/index.js +++ b/src/common/index.js @@ -19,6 +19,7 @@ const useModelState = require('./useModelState'); const useNotifications = require('./useNotifications'); const useOnScrollToBottom = require('./useOnScrollToBottom'); const useProfile = require('./useProfile'); +const { default: useShell } = require('./useShell'); const useStreamingServer = require('./useStreamingServer'); const useTorrent = require('./useTorrent'); const useTranslate = require('./useTranslate'); @@ -47,6 +48,7 @@ module.exports = { useNotifications, useOnScrollToBottom, useProfile, + useShell, useStreamingServer, useTorrent, useTranslate, diff --git a/src/common/Platform/useShell.ts b/src/common/useShell.ts similarity index 100% rename from src/common/Platform/useShell.ts rename to src/common/useShell.ts From e2b9114ecef90c5ae561f2163272c4b94fdcec71 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 30 Jan 2025 17:01:28 +0100 Subject: [PATCH 39/47] fix(Platform): import issue --- src/common/Platform/Platform.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Platform/Platform.tsx b/src/common/Platform/Platform.tsx index 375fe5e18..2212303e4 100644 --- a/src/common/Platform/Platform.tsx +++ b/src/common/Platform/Platform.tsx @@ -1,6 +1,6 @@ import React, { createContext, useContext } from 'react'; import { WHITELISTED_HOSTS } from 'stremio/common/CONSTANTS'; -import { useShell } from 'stremio/common'; +import useShell from 'stremio/common/useShell'; import { name, isMobile } from './device'; interface PlatformContext { From a95f07f19d3652ce18eea8ffaa1c98bed53cc1f7 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 30 Jan 2025 17:02:24 +0100 Subject: [PATCH 40/47] fix(UpdateBanner): missing useEffect deps array --- src/App/UpdaterBanner/UpdaterBanner.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/UpdaterBanner/UpdaterBanner.tsx b/src/App/UpdaterBanner/UpdaterBanner.tsx index cf80c198a..b3135a6c3 100644 --- a/src/App/UpdaterBanner/UpdaterBanner.tsx +++ b/src/App/UpdaterBanner/UpdaterBanner.tsx @@ -24,7 +24,7 @@ const UpdaterBanner = ({ className }: Props) => { return () => { shell.transport && shell.transport.off('autoupdater-show-notif', show); }; - }); + }, []); return (
From 74682ddb6f279e599ac82a9f79a0011d694b3a7d Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 31 Jan 2025 10:02:06 +0100 Subject: [PATCH 41/47] build: typo in HtmlWebPackPlugin imagesPath --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 751c5cbb6..36f6b6e50 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -244,7 +244,7 @@ module.exports = (env, argv) => ({ inject: false, scriptLoading: 'blocking', faviconsPath: 'favicons', - imagesPath: '$images', + imagesPath: 'images', }), new WebpackPwaManifest({ name: 'Stremio Web', From 05486a35bf41b74318344cf791ded0264dd6a1db Mon Sep 17 00:00:00 2001 From: Ivelin Megdanov Date: Tue, 4 Feb 2025 16:05:12 +0200 Subject: [PATCH 42/47] Add preview for truncated stream names --- .../MetaDetails/StreamsList/Stream/Stream.js | 5 +++++ .../StreamsList/Stream/styles.less | 22 +++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/routes/MetaDetails/StreamsList/Stream/Stream.js b/src/routes/MetaDetails/StreamsList/Stream/Stream.js index 768b8d40a..41f81b386 100644 --- a/src/routes/MetaDetails/StreamsList/Stream/Stream.js +++ b/src/routes/MetaDetails/StreamsList/Stream/Stream.js @@ -181,12 +181,17 @@ const Stream = ({ className, videoId, videoReleased, addonName, name, descriptio const renderMenu = React.useMemo(() => function renderMenu() { return (
+
+ {description} +
{ streamLink && } diff --git a/src/routes/MetaDetails/StreamsList/Stream/styles.less b/src/routes/MetaDetails/StreamsList/Stream/styles.less index 0461c77ee..06720a879 100644 --- a/src/routes/MetaDetails/StreamsList/Stream/styles.less +++ b/src/routes/MetaDetails/StreamsList/Stream/styles.less @@ -111,12 +111,29 @@ background-color: var(--secondary-accent-color); } + .menu-icon { + flex: none; + width: 1.7rem; + height: 1.7rem; + margin-right: 1rem; + color: var(--color-placeholder); + } + .context-menu-container { max-width: calc(90% - 1.5rem); z-index: 2; .context-menu-content { --spatial-navigation-contain: contain; + + .context-menu-title { + font-size: 0.9rem; + padding: 1rem 1.5rem; + font-weight: 100; + border-bottom: 1px solid var(--color-placeholder); + color: var(--primary-foreground-color); + white-space: break-spaces; + } .context-menu-option-container { display: flex; @@ -131,8 +148,9 @@ .context-menu-option-label { font-size: 1rem; - font-weight: 500; - color:var(--primary-foreground-color); + font-weight: 300; + color: var(--primary-foreground-color); + text-transform: capitalize; } } } From a68f7ddd53dfe1777575c21ab2acea643813a8f6 Mon Sep 17 00:00:00 2001 From: Alexandru Branza Date: Wed, 5 Feb 2025 16:49:31 +0200 Subject: [PATCH 43/47] Bump stremio-video --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4477c0b4f..d0c7ad763 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@stremio/stremio-colors": "5.2.0", "@stremio/stremio-core-web": "0.48.5", "@stremio/stremio-icons": "5.4.1", - "@stremio/stremio-video": "0.0.48", + "@stremio/stremio-video": "0.0.52", "a-color-picker": "1.2.1", "bowser": "2.11.0", "buffer": "6.0.3", @@ -3409,9 +3409,9 @@ ] }, "node_modules/@stremio/stremio-video": { - "version": "0.0.48", - "resolved": "https://registry.npmjs.org/@stremio/stremio-video/-/stremio-video-0.0.48.tgz", - "integrity": "sha512-6ALGXCZC4NPsfhPcrwFWQzvH6UMMRsgSkHetnOhv9WmZ5ubiyUdbBzj9atGiGuuQz8pRcze66ztrub+dsaQbpw==", + "version": "0.0.52", + "resolved": "https://registry.npmjs.org/@stremio/stremio-video/-/stremio-video-0.0.52.tgz", + "integrity": "sha512-OlHC8FIvYEyGXcNAM4W044Dqx6CmGb5BV3fDU361SyUjO9gKXXUWdL7LwmwHeWFeuy2sK1MEg4AT2JPptvJ0rg==", "license": "MIT", "dependencies": { "buffer": "6.0.3", diff --git a/package.json b/package.json index 9587f9530..e80305bc9 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@stremio/stremio-colors": "5.2.0", "@stremio/stremio-core-web": "0.48.5", "@stremio/stremio-icons": "5.4.1", - "@stremio/stremio-video": "0.0.48", + "@stremio/stremio-video": "0.0.52", "a-color-picker": "1.2.1", "bowser": "2.11.0", "buffer": "6.0.3", From 4081396ae086036457a84dcb55d3132554cf9626 Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Thu, 6 Feb 2025 12:16:29 +0200 Subject: [PATCH 44/47] feat: Player - Volume slider - on muted show 0 volume Signed-off-by: Lachezar Lechev --- src/routes/Player/ControlBar/ControlBar.js | 1 + .../Player/ControlBar/VolumeSlider/VolumeSlider.js | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/routes/Player/ControlBar/ControlBar.js b/src/routes/Player/ControlBar/ControlBar.js index 0fa6de1a4..745e2bd49 100644 --- a/src/routes/Player/ControlBar/ControlBar.js +++ b/src/routes/Player/ControlBar/ControlBar.js @@ -138,6 +138,7 @@ const ControlBar = ({
diff --git a/src/routes/Player/ControlBar/VolumeSlider/VolumeSlider.js b/src/routes/Player/ControlBar/VolumeSlider/VolumeSlider.js index 420f4ba41..a65ebfe9c 100644 --- a/src/routes/Player/ControlBar/VolumeSlider/VolumeSlider.js +++ b/src/routes/Player/ControlBar/VolumeSlider/VolumeSlider.js @@ -8,7 +8,7 @@ const { useRouteFocused } = require('stremio-router'); const { Slider } = require('stremio/components'); const styles = require('./styles'); -const VolumeSlider = ({ className, volume, onVolumeChangeRequested }) => { +const VolumeSlider = ({ className, volume, onVolumeChangeRequested, muted }) => { const disabled = volume === null || isNaN(volume); const routeFocused = useRouteFocused(); const [slidingVolume, setSlidingVolume] = React.useState(null); @@ -45,7 +45,9 @@ const VolumeSlider = ({ className, volume, onVolumeChangeRequested }) => { className={classnames(className, styles['volume-slider'], { 'active': slidingVolume !== null })} value={ !disabled ? - slidingVolume !== null ? slidingVolume : volume + !muted ? + slidingVolume !== null ? slidingVolume : volume + : 0 : 100 } @@ -61,7 +63,8 @@ const VolumeSlider = ({ className, volume, onVolumeChangeRequested }) => { VolumeSlider.propTypes = { className: PropTypes.string, volume: PropTypes.number, - onVolumeChangeRequested: PropTypes.func + onVolumeChangeRequested: PropTypes.func, + muted: PropTypes.bool, }; module.exports = VolumeSlider; From 6605eafd7896307d38cce74a5383a10d69470874 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 7 Feb 2025 12:04:40 +0100 Subject: [PATCH 45/47] chore: update stremio-translations --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4477c0b4f..7317cea49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "react-i18next": "^15.1.3", "react-is": "18.3.1", "spatial-navigation-polyfill": "github:Stremio/spatial-navigation#64871b1422466f5f45d24ebc8bbd315b2ebab6a6", - "stremio-translations": "github:Stremio/stremio-translations#a0f50634202f748a57907b645d2cd92fbaa479dd", + "stremio-translations": "github:Stremio/stremio-translations#afda3a5a52e3b91b39ed6e61a2849d8e6887641f", "url": "0.11.4", "use-long-press": "^3.2.0" }, @@ -13374,8 +13374,8 @@ }, "node_modules/stremio-translations": { "version": "1.44.9", - "resolved": "git+ssh://git@github.com/Stremio/stremio-translations.git#a0f50634202f748a57907b645d2cd92fbaa479dd", - "integrity": "sha512-JJpd1JJet3T6/VTNdZ2NZ7uvHJ4zkuyqo5BnTcDGqLVNO/OpicGqKhZjE4WGSgmuhsfPBU8T0ICCfzKu2xpvKg==", + "resolved": "git+ssh://git@github.com/Stremio/stremio-translations.git#afda3a5a52e3b91b39ed6e61a2849d8e6887641f", + "integrity": "sha512-uAWlQsiObblYeLUf/cATCecqNS3Md34pGgeCcH2HBjZI6drSD6DEVYHd4Sxjmv+vmjnngQyHWr6ThHP27mWc4Q==", "license": "MIT" }, "node_modules/string_decoder": { diff --git a/package.json b/package.json index 9587f9530..001eec76c 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "react-i18next": "^15.1.3", "react-is": "18.3.1", "spatial-navigation-polyfill": "github:Stremio/spatial-navigation#64871b1422466f5f45d24ebc8bbd315b2ebab6a6", - "stremio-translations": "github:Stremio/stremio-translations#a0f50634202f748a57907b645d2cd92fbaa479dd", + "stremio-translations": "github:Stremio/stremio-translations#afda3a5a52e3b91b39ed6e61a2849d8e6887641f", "url": "0.11.4", "use-long-press": "^3.2.0" }, From 6ba966d306e3d9c1471ca12ed7bb5a181af9758b Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 7 Feb 2025 12:05:31 +0100 Subject: [PATCH 46/47] refactor(UpdaterBanner): add translation strings --- src/App/UpdaterBanner/UpdaterBanner.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App/UpdaterBanner/UpdaterBanner.tsx b/src/App/UpdaterBanner/UpdaterBanner.tsx index cf80c198a..3c1a16ab9 100644 --- a/src/App/UpdaterBanner/UpdaterBanner.tsx +++ b/src/App/UpdaterBanner/UpdaterBanner.tsx @@ -1,5 +1,6 @@ import React, { useEffect } from 'react'; import Icon from '@stremio/stremio-icons/react'; +import { useTranslation } from 'react-i18next'; import { useServices } from 'stremio/services'; import { useBinaryState, useShell } from 'stremio/common'; import { Button, Transition } from 'stremio/components'; @@ -10,6 +11,7 @@ type Props = { }; const UpdaterBanner = ({ className }: Props) => { + const { t } = useTranslation(); const { shell } = useServices(); const shellTransport = useShell(); const [visible, show, hide] = useBinaryState(false); @@ -31,10 +33,10 @@ const UpdaterBanner = ({ className }: Props) => {
- A new version of Stremio is available + { t('UPDATER_TITLE') }