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 /target
# old data directory # new data directory, specified in config gile
/boards # NOTE: this config file does not yet exist
# new data directory, specified in default config file
/data /data
Cargo.lock Cargo.lock

View File

@ -79,7 +79,7 @@ pub async fn get_board(
"messages" => to_json(&a.messages), "messages" => to_json(&a.messages),
"user" => match uid { "user" => match uid {
Ok(a) => to_json(data.user_manager.lock().unwrap().get_user_by_id(a.id)), 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) "board" => to_json(a)
); );

View File

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

View File

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

View File

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