From 61c5b503352c983d4e532b5a59e2ae913e53e70c Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 1 Feb 2025 11:55:53 +0200 Subject: feat: Add create list button and improve new list page UI --- controllers/list.php | 4 +++- views/list/new/index.php | 12 ++++++++++-- views/profile/index.php | 12 ++++++++++++ views/styles.css | 13 ++++++++++++- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/controllers/list.php b/controllers/list.php index 7bbb739..0561700 100644 --- a/controllers/list.php +++ b/controllers/list.php @@ -6,11 +6,13 @@ use Exception; function on_post() { global $TOKEN; global $list_status; + global $lid; $list_status = ""; + $lid = 0; try { $uid = Database\Cookie::fromDB($TOKEN)->UID; - Database\ArchiveList::create($uid, $_POST["name"], $_POST["description"]); + $lid = Database\ArchiveList::create($uid, $_POST["name"], $_POST["description"]); } catch(Exception $e) { $list_status = $e; diff --git a/views/list/new/index.php b/views/list/new/index.php index 72ac7a3..7f1aaf5 100644 --- a/views/list/new/index.php +++ b/views/list/new/index.php @@ -1,3 +1,7 @@ + - + diff --git a/views/profile/index.php b/views/profile/index.php index c1e067d..4ade4e7 100644 --- a/views/profile/index.php +++ b/views/profile/index.php @@ -15,6 +15,18 @@
+ + +