-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add partial settings for network-related configurations. - Make scrollbar thinner. - Filter args passed to aria2. - Add launch settings tab. - Add multiline text input. - Add slider-based number input.
- Loading branch information
Showing
6 changed files
with
138 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ html, body { | |
} | ||
|
||
::-webkit-scrollbar { | ||
width: 0.5rem; | ||
width: 0.4rem; | ||
} | ||
|
||
::-webkit-scrollbar-track { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Divider } from "@nextui-org/react"; | ||
import { MultilineTextEntry, NumberSliderEntry, OnOffEntry } from "@pages/settings/SettingsEntry"; | ||
import { useConfig } from "@pages/settings/use-config"; | ||
import { CodeIcon, MoveToBottomIcon, UnfoldIcon } from "@primer/octicons-react"; | ||
import React, { FC } from "react"; | ||
|
||
/** | ||
* Network configuration page. | ||
*/ | ||
export const NetworkTab: FC = () => { | ||
const [config, makeReduce] = useConfig(); | ||
|
||
if (!config) return; | ||
|
||
return <> | ||
<OnOffEntry | ||
icon={MoveToBottomIcon} | ||
id="aria2" | ||
value={config.net.downloader === "aria2"} | ||
onChange={makeReduce((c, isAria2) => c.net.downloader = isAria2 ? "aria2" : "nextdl")} | ||
/> | ||
|
||
<Divider/> | ||
|
||
{ | ||
config.net.downloader === "aria2" && | ||
<> | ||
<NumberSliderEntry | ||
icon={UnfoldIcon} | ||
id="aria2-concurrency" | ||
value={config.net.aria2.concurrency} | ||
max={32} | ||
min={1} | ||
onChange={makeReduce((c, a) => c.net.aria2.concurrency = a > 1 ? a : 1)} | ||
/> | ||
|
||
<Divider/> | ||
|
||
<MultilineTextEntry | ||
icon={CodeIcon} | ||
id="aria2-args" | ||
value={config.net.aria2.args} | ||
onChange={makeReduce((c, a) => c.net.aria2.args = a)} | ||
/> | ||
|
||
<Divider/> | ||
</> | ||
} | ||
|
||
<NumberSliderEntry | ||
icon={UnfoldIcon} | ||
id="nextdl-concurrency" | ||
value={config.net.next.concurrency} | ||
max={64} | ||
min={1} | ||
onChange={makeReduce((c, a) => c.net.next.concurrency = a > 1 ? a : 1)} | ||
/> | ||
</>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters