Fixed bugs

Fixed some page rendering errors and updated gitignore
This commit is contained in:
saw 2021-07-15 00:59:35 -04:00
parent 1535e037ca
commit 1a3db7f676
5 changed files with 14 additions and 15 deletions

7
.gitignore vendored
View File

@ -1,9 +1,8 @@
/target
# old data directory
/boards
# new data directory, specified in default config file
# new data directory, specified in config gile
# NOTE: this config file does not yet exist
/data
Cargo.lock

View File

@ -79,7 +79,7 @@ pub async fn get_board(
"messages" => to_json(&a.messages),
"user" => match uid {
Ok(a) => to_json(data.user_manager.lock().unwrap().get_user_by_id(a.id)),
Err(_) => to_json("null")
Err(_) => to_json(None::<Option<u8>>)
},
"board" => to_json(a)
);

View File

@ -4,7 +4,7 @@
<link rel="stylesheet" type="text/css" href="/static/index.css">
</head>
<body>
{{> board_bar board=board}}
{{> board_bar board=board user=user}}
<div id="index">
<table style="width: 100%;" cellpadding=8px>
<!--messages-->

View File

@ -15,14 +15,14 @@
<table style="width: 100%;" cellpadding=8px>
<tr><th>Name</th><th>Description</th><th>Last Active</th></tr>
{{#each boards}}
<tr class="board"><td><a href="/board/{{id}}/">{{title}}</a></td><td>{{desc}}</td>
<td>
{{#if time_meta}}
{{time_meta.0}} {{time_meta.1}}
{{else}}
Never
{{/if}}
</td>
<tr class="board">
<td><a href="/board/{{id}}/">{{title}}</a></td>
<td>{{desc}}</td>
{{#if time_meta}}
<td>{{time_meta.0}} {{time_meta.1}}</td>
{{else}}
<td>Never</td>
{{/if}}
</tr>
{{/each}}
</table>

View File

@ -7,5 +7,5 @@
<div id="description">
{{board.desc}}
</div>
{{> login_status}}
{{> login_status user=user}}
</div>