mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
Fix linebreak and url
This commit is contained in:
@@ -137,7 +137,9 @@ export const UsenetQueueList: FunctionComponent<UsenetQueueListProps> = ({ servi
|
||||
)}
|
||||
</td>
|
||||
<td style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Text mr="sm">{nzb.progress.toFixed(1)}%</Text>
|
||||
<Text mr="sm" style={{ whiteSpace: 'nowrap' }}>
|
||||
{nzb.progress.toFixed(1)}%
|
||||
</Text>
|
||||
<Progress
|
||||
radius="lg"
|
||||
color={nzb.eta > 0 ? theme.primaryColor : 'lightgrey'}
|
||||
|
||||
@@ -36,8 +36,9 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
if (!service.apiKey) {
|
||||
throw new Error(`API Key for service "${service.name}" is missing`);
|
||||
}
|
||||
const { origin } = new URL(service.url);
|
||||
|
||||
const history = await new Client(service.url, service.apiKey).history(offset, limit);
|
||||
const history = await new Client(origin, service.apiKey).history(offset, limit);
|
||||
|
||||
const items: UsenetHistoryItem[] = history.slots.map((slot) => ({
|
||||
id: slot.nzo_id,
|
||||
|
||||
@@ -36,7 +36,9 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
throw new Error(`API Key for service "${service.name}" is missing`);
|
||||
}
|
||||
|
||||
const queue = await new Client(service.url, service.apiKey).queue(0, -1);
|
||||
const { origin } = new URL(service.url);
|
||||
|
||||
const queue = await new Client(origin, service.apiKey).queue(0, -1);
|
||||
|
||||
const [hours, minutes, seconds] = queue.timeleft.split(':');
|
||||
const eta = dayjs.duration({
|
||||
|
||||
@@ -29,7 +29,9 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
||||
throw new Error(`API Key for service "${service.name}" is missing`);
|
||||
}
|
||||
|
||||
const result = await new Client(service.url, service.apiKey).queuePause();
|
||||
const { origin } = new URL(service.url);
|
||||
|
||||
const result = await new Client(origin, service.apiKey).queuePause();
|
||||
|
||||
return res.status(200).json(result);
|
||||
} catch (err) {
|
||||
|
||||
@@ -36,7 +36,9 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
if (!service.apiKey) {
|
||||
throw new Error(`API Key for service "${service.name}" is missing`);
|
||||
}
|
||||
const queue = await new Client(service.url, service.apiKey).queue(offset, limit);
|
||||
|
||||
const { origin } = new URL(service.url);
|
||||
const queue = await new Client(origin, service.apiKey).queue(offset, limit);
|
||||
|
||||
const items: UsenetQueueItem[] = queue.slots.map((slot) => {
|
||||
const [hours, minutes, seconds] = slot.timeleft.split(':');
|
||||
|
||||
Reference in New Issue
Block a user