use separate pd client
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{{define "user_home"}}<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{{template "meta_tags" .Username}}
|
||||
{{template "meta_tags" .User.Username}}
|
||||
{{template "user_style" .}}
|
||||
<script>var apiEndpoint = '{{.APIEndpoint}}';</script>
|
||||
</head>
|
||||
@@ -9,47 +9,57 @@
|
||||
<body>
|
||||
{{template "page_top" .}}
|
||||
|
||||
<h1>Welcome home, {{.Username}}!</h1>
|
||||
<h1>Welcome home, {{.User.Username}}!</h1>
|
||||
|
||||
<div class="page_content"><div class="limit_width">
|
||||
<h2>Account information</h2>
|
||||
<ul>
|
||||
<li>Username: {{.Username}}</li>
|
||||
<li>E-mail address: {{.Email}}</li>
|
||||
</ul>
|
||||
<a href="/user/settings" class="button">Update account settings</a>
|
||||
|
||||
<h2>Your most recently uploaded files:</h2>
|
||||
<div class="highlight_dark">
|
||||
{{$files := .PixelAPI.UserFiles 0 15}}
|
||||
{{range $files.Files}}<!--
|
||||
--><a class="file_button" href="/u/{{.ID}}" target="_blank">
|
||||
<img src="{{$.APIEndpoint}}/file/{{.ID}}/thumbnail?width=80&height=80" alt="{{.Name}}" />
|
||||
<span class="file_button_title">{{.Name}}</span>
|
||||
<br/>
|
||||
{{.DateUpload.Format "2006-01-02 15:04:05"}}
|
||||
</a><!--
|
||||
-->{{end}}
|
||||
<br/>
|
||||
<a href="/user/files" class="button">...All my files</a>
|
||||
<div class="page_content">
|
||||
<div class="limit_width">
|
||||
<h2>Account information</h2>
|
||||
<ul>
|
||||
<li>Username: {{.User.Username}}</li>
|
||||
<li>E-mail address: {{.User.Email}}</li>
|
||||
<li>
|
||||
Supporter status:
|
||||
{{if eq .User.Subscription ""}}
|
||||
Not a pixeldrain supporter<br/>
|
||||
<a href="https://www.patreon.com/pixeldrain">Learn how to support pixeldrain</a>.
|
||||
{{else}}
|
||||
{{if eq .User.Subscription "patreon_1"}}
|
||||
Level 1 Patreon supporter. Benefits:
|
||||
<ul>
|
||||
<li>No ads when viewing files</li>
|
||||
</ul>
|
||||
{{else if eq .User.Subscription "patreon_2"}}
|
||||
Level 2 Patreon supporter. Benefits:
|
||||
<ul>
|
||||
<li>No ads when viewing files</li>
|
||||
<li>No ads on uploaded files</li>
|
||||
<li>2-month file expiry (Not implemented yet)</li>
|
||||
</ul>
|
||||
{{else if eq .User.Subscription "patreon_3"}}
|
||||
Level 3 Patreon supporter. Benefits:
|
||||
<ul>
|
||||
<li>No ads when viewing files</li>
|
||||
<li>No ads on uploaded files</li>
|
||||
<li>6-month file expiry (Not implemented yet)</li>
|
||||
</ul>
|
||||
{{else if eq .User.Subscription "patreon_4"}}
|
||||
Level 4 Patreon supporter. Benefits:
|
||||
<ul>
|
||||
<li>No ads when viewing files</li>
|
||||
<li>No ads on uploaded files</li>
|
||||
<li>No file expiry (Not implemented yet)</li>
|
||||
</ul>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</li>
|
||||
</ul>
|
||||
<a href="/user/settings" class="button button_highlight">Change account settings</a>
|
||||
<h2>Navigation</h2>
|
||||
<a href="/" class="button">Upload files</a>
|
||||
<a href="/user/filemanager#files" class="button">My files</a>
|
||||
<a href="/user/filemanager#lists" class="button">My lists</a>
|
||||
</div>
|
||||
<h2>Your most recently created lists:</h2>
|
||||
<div class="highlight_dark">
|
||||
{{$lists := .PixelAPI.UserLists 0 15}}
|
||||
{{range $lists.Lists}}<!--
|
||||
--><a class="file_button" href="/l/{{.ID}}" target="_blank">
|
||||
<img src="{{$.APIEndpoint}}/list/{{.ID}}/thumbnail?width=80&height=80" alt="{{.Title}}" />
|
||||
<span class="file_button_title">{{.Title}}</span>
|
||||
({{.FileCount}} Files)
|
||||
<br/>
|
||||
{{.DateCreated.Format "2006-01-02 15:04:05"}}
|
||||
</a><!--
|
||||
-->{{end}}
|
||||
<br/>
|
||||
<a href="/user/lists" class="button">...All my lists</a>
|
||||
</div>
|
||||
<br/><br/>
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
{{template "page_bottom" .}}
|
||||
|
||||
|
Reference in New Issue
Block a user