Merge branch 'development' into feat/player-side-drawer

This commit is contained in:
Timothy Z. 2024-12-16 14:14:15 +02:00
commit dd53dcc4b3
9 changed files with 37 additions and 29 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "stremio", "name": "stremio",
"version": "5.0.0-beta.13", "version": "5.0.0-beta.14",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "stremio", "name": "stremio",
"version": "5.0.0-beta.13", "version": "5.0.0-beta.14",
"license": "gpl-2.0", "license": "gpl-2.0",
"dependencies": { "dependencies": {
"@babel/runtime": "7.26.0", "@babel/runtime": "7.26.0",

View file

@ -1,7 +1,7 @@
{ {
"name": "stremio", "name": "stremio",
"displayName": "Stremio", "displayName": "Stremio",
"version": "5.0.0-beta.13", "version": "5.0.0-beta.14",
"author": "Smart Code OOD", "author": "Smart Code OOD",
"private": true, "private": true,
"license": "gpl-2.0", "license": "gpl-2.0",

View file

@ -87,7 +87,13 @@
} }
} }
@media only screen and (min-width: @xsmall) { @media only screen and (min-width: @small) and (orientation: portait) {
.bottom-sheet {
display: none;
}
}
@media only screen and (min-width: @xsmall) and (orientation: landscape) {
.bottom-sheet { .bottom-sheet {
display: none; display: none;
} }

View file

@ -6,6 +6,7 @@
outline-width: var(--focus-outline-size); outline-width: var(--focus-outline-size);
outline-color: @color-surface-light5; outline-color: @color-surface-light5;
outline-offset: calc(-1 * var(--focus-outline-size)); outline-offset: calc(-1 * var(--focus-outline-size));
-webkit-tap-highlight-color: transparent;
cursor: pointer; cursor: pointer;
&:focus { &:focus {

View file

@ -17,7 +17,6 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0 0.5rem; padding: 0 0.5rem;
border: thin solid @color-surface-light5-20;
pointer-events: none; pointer-events: none;
.transparent-label { .transparent-label {

View file

@ -24,6 +24,7 @@
outline-width: var(--focus-outline-size); outline-width: var(--focus-outline-size);
outline-color: @color-surface-light5; outline-color: @color-surface-light5;
outline-offset: calc(-1 * var(--focus-outline-size)); outline-offset: calc(-1 * var(--focus-outline-size));
-webkit-tap-highlight-color: transparent;
input[type='radio'] { input[type='radio'] {
opacity: 0; opacity: 0;

View file

@ -1,32 +1,25 @@
// Copyright (C) 2017-2024 Smart code 203358507 // Copyright (C) 2017-2024 Smart code 203358507
import React from 'react'; import React, { forwardRef, useCallback } from 'react';
import { type KeyboardEvent, type InputHTMLAttributes } from 'react';
import classnames from 'classnames'; import classnames from 'classnames';
import styles from './styles.less'; import styles from './styles.less';
type Props = React.InputHTMLAttributes<HTMLInputElement> & { type Props = InputHTMLAttributes<HTMLInputElement> & {
className?: string; className?: string;
disabled?: boolean; disabled?: boolean;
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void; onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
onSubmit?: (event: React.KeyboardEvent<HTMLInputElement>) => void; onSubmit?: (event: KeyboardEvent<HTMLInputElement>) => void;
}; };
const TextInput = React.forwardRef<HTMLInputElement, Props>((props, ref) => { const TextInput = forwardRef<HTMLInputElement, Props>((props, ref) => {
const { onSubmit, className, disabled, ...rest } = props; const onKeyDown = useCallback((event: KeyboardEvent<HTMLInputElement>) => {
props.onKeyDown && props.onKeyDown(event);
const onKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => { if (event.key === 'Enter' ) {
if (typeof props.onKeyDown === 'function') { props.onSubmit && props.onSubmit(event);
props.onKeyDown(event);
} }
}, [props.onKeyDown, props.onSubmit]);
if (
event.key === 'Enter' &&
!(event.nativeEvent as any).submitPrevented &&
typeof onSubmit === 'function'
) {
onSubmit(event);
}
}, [props.onKeyDown, onSubmit]);
return ( return (
<input <input
@ -36,10 +29,10 @@ const TextInput = React.forwardRef<HTMLInputElement, Props>((props, ref) => {
autoComplete={'off'} autoComplete={'off'}
spellCheck={false} spellCheck={false}
tabIndex={0} tabIndex={0}
{...props}
ref={ref} ref={ref}
className={classnames(className, styles['text-input'], { disabled })} className={classnames(props.className, styles['text-input'], { 'disabled': props.disabled })}
onKeyDown={onKeyDown} onKeyDown={onKeyDown}
{...rest}
/> />
); );
}); });

View file

@ -128,8 +128,10 @@
border-color: var(--primary-foreground-color); border-color: var(--primary-foreground-color);
} }
&:not(.active):hover { @media (pointer: fine) {
border-color: var(--overlay-color); &:not(.active):hover {
border-color: var(--overlay-color);
}
} }
} }

View file

@ -286,7 +286,6 @@
} }
.multiselect-menu-container { .multiselect-menu-container {
max-height: calc(3.2rem * 7);
overflow: auto; overflow: auto;
} }
} }
@ -316,7 +315,14 @@
} }
&.color-input-container { &.color-input-container {
padding: 1.75rem 1rem; padding: 1.3rem 1rem;
border-radius: 3rem;
border: 2px solid transparent;
transition: 0.3s all ease-in-out;
&:hover {
border-color: var(--overlay-color);
}
} }
&.info-container { &.info-container {