cleanup and game UI beginnings

This commit is contained in:
DecDuck
2024-10-15 20:05:13 +11:00
parent b3963b60b5
commit 5ef6b8e528
17 changed files with 447 additions and 40 deletions

View File

@ -7,6 +7,7 @@ use std::{
use directories::BaseDirs;
use rustbreak::{deser::Bincode, PathDatabase};
use serde::Deserialize;
use url::Url;
use crate::DB;
@ -60,3 +61,8 @@ pub fn setup() -> DatabaseInterface {
pub fn is_set_up() -> bool {
return !DB.borrow_data().unwrap().base_url.is_empty();
}
pub fn fetch_base_url() -> Url {
let handle = DB.borrow_data().unwrap();
Url::parse(&handle.base_url).unwrap()
}