Skip to content

Commit 8ef1229

Browse files
committed
Release: v1.0.8
1 parent 4b6333e commit 8ef1229

File tree

8 files changed

+12
-18
lines changed

8 files changed

+12
-18
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "libraryroombookingsystem",
33
"private": true,
4-
"version": "1.0.7",
4+
"version": "1.0.8",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -14,7 +14,6 @@
1414
"@sveltestrap/sveltestrap": "^6.2.7",
1515
"@tauri-apps/api": "^1.6.0",
1616
"bcryptjs": "^2.4.3",
17-
"js-cookie": "^3.0.5",
1817
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
1918
"tauri-plugin-sql-api": "github:tauri-apps/tauri-plugin-sql#v1"
2019
},

pnpm-lock.yaml

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

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "LibraryRoomBookingSystem"
3-
version = "1.0.7"
3+
version = "1.0.8"
44
description = "A Library Room Booking System built with Tauri and Rust"
55
authors = ["Lim Shi Song [email protected]"]
66
edition = "2021"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"package": {
99
"productName": "LibraryRoomBookingSystem",
10-
"version": "1.0.7"
10+
"version": "1.0.8"
1111
},
1212
"tauri": {
1313
"allowlist": {

src/lib/components/Navbar.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script>
22
import { theme } from "$lib/store.js";
3-
import Cookies from "js-cookie";
43
import {
54
Nav,
65
Navbar,
@@ -17,12 +16,13 @@
1716
} from "@sveltestrap/sveltestrap";
1817
import { user } from "$lib/store.js";
1918
import { goto } from "$app/navigation";
19+
import { removeItem } from "$lib/helper";
2020
2121
let isOpen = false;
2222
export let size = "md";
2323
2424
function logout() {
25-
Cookies.remove("token");
25+
removeItem("token");
2626
goto("/");
2727
}
2828

src/lib/helper.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ export function getItem(key) {
214214
return null;
215215
}
216216

217+
export function removeItem(key) {
218+
window.localStorage.removeItem(key);
219+
}
220+
217221
/**
218222
* @param {String} string
219223
* @param {String} email

src/routes/+error.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { page } from "$app/stores";
33
import { emoji } from "$lib/emoji.js";
44
import { Button } from "@sveltestrap/sveltestrap";
5-
import Cookies from "js-cookie";
5+
import { getItem } from "$lib/helper";
66
</script>
77

88
<main class="gap-2">
@@ -14,7 +14,7 @@
1414
{$page.error.message}
1515
</h2>
1616
<p>Sorry, something went wrong.</p>
17-
{#if Cookies.get("token")}
17+
{#if getItem("token")}
1818
<Button href="/home">Back to Home</Button>
1919
{:else}
2020
<Button href="/">Back to Login</Button>

0 commit comments

Comments
 (0)