Mercurial Hosting > disearch
comparison src/lib/Shared.luan @ 8:9534dd5eda89
use avatar
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 24 Oct 2023 19:31:33 -0600 |
parents | d59ae3e468f1 |
children | 88f425d261b3 |
comparison
equal
deleted
inserted
replaced
7:f29dd482a25a | 8:9534dd5eda89 |
---|---|
28 <div header> | 28 <div header> |
29 <h1><a href="/">Disearch</a></h1> | 29 <h1><a href="/">Disearch</a></h1> |
30 <% if get_user() == nil then %> | 30 <% if get_user() == nil then %> |
31 <a href="login1.red">login</a> | 31 <a href="login1.red">login</a> |
32 <% else %> | 32 <% else %> |
33 <a href="javascript:logout()">logout</a> | 33 <a href="javascript:logout()"><script>document.write(`<img src="https://cdn.discordapp.com/avatars/${localStorage.user_id}/${localStorage.user_avatar}.png">`)</script></a> |
34 <% end %> | 34 <% end %> |
35 </div> | 35 </div> |
36 <hr> | 36 <hr> |
37 <% | 37 <% |
38 end | 38 end |
46 <% | 46 <% |
47 end | 47 end |
48 | 48 |
49 function Shared.discord_redirect_uri() | 49 function Shared.discord_redirect_uri() |
50 local request = Http.request | 50 local request = Http.request |
51 return request.scheme.."://"..request.headers["Host"].."/login2.red" | 51 return request.scheme.."://"..request.headers["Host"].."/login2.html" |
52 end | 52 end |
53 | 53 |
54 return Shared | 54 return Shared |