Skip to content

Commit

Permalink
Add web server port to settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
egbertbouman committed Aug 12, 2024
1 parent 8f8e8b7 commit 183819a
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/tribler/ui/public/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,6 @@
"Socks5": "Socks5",
"Socks5Auth": "Socks5 with authentication",
"HTTP": "HTTP",
"HTTPAuth": "HTTP with authentication"
"HTTPAuth": "HTTP with authentication",
"WebServerSettings": "Web server settings"
}
3 changes: 2 additions & 1 deletion src/tribler/ui/public/locales/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,6 @@
"Socks5": "Socks5",
"Socks5Auth": "Socks5 con autenticación",
"HTTP": "HTTP",
"HTTPAuth": "HTTP con autenticación"
"HTTPAuth": "HTTP con autenticación",
"WebServerSettings": "Configurações do servidor web"
}
3 changes: 2 additions & 1 deletion src/tribler/ui/public/locales/pt_BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,6 @@
"Socks5": "Socks5",
"Socks5Auth": "Socks5 com autenticação",
"HTTP": "HTTP",
"HTTPAuth": "HTTP com autenticação"
"HTTPAuth": "HTTP com autenticação",
"WebServerSettings": "Configurações do servidor web"
}
3 changes: 2 additions & 1 deletion src/tribler/ui/public/locales/ru_RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,6 @@
"Socks5": "Socks5",
"Socks5Auth": "Socks5 с аутентификацией",
"HTTP": "HTTP",
"HTTPAuth": "HTTP с аутентификацией"
"HTTPAuth": "HTTP с аутентификацией",
"WebServerSettings": "Настройки веб-сервера"
}
3 changes: 2 additions & 1 deletion src/tribler/ui/public/locales/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@
"Socks5": "Socks5",
"Socks5Auth": "带身份验证的 Socks5",
"HTTP": "HTTP",
"HTTPAuth": "带身份验证的 HTTP和"
"HTTPAuth": "带身份验证的 HTTP和",
"WebServerSettings": "网络服务器设置"
}
27 changes: 27 additions & 0 deletions src/tribler/ui/src/pages/Settings/General.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { triblerService } from "@/services/tribler.service";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import SaveButton from "./SaveButton";
import { Input } from "@/components/ui/input";


export default function General() {
Expand All @@ -18,6 +19,32 @@ export default function General() {

return (
<div className="px-6 w-full">
<div className="pt-5 py-2 font-semibold">{t('WebServerSettings')}</div>
<div className="py-2 flex items-center">
<Label htmlFor="http_port" className="whitespace-nowrap pr-5">
{t('Port')}
</Label>
<Input
id="http_port"
className="w-40"
type="number"
min="0"
max="65535"
value={settings?.api?.http_port}
onChange={(event) => {
if (settings) {
setSettings({
...settings,
api: {
...settings.api,
http_port: +event.target.value
}
});
}
}}
/>
</div>

<div className="pt-5 py-2 font-semibold">{t('DefaultDownloadSettings')}</div>
<div className="py-2 flex items-center">
<Label htmlFor="saveas" className="whitespace-nowrap pr-5">
Expand Down

0 comments on commit 183819a

Please sign in to comment.