mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
refactor(Settings): add translation strings for remote endpoint
This commit is contained in:
parent
908e9d6830
commit
e4fd8b02af
2 changed files with 6 additions and 4 deletions
|
|
@ -126,7 +126,7 @@ const Settings = () => {
|
|||
navigator.clipboard.writeText(streamingServer.remoteUrl);
|
||||
toast.show({
|
||||
type: 'success',
|
||||
title: 'Successfully copied remote url to clipboard',
|
||||
title: t('SETTINGS_REMOTE_URL_COPIED'),
|
||||
timeout: 2500,
|
||||
});
|
||||
}
|
||||
|
|
@ -558,11 +558,11 @@ const Settings = () => {
|
|||
streamingServerRemoteUrlInput.value !== null ?
|
||||
<div className={styles['option-container']}>
|
||||
<div className={styles['option-name-container']}>
|
||||
<div className={styles['label']}>Remote url</div>
|
||||
<div className={styles['label']}>{t('SETTINGS_REMOTE_URL')}</div>
|
||||
</div>
|
||||
<div className={classnames(styles['option-input-container'], styles['configure-input-container'])}>
|
||||
<div className={styles['label']} title={streamingServerRemoteUrlInput.value}>{streamingServerRemoteUrlInput.value}</div>
|
||||
<Button className={styles['configure-button-container']} title={'Copy remote url'} onClick={onCopyRemoteUrlClick}>
|
||||
<Button className={styles['configure-button-container']} title={t('SETTINGS_COPY_REMOTE_URL')} onClick={onCopyRemoteUrlClick}>
|
||||
<Icon className={styles['icon']} name={'link'} />
|
||||
</Button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// Copyright (C) 2017-2023 Smart code 203358507
|
||||
|
||||
const React = require('react');
|
||||
const { useTranslation } = require('react-i18next');
|
||||
const isEqual = require('lodash.isequal');
|
||||
const { useServices } = require('stremio/services');
|
||||
|
||||
|
|
@ -53,6 +54,7 @@ const TORRENT_PROFILES = {
|
|||
|
||||
const useStreamingServerSettingsInputs = (streamingServer) => {
|
||||
const { core } = useServices();
|
||||
const { t } = useTranslation();
|
||||
// TODO combine those useMemo in one
|
||||
|
||||
const streamingServerRemoteUrlInput = React.useMemo(() => ({
|
||||
|
|
@ -67,7 +69,7 @@ const useStreamingServerSettingsInputs = (streamingServer) => {
|
|||
return {
|
||||
options: [
|
||||
{
|
||||
label: 'Disabled',
|
||||
label: t('SETTINGS_DISABLED'),
|
||||
value: null,
|
||||
},
|
||||
...streamingServer.networkInfo.content.availableInterfaces.map((address) => ({
|
||||
|
|
|
|||
Loading…
Reference in a new issue