48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
<%- include('partials/header', { title: 'Shares', user }) %>
|
|
<section class="panel">
|
|
<h1>Create share</h1>
|
|
<% if (error) { %>
|
|
<div class="alert"><%= error %></div>
|
|
<% } %>
|
|
<form action="/shares" method="post" class="form-row">
|
|
<input name="name" placeholder="share-name" required />
|
|
<button class="primary" type="submit">Create</button>
|
|
</form>
|
|
<div class="hint">Share names are 1-31 chars and must avoid reserved names like private or IPC$.</div>
|
|
</section>
|
|
|
|
<section class="grid">
|
|
<div class="panel">
|
|
<h2>My shares</h2>
|
|
<% if (!myShares.length) { %>
|
|
<p class="muted">You do not own any shares yet.</p>
|
|
<% } %>
|
|
<ul class="list">
|
|
<% myShares.forEach((share) => { %>
|
|
<li>
|
|
<a href="/shares/<%= share.id %>"><%= share.name %></a>
|
|
<span class="badge">Owner</span>
|
|
</li>
|
|
<% }) %>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="panel">
|
|
<h2>Shares you can access</h2>
|
|
<% if (!shares.length) { %>
|
|
<p class="muted">No shares are available to you yet.</p>
|
|
<% } %>
|
|
<ul class="list">
|
|
<% shares.forEach((share) => { %>
|
|
<li>
|
|
<a href="/shares/<%= share.id %>"><%= share.name %></a>
|
|
<% if (share.owner_upn === user.upn) { %>
|
|
<span class="badge">Owner</span>
|
|
<% } %>
|
|
</li>
|
|
<% }) %>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<%- include('partials/footer') %>
|