Skip to content

Commit

Permalink
fix: [#581] update references to udpated index settings
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Jul 3, 2024
1 parent 661d6f7 commit ff7bbee
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
14 changes: 6 additions & 8 deletions composables/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { type TorrentResponse, TrackerMode, type PublicSettings } from "torrust-index-types-lib";
import { type TorrentResponse, type PublicSettings } from "torrust-index-types-lib";
import { useRestApi, useSettings, useUser } from "~/composables/states";

export function isTrackerOpen (): boolean {
const settings = useSettings();

return settings.value.tracker_mode === TrackerMode.Public ||
settings.value.tracker_mode === TrackerMode.Listed;
export function isTrackerPublic (): boolean {
return !isTrackerPrivate();
}

export function isTrackerClose (): boolean {
return !isTrackerOpen();
export function isTrackerPrivate (): boolean {
const settings = useSettings();
return settings.value.tracker_private === true;
}

export function isUserLoggedIn (): boolean {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"lint": "eslint --ext \".ts,.js,.vue\" . --max-warnings=0" ,
"lint": "eslint --ext \".ts,.js,.vue\" . --max-warnings=0",
"lintfix": "eslint --fix --ext \".ts,.js,.vue\" .",
"cypress:open": "cypress open",
"cypress:run": "cypress run"
Expand Down Expand Up @@ -42,7 +42,7 @@
"marked": "^12.0.2",
"notiwind-ts": "^2.0.2",
"torrust-index-api-lib": "^1.0.0-alpha.7",
"torrust-index-types-lib": "^3.0.0-alpha.1",
"torrust-index-types-lib": "^3.0.0-alpha.6",
"uuid": "^9.0.1"
}
}
}

0 comments on commit ff7bbee

Please sign in to comment.