From 9e556721c507f5cfbafa32afbfa80b70c6f0eca1 Mon Sep 17 00:00:00 2001
From: r <r@freesoftwareextremist.com>
Date: Sun, 29 Dec 2019 11:32:24 +0000
Subject: Add default settings

---
 templates/settings.tmpl | 4 ++++
 templates/status.tmpl   | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

(limited to 'templates')

diff --git a/templates/settings.tmpl b/templates/settings.tmpl
index e2fd778..df04cb1 100644
--- a/templates/settings.tmpl
+++ b/templates/settings.tmpl
@@ -16,6 +16,10 @@
 		<input id="copy-scope" name="copy_scope" type="checkbox" value="true" {{if .Settings.CopyScope}}checked{{end}}>
 		<label for="copy-scope"> Copy scope when replying </label>
 	</div>
+	<div class="settings-form-field">
+		<input id="thread-tab" name="thread_in_new_tab" type="checkbox" value="true" {{if .Settings.ThreadInNewTab}}checked{{end}}>
+		<label for="thread-tab"> Open threads in new tab from timeline </label>
+	</div>
 	<button type="submit"> Save </button>
 </form>
 
diff --git a/templates/status.tmpl b/templates/status.tmpl
index 4e975ad..4c94062 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -90,7 +90,7 @@
 					<a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply"> 
 						<i class="fa fa-reply"></i>
 					</a>
-					<a class="status-action-count" href="/thread/{{.ID}}#status-{{.ID}}">
+					<a class="status-action-count" href="/thread/{{.ID}}#status-{{.ID}}" {{if .ThreadInNewTab}}target="_blank"{{end}}>
 						<span> {{DisplayInteractionCount .RepliesCount}} </span>
 					</a>
 				</div>
@@ -129,7 +129,7 @@
 					</a>
 				</div>
 				<div class="status-action">
-					<a class="status-time" href="/thread/{{.ID}}#status-{{.ID}}"> 
+					<a class="status-time" href="/thread/{{.ID}}#status-{{.ID}}" {{if .ThreadInNewTab}}target="_blank"{{end}}> 
 						<time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{.CreatedAt}}"> {{TimeSince .CreatedAt}} </time> 
 					</a>
 				</div>
-- 
cgit v1.2.3