From ca10ca24e21989699919febc9e323aec8d085c4a Mon Sep 17 00:00:00 2001
From: Tdxdxoz
Date: Wed, 30 Dec 2020 16:39:04 +0800
Subject: [PATCH] feat: contribute link
---
app.py | 1 +
templates/list.html | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/app.py b/app.py
index c4ec45b..460bf36 100644
--- a/app.py
+++ b/app.py
@@ -203,6 +203,7 @@ def list(username):
ipfs_version = hashlib.sha256(C.ipfs_base_url.encode('utf-8')).hexdigest()
ipfs_id = ipfs_info.get('ID')
disable_upload = not C.allow_guest_upload and username.startswith('guest<')
+ contributor_link = C.contributor_link
return render_template('list.html', **locals())
def check_length(x, limit=30, allow_null=False):
diff --git a/templates/list.html b/templates/list.html
index 0b2d266..7553d8f 100644
--- a/templates/list.html
+++ b/templates/list.html
@@ -446,7 +446,11 @@
-
@{{'匿名用户' if p.anon else p.author}} | {{p.create_date}}
+ {% if p.author in contributor_link %}
+
@{{p.author}}
+ {% else %}
+
@{{'匿名用户' if p.anon else p.author}} | {{p.create_date}}
+ {% endif %}