Skip to content

Commit 570c46e

Browse files
committed
chore(deps): update torrust-index-types-lib
1 parent 2f173fb commit 570c46e

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

components/navigation/NavigationBar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@
9696

9797
<script setup lang="ts">
9898
import { UserCircleIcon, Bars3Icon, MagnifyingGlassIcon } from "@heroicons/vue/24/solid";
99-
import { ChevronDownIcon } from "@heroicons/vue/20/solid";
10099
import { type Ref } from "vue";
100+
import { type PublicSettings } from "torrust-index-types-lib";
101101
import { ref, useSettings, useUser, logoutUser } from "#imports";
102102
103-
const settings = useSettings();
103+
const settings: PublicSettings = useSettings().value;
104104
const user = useUser();
105105
106106
const mobileCollapsed = ref(true);

components/registration/RegistrationForm.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@submit.prevent="submit"
1010
>
1111
<FormInputText v-model="form.username" label="Username" name="username" data-cy="registration-form-username" required />
12-
<template v-if="settings && settings.email_on_signup !== EmailOnSignup.None">
12+
<template v-if="settings && settings.email_on_signup !== EmailOnSignup.Ignored">
1313
<FormInputText
1414
v-model="form.email"
1515
type="email"
@@ -58,7 +58,7 @@
5858

5959
<script setup lang="ts">
6060
import { type Ref } from "vue";
61-
import { EmailOnSignup } from "torrust-index-types-lib";
61+
import { EmailOnSignup, type PublicSettings } from "torrust-index-types-lib";
6262
import { notify } from "notiwind-ts";
6363
import { ref, useRestApi, useSettings } from "#imports";
6464
@@ -72,7 +72,7 @@ type Form = {
7272
}
7373
7474
const rest = useRestApi();
75-
const settings = useSettings();
75+
const settings: PublicSettings = useSettings();
7676
7777
const form: Ref<Form> = ref({
7878
username: "",

components/user/ChangePasswordForm.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<script setup lang="ts">
5050
import { type Ref } from "vue";
5151
import { notify } from "notiwind-ts";
52-
import { ref, useRestApi, useSettings } from "#imports";
52+
import { ref, useRestApi } from "#imports";
5353
5454
const props = defineProps({
5555
username: {
@@ -67,7 +67,6 @@ type Form = {
6767
}
6868
6969
const rest = useRestApi();
70-
const settings = useSettings();
7170
7271
const form: Ref<Form> = ref({
7372
current_password: "",

composables/helpers.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
import { TorrentResponse, TrackerMode } from "torrust-index-types-lib";
1+
import { type TorrentResponse, TrackerMode, type PublicSettings } from "torrust-index-types-lib";
22
import { useRestApi, useSettings, useUser } from "~/composables/states";
33

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

7-
// todo: we are not using the type TrackerMode in
8-
// settings.value.tracker_mode.
9-
// Depends on: https://github.com/torrust/torrust-index-types-lib/issues/18
10-
11-
return settings.value.tracker_mode === "public" ||
12-
settings.value.tracker_mode === "listed";
7+
return settings.value.tracker_mode === TrackerMode.Public ||
8+
settings.value.tracker_mode === TrackerMode.Listed;
139
}
1410

1511
export function isTrackerClose (): boolean {

package-lock.json

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"marked": "^12.0.2",
4343
"notiwind-ts": "^2.0.2",
4444
"torrust-index-api-lib": "^1.0.0-alpha.7",
45-
"torrust-index-types-lib": "^1.0.0-alpha.5",
45+
"torrust-index-types-lib": "^3.0.0-alpha.1",
4646
"uuid": "^9.0.1"
4747
}
4848
}

pages/admin/settings.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ const tabs = [
4545
];
4646
4747
const rest = useRestApi();
48-
4948
const settings: Ref<Settings> = ref(null);
5049
5150
onMounted(() => {

0 commit comments

Comments
 (0)