2022-09-08 04:18:54 +00:00
|
|
|
{{define "title"}}Share Private Photos{{end}}
|
|
|
|
{{define "content"}}
|
|
|
|
<div class="container">
|
2024-08-23 05:53:37 +00:00
|
|
|
<section class="hero is-link is-bold">
|
2022-09-08 04:18:54 +00:00
|
|
|
<div class="hero-body">
|
|
|
|
<div class="container">
|
|
|
|
<h1 class="title">
|
|
|
|
Share Private Photos
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<div class="block p-4">
|
|
|
|
<div class="columns is-centered">
|
|
|
|
<div class="column is-half">
|
|
|
|
|
|
|
|
<div class="card" style="width: 100%; max-width: 640px">
|
|
|
|
<header class="card-header has-background-link">
|
|
|
|
<p class="card-header-title has-text-light">
|
|
|
|
<span class="icon mr-2"><i class="fa fa-eye"></i></span>
|
|
|
|
<span>Share Private Photos</span>
|
|
|
|
</p>
|
|
|
|
</header>
|
|
|
|
<div class="card-content">
|
|
|
|
|
|
|
|
<!-- Show the introduction or selected user profile -->
|
|
|
|
{{if not .User}}
|
|
|
|
<div class="block">
|
|
|
|
You may use this page to grant access to your
|
|
|
|
<span class="has-text-private">
|
|
|
|
<i class="fa fa-eye"></i>
|
|
|
|
Private Photos
|
|
|
|
</span>
|
|
|
|
to another member on this site by entering their
|
|
|
|
username below.
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="block">
|
|
|
|
Confirm that you wish to grant <strong>{{.User.Username}}</strong>
|
|
|
|
access to view your
|
|
|
|
<span class="has-text-private">
|
|
|
|
<i class="fa fa-eye"></i>
|
|
|
|
Private Photos
|
|
|
|
</span>
|
|
|
|
by clicking the button below.
|
|
|
|
</div>
|
|
|
|
<div class="media block">
|
|
|
|
<div class="media-left">
|
2022-09-09 04:42:20 +00:00
|
|
|
{{template "avatar-64x64" .User}}
|
2022-09-08 04:18:54 +00:00
|
|
|
</div>
|
|
|
|
<div class="media-content">
|
2022-09-09 04:42:20 +00:00
|
|
|
<p class="title is-4">{{.User.NameOrUsername}}</p>
|
2022-09-08 04:18:54 +00:00
|
|
|
<p class="subtitle is-6">
|
|
|
|
<span class="icon"><i class="fa fa-user"></i></span>
|
|
|
|
<a href="/u/{{.User.Username}}" target="_blank">{{.User.Username}}</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
<!-- Show the relevant form -->
|
|
|
|
<form action="/photo/private/share" method="POST">
|
|
|
|
{{InputCSRF}}
|
|
|
|
|
|
|
|
{{if .User}}
|
|
|
|
<input type="hidden" name="to" value="{{.User.Username}}">
|
|
|
|
{{else}}
|
|
|
|
<div class="field block">
|
|
|
|
<label for="to" class="label">Share with Username:</label>
|
|
|
|
<input type="text" class="input"
|
|
|
|
name="to" id="to"
|
|
|
|
placeholder="username">
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
<div class="field has-text-centered">
|
|
|
|
<button type="submit" class="button is-success"
|
|
|
|
name="intent"
|
|
|
|
value="{{if .User}}submit{{else}}preview{{end}}">
|
|
|
|
{{if .User}}
|
|
|
|
<span class="icon"><i class="fa fa-unlock"></i></span>
|
|
|
|
<span>Confirm Share</span>
|
|
|
|
{{else}}
|
|
|
|
Continue
|
|
|
|
{{end}}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
window.addEventListener("DOMContentLoaded", (event) => {
|
|
|
|
let $file = document.querySelector("#file"),
|
|
|
|
$fileName = document.querySelector("#fileName");
|
|
|
|
|
|
|
|
$file.addEventListener("change", function() {
|
|
|
|
let file = this.files[0];
|
|
|
|
$fileName.innerHTML = file.name;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{{end}}
|