diff --git a/litelist-app/src/router/index.ts b/litelist-app/src/router/index.ts
index 9959f63..d6a9c9d 100644
--- a/litelist-app/src/router/index.ts
+++ b/litelist-app/src/router/index.ts
@@ -4,6 +4,7 @@ import ListsView from "@/views/ListsView.vue";
import {useAuthStore} from "@/stores/auth";
import SingleListView from "@/views/SingleListView.vue";
import AdminView from "@/views/AdminView.vue";
+import PrintableListView from "@/views/PrintableListView.vue";
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
@@ -33,6 +34,10 @@ const router = createRouter({
path: "/lists/:id",
component: SingleListView
},
+ {
+ path: "/lists/:id/print",
+ component: PrintableListView
+ },
{
path: "/admin",
component: AdminView
diff --git a/litelist-app/src/stores/auth.ts b/litelist-app/src/stores/auth.ts
index b6a607e..27c322c 100644
--- a/litelist-app/src/stores/auth.ts
+++ b/litelist-app/src/stores/auth.ts
@@ -21,7 +21,7 @@ export const useAuthStore = defineStore("auth", () => {
token.value = newToken
localStorage.setItem(LOCAL_STORAGE_KEY, token.value)
tokenRefreshInterval.value = setInterval(tryRefreshToken, 60000)
- await router.push("/lists")
+ // await router.push("/lists")
}
async function logOut() {
diff --git a/litelist-app/src/views/LoginView.vue b/litelist-app/src/views/LoginView.vue
index c882c72..1534a0c 100644
--- a/litelist-app/src/views/LoginView.vue
+++ b/litelist-app/src/views/LoginView.vue
@@ -29,6 +29,7 @@ async function doLogin() {
try {
const info = await login(loginModel.value.username, loginModel.value.password)
await authStore.logIn(info.token, info.user)
+ await router.push("/lists")
} catch (error: any) {
console.error(error.message)
}
@@ -45,6 +46,7 @@ async function doRegister() {
await register(registerModel.value.username, registerModel.value.email, registerModel.value.password)
const info = await login(registerModel.value.username, registerModel.value.password)
await authStore.logIn(info.token, info.user)
+ await router.push("/lists")
} catch (error: any) {
console.error(error)
}
diff --git a/litelist-app/src/views/PrintableListView.vue b/litelist-app/src/views/PrintableListView.vue
new file mode 100644
index 0000000..59075a8
--- /dev/null
+++ b/litelist-app/src/views/PrintableListView.vue
@@ -0,0 +1,56 @@
+
+
+
+
+
${l.description}
` - let checkboxList = `