mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-25 16:49:26 +01:00
Merge pull request 'Display profile icons' (#169) from StevenNMeza/teddit:profile_picture into main
Reviewed-on: https://codeberg.org/teddit/teddit/pulls/169
This commit is contained in:
commit
489a8dd864
@ -55,7 +55,7 @@ const config = {
|
||||
new_page: 60
|
||||
},
|
||||
},
|
||||
valid_media_domains: ['preview.redd.it', 'external-preview.redd.it', 'i.redd.it', 'v.redd.it', 'a.thumbs.redditmedia.com', 'b.thumbs.redditmedia.com', 'emoji.redditmedia.com', 'thumbs.gfycat.com', 'i.ytimg.com'],
|
||||
valid_media_domains: ['preview.redd.it', 'external-preview.redd.it', 'i.redd.it', 'v.redd.it', 'a.thumbs.redditmedia.com', 'b.thumbs.redditmedia.com', 'emoji.redditmedia.com', 'styles.redditmedia.com', 'www.redditstatic.com', 'thumbs.gfycat.com', 'i.ytimg.com'],
|
||||
valid_embed_video_domains: ['gfycat.com', 'youtube.com'],
|
||||
reddit_api_error_text: `Seems like your instance is either blocked (e.g. due to API rate limiting), reddit is currently down, or your API key is expired and not renewd properly. This can also happen for other reasons.`
|
||||
};
|
||||
|
@ -51,6 +51,8 @@ module.exports = function(tools) {
|
||||
dir = 'thumbs/'
|
||||
if(file_prefix === 'flair_')
|
||||
dir = 'flairs/'
|
||||
if(file_prefix === 'icon_')
|
||||
dir = 'icons/'
|
||||
|
||||
if(valid_video_extensions.includes(file_ext) || gifmp4) {
|
||||
/* Is video. */
|
||||
|
@ -99,7 +99,7 @@ module.exports = function() {
|
||||
|
||||
let obj = {
|
||||
username: about.name,
|
||||
icon_img: about.icon_img,
|
||||
icon_img: await downloadAndSave(about.icon_img, "icon_"),
|
||||
created: about.created_utc,
|
||||
verified: about.verified,
|
||||
link_karma: about.link_karma,
|
||||
|
1
static/pics/.gitignore
vendored
1
static/pics/.gitignore
vendored
@ -4,4 +4,5 @@
|
||||
!.gitignore
|
||||
!flairs/
|
||||
!thumbs/
|
||||
!icons/
|
||||
|
||||
|
@ -70,6 +70,7 @@ html
|
||||
li(class=past === 'all' ? 'active' : '')
|
||||
a(href="?sort=" + sortby + "&t=all") all time
|
||||
.info
|
||||
img(src=data.icon_img)
|
||||
h1 #{data.username}
|
||||
p(class="user-stat") <span>#{kFormatter(data.link_karma)}</span> post karma
|
||||
p(class="user-stat") <span>#{kFormatter(data.comment_karma)}</span> comment karma
|
||||
|
Loading…
Reference in New Issue
Block a user