user authentication
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h1 class="text-3xl font-bold text-white">{{.file_name}}</h1>
|
||||
<div class="flex items-center space-x-3">
|
||||
{{if .is_editable}}
|
||||
{{if and .Authenticated .is_editable}}
|
||||
<a href="/edit_text/{{.file_path}}" class="btn-primary">
|
||||
<i class="fas fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
@@ -17,9 +17,11 @@
|
||||
<a href="/download/{{.file_path}}" class="btn-secondary">
|
||||
<i class="fas fa-download mr-2"></i>Download
|
||||
</a>
|
||||
{{if .Authenticated}}
|
||||
<button class="btn-danger delete-file-btn" data-path="{{.file_path}}">
|
||||
<i class="fas fa-trash mr-2"></i>Delete
|
||||
</button>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user