mirror of
https://github.com/idanoo/autobrr
synced 2025-07-25 09:49:13 +00:00
Feature: Tail live logs (#27)
* chore: add new yarn.lock * chore: add pkgs * feat: push events via server-sent-events * feat(web): tail live logs * fix: update irc network * fix: set baseurl * fix: headers
This commit is contained in:
parent
11fcf1ead9
commit
09eb0b1716
14 changed files with 213 additions and 26 deletions
|
@ -21,6 +21,18 @@ export function baseUrl() {
|
|||
return baseUrl
|
||||
}
|
||||
|
||||
// get sseBaseUrl for SSE
|
||||
export function sseBaseUrl() {
|
||||
let {origin} = window.location
|
||||
|
||||
let env = process.env.NODE_ENV
|
||||
if (env === "development") {
|
||||
return `http://localhost:8989/`
|
||||
}
|
||||
|
||||
return `${origin}${baseUrl()}`
|
||||
}
|
||||
|
||||
export function buildPath(...args: string[]): string {
|
||||
const [first] = args;
|
||||
const firstTrimmed = first.trim();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue