mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-05-05 02:29:03 +00:00
useProfileSettingsInputs uses camel case for core prop names
This commit is contained in:
parent
f44c2fe0af
commit
bd8a6e75e8
1 changed files with 23 additions and 23 deletions
|
|
@ -10,7 +10,7 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
value: code,
|
value: code,
|
||||||
label: languageNames[code]
|
label: languageNames[code]
|
||||||
})),
|
})),
|
||||||
selected: [profile.settings.interface_language],
|
selected: [profile.settings.interfaceLanguage],
|
||||||
onSelect: (event) => {
|
onSelect: (event) => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'Ctx',
|
action: 'Ctx',
|
||||||
|
|
@ -18,7 +18,7 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
interface_language: event.value
|
interfaceLanguage: event.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -29,7 +29,7 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
value: code,
|
value: code,
|
||||||
label: languageNames[code]
|
label: languageNames[code]
|
||||||
})),
|
})),
|
||||||
selected: [profile.settings.subtitles_language],
|
selected: [profile.settings.subtitlesLanguage],
|
||||||
onSelect: (event) => {
|
onSelect: (event) => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'Ctx',
|
action: 'Ctx',
|
||||||
|
|
@ -37,7 +37,7 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
subtitles_language: event.value
|
subtitlesLanguage: event.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -48,9 +48,9 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
value: `${size}`,
|
value: `${size}`,
|
||||||
label: `${size}%`
|
label: `${size}%`
|
||||||
})),
|
})),
|
||||||
selected: [`${profile.settings.subtitles_size}`],
|
selected: [`${profile.settings.subtitlesSize}`],
|
||||||
renderLabelText: () => {
|
renderLabelText: () => {
|
||||||
return `${profile.settings.subtitles_size}%`;
|
return `${profile.settings.subtitlesSize}%`;
|
||||||
},
|
},
|
||||||
onSelect: (event) => {
|
onSelect: (event) => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
|
|
@ -59,14 +59,14 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
subtitles_size: parseInt(event.value)
|
subtitlesSize: parseInt(event.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}), [profile.settings]);
|
}), [profile.settings]);
|
||||||
const subtitlesTextColorInput = useDeepEqualMemo(() => ({
|
const subtitlesTextColorInput = useDeepEqualMemo(() => ({
|
||||||
value: profile.settings.subtitles_text_color,
|
value: profile.settings.subtitlesTextColor,
|
||||||
onChange: (event) => {
|
onChange: (event) => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'Ctx',
|
action: 'Ctx',
|
||||||
|
|
@ -74,14 +74,14 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
subtitles_text_color: event.value
|
subtitlesTextColor: event.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}), [profile.settings]);
|
}), [profile.settings]);
|
||||||
const subtitlesBackgroundColorInput = useDeepEqualMemo(() => ({
|
const subtitlesBackgroundColorInput = useDeepEqualMemo(() => ({
|
||||||
value: profile.settings.subtitles_background_color,
|
value: profile.settings.subtitlesBackgroundColor,
|
||||||
onChange: (event) => {
|
onChange: (event) => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'Ctx',
|
action: 'Ctx',
|
||||||
|
|
@ -89,14 +89,14 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
subtitles_background_color: event.value
|
subtitlesBackgroundColor: event.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}), [profile.settings]);
|
}), [profile.settings]);
|
||||||
const subtitlesOutlineColorInput = useDeepEqualMemo(() => ({
|
const subtitlesOutlineColorInput = useDeepEqualMemo(() => ({
|
||||||
value: profile.settings.subtitles_outline_color,
|
value: profile.settings.subtitlesOutlineColor,
|
||||||
onChange: (event) => {
|
onChange: (event) => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'Ctx',
|
action: 'Ctx',
|
||||||
|
|
@ -104,14 +104,14 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
subtitles_outline_color: event.value
|
subtitlesOutlineColor: event.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}), [profile.settings]);
|
}), [profile.settings]);
|
||||||
const bingeWatchingCheckbox = useDeepEqualMemo(() => ({
|
const bingeWatchingCheckbox = useDeepEqualMemo(() => ({
|
||||||
checked: profile.settings.binge_watching,
|
checked: profile.settings.bingeWatching,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'Ctx',
|
action: 'Ctx',
|
||||||
|
|
@ -119,14 +119,14 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
binge_watching: !profile.settings.binge_watching
|
bingeWatching: !profile.settings.bingeWatching
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}), [profile.settings]);
|
}), [profile.settings]);
|
||||||
const playInBackgroundCheckbox = useDeepEqualMemo(() => ({
|
const playInBackgroundCheckbox = useDeepEqualMemo(() => ({
|
||||||
checked: profile.settings.play_in_background,
|
checked: profile.settings.playInBackground,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'Ctx',
|
action: 'Ctx',
|
||||||
|
|
@ -134,14 +134,14 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
play_in_background: !profile.settings.play_in_background
|
playInBackground: !profile.settings.playInBackground
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}), [profile.settings]);
|
}), [profile.settings]);
|
||||||
const playInExternalPlayerCheckbox = useDeepEqualMemo(() => ({
|
const playInExternalPlayerCheckbox = useDeepEqualMemo(() => ({
|
||||||
checked: profile.settings.play_in_external_player,
|
checked: profile.settings.playInExternalPlayer,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'Ctx',
|
action: 'Ctx',
|
||||||
|
|
@ -149,14 +149,14 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
play_in_external_player: !profile.settings.play_in_external_player
|
playInExternalPlayer: !profile.settings.playInExternalPlayer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}), [profile.settings]);
|
}), [profile.settings]);
|
||||||
const hardwareDecodingCheckbox = useDeepEqualMemo(() => ({
|
const hardwareDecodingCheckbox = useDeepEqualMemo(() => ({
|
||||||
checked: profile.settings.hardware_decoding,
|
checked: profile.settings.hardwareDecoding,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'Ctx',
|
action: 'Ctx',
|
||||||
|
|
@ -164,14 +164,14 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
hardware_decoding: !profile.settings.hardware_decoding
|
hardwareDecoding: !profile.settings.hardwareDecoding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}), [profile.settings]);
|
}), [profile.settings]);
|
||||||
const streamingServerUrlInput = useDeepEqualMemo(() => ({
|
const streamingServerUrlInput = useDeepEqualMemo(() => ({
|
||||||
value: profile.settings.streaming_server_url,
|
value: profile.settings.streamingServerUrl,
|
||||||
onChange: (value) => {
|
onChange: (value) => {
|
||||||
core.transport.dispatch({
|
core.transport.dispatch({
|
||||||
action: 'Ctx',
|
action: 'Ctx',
|
||||||
|
|
@ -179,7 +179,7 @@ const useProfileSettingsInputs = (profile) => {
|
||||||
action: 'UpdateSettings',
|
action: 'UpdateSettings',
|
||||||
args: {
|
args: {
|
||||||
...profile.settings,
|
...profile.settings,
|
||||||
streaming_server_url: value
|
streamingServerUrl: value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue