feat: Add alternative tlds to account page
All checks were successful
Build Docker / Build SLDs Image (push) Successful in 21s
Build Docker / Build Main Image (push) Successful in 22s

This commit is contained in:
Nathan Woodburn 2023-12-13 10:52:40 +11:00
parent 3c6829826f
commit 5a8d185837
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 5 additions and 3 deletions

View File

@ -602,6 +602,7 @@ def catch_all(path):
account_link = "login"
account_link_name = "Login"
site = "Null"
sld = ""
domain = ""
tribe_title = "Join a tribe"
tribe_link = "tribe"
@ -621,6 +622,7 @@ def catch_all(path):
account_link = "account"
account_link_name = "Account"
site = user['domain'] + "." + CITY_DOMAIN
sld = user['domain']
# Check if user owns tribe
tribeData = db.get_user_owned_tribe(user['domain'])
if len(tribeData) > 0:
@ -638,14 +640,14 @@ def catch_all(path):
if os.path.isfile('templates/' + path):
return render_template(path,account=account,account_link=account_link,
account_link_name=account_link_name,site=site,
CITY_DOMAIN=CITY_DOMAIN,domain=domain,
CITY_DOMAIN=CITY_DOMAIN,domain=domain,sld=sld,
tribe_title=tribe_title,tribe_link=tribe_link)
# Try with .html
if os.path.isfile('templates/' + path + '.html'):
return render_template(path + '.html',account=account,account_link=account_link,
account_link_name=account_link_name,site=site,
CITY_DOMAIN=CITY_DOMAIN,domain=domain,
CITY_DOMAIN=CITY_DOMAIN,domain=domain,sld=sld,
tribe_title=tribe_title,tribe_link=tribe_link)
return redirect('/') # 404 catch all

View File

@ -40,7 +40,7 @@
</section>
<section style="margin-top: 50px;text-align: center;">
<h1>Welcome to ShakeCities</h1>
<p>Congratulations your site is ready for use.<br><br></p>
<p>Congratulations your site is ready for use.<br>Your site is available at {{sld}}.shakecities/ {{sld}}.shakec/ &amp; {{sld}}.onsc/<br><br></p>
<div style="max-width: 10em;margin: auto;"><a class="btn btn-primary" role="button" href="https://{{site}}" style="display: block;margin: 10px;" target="_blank">Visit your site</a><a class="btn btn-primary" role="button" href="/edit" style="display: block;margin: 10px;">Edit your site</a><a class="btn btn-primary" role="button" href="/{{tribe_link}}" style="display: block;margin: 10px;">{{tribe_title}}</a><a class="btn btn-primary" role="button" href="/hnschat" style="display: block;margin: 10px;">Link HNSChat</a><a class="btn btn-primary" role="button" href="/logout" style="display: block;margin: 10px;">Logout</a></div>
</section>
<section style="margin: 20px;height: 40px;text-align: center;margin-top: 40px;">