diff --git a/.htaccess b/.htaccess index 4f377a1..03d4833 100644 --- a/.htaccess +++ b/.htaccess @@ -13,6 +13,8 @@ RewriteRule ^login/?$ login/login\.php [NC,L,QSA] RewriteRule ^auth/?$ login/auth\.php [NC,L,QSA] RewriteRule ^logout/?$ login/logout\.php [NC,L,QSA] RewriteRule ^terms/?$ login/terms\.php [NC,L,QSA] +RewriteRule ^privacy/?$ login/privacy\.php [NC,L,QSA] +RewriteRule ^imprint/?$ login/imprint\.php [NC,L,QSA] # LTL RewriteBase /local diff --git a/Caddyfile b/Caddyfile index 1c9030f..c1def51 100644 --- a/Caddyfile +++ b/Caddyfile @@ -35,6 +35,14 @@ r ^/terms/?$ to /login/terms.php } rewrite { +r ^/privacy/?$ +to /login/privacy.php +} +rewrite { +r ^/imprint/?$ +to /login/imprint.php +} +rewrite { r ^/local/?$ to /local.php } diff --git a/README.md b/README.md index e82bc45..e851e61 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Follow our Mastodon account and never miss an important update: [@halcyon@social ## Instances These instances are publicly accessible and usable by everyone, no matter which Mastodon instance you use. -- https://itter.photog.social - 1.2.5 +- https://itter.photog.social - 1.2.6 - https://halcyon.uelfte.club - 1.2.5 - https://social.dev-wiki.de - 1.2.5 - https://halcyon.anoxinon.de - 1.2.5 @@ -22,6 +22,7 @@ These instances are publicly accessible and usable by everyone, no matter which You have your own Halcyon instance and want it to be listed here? Create an issue with the link and we will add it to the list. ## Blog +- Release of Version 1.2.6 - Report toots supported,disable CW and NSFW,add privacy policy and imprint,move config files,read release notes for more - Release of Version 1.2.5 - Copy links with one click,emojicodes now always detected,streaming in hashtag search,delete event now supported - Release of Version 1.2.4 - Updated Twemoji,custom emojis in names and bios,links to profiles in pleroma now always work,pinned posts now supported - Release of Version 1.2.3 - All emojis do now work,fixed some bugs in the Nginx example config,fixed Windows-only design bug,improved text field performance diff --git a/assets/css/style.css b/assets/css/style.css index fb565d1..dc9ddfb 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -469,19 +469,12 @@ padding-right: 0; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } -.single_reply_status { +.single_reply_status,.report_status { width: 600px; margin: auto; -/*! z-index: 1000; */ -/*! top: 25%; */ -/*! left: 0; */ -/*! height: 100%; */ -/*! position: absolute; */ -/*! right: 0; */ -/*! bottom: 0; */ margin-top: 20%; } -.single_reply_status_header { +.single_reply_status_header,.report_status_header { width: 600px; padding: 16px; box-sizing: border-box; @@ -494,17 +487,17 @@ color: #66757F; font-size: 18px; font-weight: 300; } -.single_reply_status .status_preview { +.single_reply_status .status_preview,.report_status .status_preview { border-top: 1px solid #E1E8ED; } -.single_reply_status .status_preview .toot_entry .toot_footer { +.single_reply_status .status_preview .toot_entry .toot_footer,.report_stauts .status_preview .toot_entry .toot_footer { display: none!important; } -.single_reply_status .status_form .status_bottom { +.single_reply_status .status_form .status_bottom,.report_status .status_form .status_bottom { width: 100%; margin-left: 0; } -#single_reply_status_form.status_form { +#single_reply_status_form.status_form,#report_status_form.status_form { width: 600px; padding: 16px; box-sizing: border-box; @@ -513,7 +506,7 @@ border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; margin: auto; } -#single_reply_status_form.status_form .status_bottom .submit_status_label .toot_button_label i { +#single_reply_status_form.status_form .status_bottom .submit_status_label .toot_button_label i,#report_status_form.status_form .status_bottom .submit_status_label .toot_button_label i { font-size: 18px; margin-right: 8px; } diff --git a/assets/js/halcyon/halcyonFunctions.js b/assets/js/halcyon/halcyonFunctions.js index f35c7ec..99fdb2c 100644 --- a/assets/js/halcyon/halcyonFunctions.js +++ b/assets/js/halcyon/halcyonFunctions.js @@ -123,27 +123,27 @@ var posted_time_original = posted_time, posted_time = getConversionedDate(null, posted_time_original).getTime(), elapsedTime = Math.ceil((current_time-posted_time)/1000); if (elapsedTime < 60) { -const datetime ="・" + elapsedTime + "s"; +const datetime ="· " + elapsedTime + "s"; return datetime; } else if (elapsedTime < 120) { -const datetime ="・1m"; +const datetime ="· 1m"; return datetime; } else if (elapsedTime < (60*60)) { -const datetime ="・" + (Math.floor(elapsedTime / 60) < 10 ? " " : "") + Math.floor(elapsedTime / 60) + "m"; +const datetime ="· " + (Math.floor(elapsedTime / 60) < 10 ? " " : "") + Math.floor(elapsedTime / 60) + "m"; return datetime; } else if (elapsedTime < (120*60)) { -const datetime ="・1h"; +const datetime ="· 1h"; return datetime; } else if (elapsedTime < (24*60*60)) { -const datetime ="・" + (Math.floor(elapsedTime / 3600) < 10 ? " " : "") + Math.floor(elapsedTime / 3600) + "h"; +const datetime ="· " + (Math.floor(elapsedTime / 3600) < 10 ? " " : "") + Math.floor(elapsedTime / 3600) + "h"; return datetime; } else { -const datetime ="・" + calendar[posted_time_original.getMonth()] + " " + posted_time_original.getDate(); +const datetime ="· " + calendar[posted_time_original.getMonth()] + " " + posted_time_original.getDate(); return datetime; } } @@ -382,6 +382,6 @@ follow_loaded++; } function checkEmojiSupport() { var ctx = document.createElement("canvas").getContext("2d"); -ctx.fillText("😗",-2,4); +ctx.fillText("😗",-2,4); return ctx.getImageData(0,0,1,1).data[3] > 0; } diff --git a/assets/js/halcyon/halcyonSettings.js b/assets/js/halcyon/halcyonSettings.js index 40f1148..102a5f4 100644 --- a/assets/js/halcyon/halcyonSettings.js +++ b/assets/js/halcyon/halcyonSettings.js @@ -147,6 +147,12 @@ $("#setting_desktop_notifications")[0].checked = false; if(localStorage.setting_show_replies == "true") { $("#setting_show_replies")[0].checked = true; } +if(localStorage.setting_show_content_warning == "true") { +$("#setting_show_content_warning")[0].checked = true; +} +if(localStorage.setting_show_nsfw == "true") { +$("#setting_show_nsfw")[0].checked = true; +} }); $(document).on('change',".post_streaming_wrap input[name='post_streaming']:checked", function(e) { localStorage.setItem("setting_post_stream", $(this).val()); @@ -200,5 +206,25 @@ else { localStorage.setItem("setting_show_replies","false"); putMessage("Replies hidden"); } -}) +}); +$("#setting_show_content_warning").change(function() { +if(this.checked) { +localStorage.setItem("setting_show_content_warning","true"); +putMessage("CW content shown"); +} +else { +localStorage.setItem("setting_show_content_warning","false"); +putMessage("CW content hidden"); +} +}); +$("#setting_show_nsfw").change(function() { +if(this.checked) { +localStorage.setItem("setting_show_nsfw","true"); +putMessage("NSFW content shown"); +} +else { +localStorage.setItem("setting_show_nsfw","false"); +putMessage("NSFW content hidden"); +} +}); } diff --git a/assets/js/halcyon/halcyonTemplates.js b/assets/js/halcyon/halcyonTemplates.js index e7ece68..67adecb 100644 --- a/assets/js/halcyon/halcyonTemplates.js +++ b/assets/js/halcyon/halcyonTemplates.js @@ -3,13 +3,14 @@ let media_views = ""; if(status.media_attachments[0].remote_url != null) { status.media_attachments[0].url = status.media_attachments[0].remote_url; } -if ( status.media_attachments[0].url === "/files/original/missing.png" ) { +if(status.media_attachments[0].url === "/files/original/missing.png") { return ""; -} else if ( !status.sensitive ) { +} +else if(!status.sensitive || localStorage.setting_show_nsfw == "true") { media_views = `
`; -} else { -media_views = ` -
+} +else { +media_views = `
Sensitive content Click to view @@ -72,10 +73,13 @@ article_option= "", toot_reblogs_count= "", toot_favourites_count = "", media_views = ""; -if ( status.spoiler_text ) { +if(status.spoiler_text && localStorage.setting_show_content_warning == "false") { alart_text = ""+status.spoiler_text+"", article_option = "content_warning"; } +else if(status.spoiler_text && localStorage.setting_show_content_warning == "true") { +alart_text = ""+status.spoiler_text+""; +} if (status.reblogs_count) { toot_reblogs_count = status.reblogs_count; } @@ -117,6 +121,11 @@ else { own_toot_buttons += (`
  • Pin Toot
  • `); } } +else { +var own_toot_buttons = (`
  • Mute @${status.account.username}
  • +
  • Block @${status.account.username}
  • +
  • Report this Toot
  • `); +} const html=(`
  • @@ -145,8 +154,6 @@ ${status.account.display_name}