odin-codespace/file-uploader/src/views/main.ejs

21 lines
746 B
Text

<%- include('partials/header') %>
<body>
<% if(currentUser) { %>
<p> Hello <%= currentUser.username %> </p>
<a href="/auth/logout">sign out</a>
<%- include('partials/fileUpload') %>
<%- include('partials/parentDirectories') %>
<%- include('partials/directoryListing') %>
<% } else { %>
<form action="/auth/login" method="post">
<label for="username">Username</label>
<input type="text" name="username">
<label for="password">Password</label>
<input type="password" name="password" id="password">
<button type="submit">Submit</button>
<a href="/auth/register">Click here to register</a>
</form>
<% } %>
<%- include('partials/footer') %>