diff --git a/README.md b/README.md index a2292df..52d5121 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ We moved our instances list to a wiki page: https://notabug.org/halcyon-suite/ha Read our new wiki pages: https://notabug.org/halcyon-suite/halcyon/wiki ## Blog -- Release of Version 2.1.0 - [Blog article coming soon] +- Release of Version 2.1.1 - Profile settings can be changed again,fixed various Firefox-only bugs,Removed error if browser sends no language +- [Release of Version 2.1.0 - Introducing lists and more](https://nikisoft.myblog.de/nikisoft/art/11640527/Halcyon-2-1-0-Introducing-lists-and-more) - Release of Version 2.0.2 - Added dark theme,improved Japanese translation,added Galician translation,links to posts open in Halcyon now,smaller screens supported - Release of Version 2.0.1 - Added the languages Polish,Japanese and Korean,fixed many bugs,automatically mention all participants of discussions - [Release of Version 2.0.0 - The biggest changes in detail](https://nikisoft.myblog.de/nikisoft/art/11636651/Halcyon-2-0-0-The-biggest-changes-in-detail) diff --git a/assets/js/halcyon/halcyonFunctions.js b/assets/js/halcyon/halcyonFunctions.js index 4efad93..9f2bd5e 100644 --- a/assets/js/halcyon/halcyonFunctions.js +++ b/assets/js/halcyon/halcyonFunctions.js @@ -41,33 +41,33 @@ $(this).attr('href',getRelativeURL($(this).attr('href'))); $(".toot_article a").each(function(i) { const pltags = $(this).attr('href').match(/https:\/\/.+..+\/tag\/(.+)\/?/); if(pltags) { -$(this).attr('href','/search?q='+pltags[1]); +$(this).attr('target','_self').attr('href','/search?q='+pltags[1]); } const mstags = $(this).attr('href').match(/https:\/\/.+..+\/tags\/(.+)\/?/); if(mstags) { -$(this).attr('href','/search?q='+mstags[1]); +$(this).attr('target','_self').attr('href','/search?q='+mstags[1]); } const plusers = $(this).attr('href').match(/https:\/\/.+..+\/users\/([a-zA-Z\d_]+)(\/statuses\/\d+)?/); if(plusers && plusers[2] == undefined) { -$(this).attr('href','/@'+plusers[1]+'@'+$(this).attr('href').split("/")[2]); +$(this).attr('target','_self').attr('href','/@'+plusers[1]+'@'+$(this).attr('href').split("/")[2]); } else if(plusers && plusers[2] != undefined) { -$(this).attr('href',"javascript:openStatus('"+plusers[0]+"')"); +$(this).attr('target','_self').attr('href',"javascript:openStatus('"+plusers[0]+"');void(0)"); } const msusers = $(this).attr('href').match(/https:\/\/.+..+\/@([a-zA-Z\d_]+)(\/\d+)?/); if(msusers && msusers[2] == undefined) { -$(this).attr('href','/@'+msusers[1]+'@'+$(this).attr('href').split("/")[2]); +$(this).attr('target','_self').attr('href','/@'+msusers[1]+'@'+$(this).attr('href').split("/")[2]); } else if(msusers && msusers[2] != undefined) { -$(this).attr('href',"javascript:openStatus('"+msusers[0]+"')"); +$(this).attr('target','_self').attr('href',"javascript:openStatus('"+msusers[0]+"');void(0)"); } const gsstatus = $(this).attr('href').match(/https:\/\/.+..+\/notice\/(\d+)?/); if(gsstatus) { -$(this).attr('href',"javascript:openStatus('"+gsstatus[0]+"')"); +$(this).attr('target','_self').attr('href',"javascript:openStatus('"+gsstatus[0]+"');void(0)"); } const plstatus = $(this).attr('href').match(/https:\/\/.+..+\/objects\/([\da-z]{8}-[\da-z]{4}-[\da-z]{4}-[\da-z]{4}-[\da-z]{12})?/); if(plstatus && plstatus[1] != undefined) { -$(this).attr('href',"javascript:openStatus('"+plstatus[0]+"')"); +$(this).attr('target','_self').attr('href',"javascript:openStatus('"+plstatus[0]+"');void(0)"); } if(localStorage.setting_link_previews == "true") { if(!window.cards) { diff --git a/assets/js/halcyon/halcyonLists.js b/assets/js/halcyon/halcyonLists.js index fe1b7e3..fc5587b 100644 --- a/assets/js/halcyon/halcyonLists.js +++ b/assets/js/halcyon/halcyonLists.js @@ -26,7 +26,7 @@ $("").attr("href","/lists/"+lists[i].id).addClass("list-title").addClass("ite $("").attr("href","/lists/"+lists[i].id+"/add").addClass("list-adduser").addClass("item").css("float","right").append( $("").addClass("fa").addClass("fa-user-plus") )).append( -$("").attr("href","javascript:null").addClass("list-edit").addClass("item").css("float","right").append( +$("").attr("href","javascript:void(0)").addClass("list-edit").addClass("item").css("float","right").append( $("").addClass("fa").addClass("fa-pencil") ).click(function() { const list_id = $(this).parent().parent().attr("list-id"); @@ -51,7 +51,7 @@ replace_emoji(); } }); })).append( -$("").attr("href","javascript:null").addClass("list-delete").addClass("item").css("float","right").append( +$("").attr("href","javascript:void(0)").addClass("list-delete").addClass("item").css("float","right").append( $("").addClass("fa").addClass("fa-trash") ).click(function() { const list_id = $(this).parent().parent().attr("list-id"); diff --git a/assets/js/halcyon/halcyonSettings.js b/assets/js/halcyon/halcyonSettings.js index 75aead4..56821ef 100644 --- a/assets/js/halcyon/halcyonSettings.js +++ b/assets/js/halcyon/halcyonSettings.js @@ -106,16 +106,21 @@ $("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass }); $(document).on('change',".display_name_wrap input[name='display_name']", function(e) { $("#savestate").removeClass("fa-check").addClass("fa-spin").addClass("fa-circle-o-notch"); -api.patch("accounts/update_credentials","display_name="+$(this).val(),function() { -$.removeCookie("session"); +var formdata = new FormData(); +formdata.append('display_name',$(this).val()); +api.patch("accounts/update_credentials",formdata,function(data) { +current_display_name = data.display_name; +localStorage.current_display_name = current_display_name; +$(".js_current_profile_displayname").text(current_display_name); $("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass("fa-check"); -putMessage(__("Changed setting to")+" "+$(this).val()); +putMessage(__("Changed setting to")+" "+data.display_name); }); }); $(document).on('change',".about_me_wrap textarea[name='about_me']", function(e) { $("#savestate").removeClass("fa-check").addClass("fa-spin").addClass("fa-circle-o-notch"); -api.patch("accounts/update_credentials","note="+$(this).val(),function() { -$.removeCookie("session"); +var formdata = new FormData(); +formdata.append('note',$(this).val()); +api.patch("accounts/update_credentials",formdata,function() { $("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass("fa-check"); putMessage(__("Changed about me setting")); }); @@ -125,8 +130,10 @@ if($('#setting_avatar').prop('files')[0]) { $("#savestate").removeClass("fa-check").addClass("fa-spin").addClass("fa-circle-o-notch"); var formdata = new FormData(); formdata.append('avatar',$('#setting_avatar').prop('files')[0]); -api.patch("accounts/update_credentials",formdata,function() { -$.removeCookie("session"); +api.patch("accounts/update_credentials",formdata,function(data) { +current_avatar = data.avatar; +localStorage.current_avatar = current_avatar; +$(".js_current_profile_image").attr("src",current_avatar); $("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass("fa-check"); putMessage(__("Uploaded new avatar")); }) @@ -137,8 +144,10 @@ if($('#setting_header').prop('files')[0]) { $("#savestate").removeClass("fa-check").addClass("fa-spin").addClass("fa-circle-o-notch"); var formdata = new FormData(); formdata.append('header',$('#setting_header').prop('files')[0]); -api.patch("accounts/update_credentials",formdata,function() { -$.removeCookie("session"); +api.patch("accounts/update_credentials",formdata,function(data) { +current_header = data.header; +localStorage.current_header = current_header; +$(".js_current_header_image").attr("src",current_header); $("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass("fa-check"); putMessage(__("Uploaded new header")); }) @@ -146,20 +155,19 @@ putMessage(__("Uploaded new header")); }); $("#setting_lock_account").change(function() { $("#savestate").removeClass("fa-check").addClass("fa-spin").addClass("fa-circle-o-notch"); +var formdata = new FormData(); if(this.checked) { -api.patch("accounts/update_credentials","locked=1",function() { -$.removeCookie("session"); -$("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass("fa-check"); -putMessage(__("Account locked")); -}); +formdata.append('locked','1'); +var msgtext = "Account locked"; } else { -api.patch("accounts/update_credentials","locked=0",function() { -$.removeCookie("session"); -$("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass("fa-check"); -putMessage(__("Account unlocked")); -}); +formdata.append('locked','0'); +var msgtext = "Account unlocked"; } +api.patch("accounts/update_credentials",formdata,function() { +$("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass("fa-check"); +putMessage(__(msgtext)); +}); }) } else if(window.location.pathname == "/settings/appearance") { diff --git a/assets/js/halcyon/halcyonTemplates.js b/assets/js/halcyon/halcyonTemplates.js index abf5571..d97ef08 100644 --- a/assets/js/halcyon/halcyonTemplates.js +++ b/assets/js/halcyon/halcyonTemplates.js @@ -983,7 +983,7 @@ ${toot_reblog_button} - +
${current_instance_charlimit} @@ -1197,7 +1197,7 @@ ${media_views} - +
${current_instance_charlimit} diff --git a/assets/js/halcyon/halcyonUI.js b/assets/js/halcyon/halcyonUI.js index e3a6737..a04f0a6 100644 --- a/assets/js/halcyon/halcyonUI.js +++ b/assets/js/halcyon/halcyonUI.js @@ -724,7 +724,7 @@ $("#js_profile_username").text(AccountObj.acct); $("#js_profile_bio").addClass("emoji_poss").html(AccountObj.note); $("#js_profile_bio .emojione").removeClass("emojione").addClass("emoji"); $('#js_profile_public_link a').attr('href',AccountObj.url); -$('#js_profile_joined_date span span').text(__("Joined at ")+creation_date); +$('#js_profile_joined_date span span').text(__("Joined at")+" "+creation_date); console.log(AccountObj.id); console.log(current_id); if(AccountObj.acct.indexOf("@") != -1) { @@ -912,6 +912,7 @@ autosize($('#overlay_status_form .status_textarea textarea')); $('#overlay_status_form input[name="privacy_option"]').val([localStorage.getItem("setting_post_privacy")]); $('#overlay_status_form .expand_privacy_menu_button > i').attr('class', "fa fa-" + picon); $('#overlay_status_form .character_count').html(current_instance_charlimit); +$('label[for=overlay_status_emoji]').click(function(e) {$('#overlay_status_emoji').trigger('click',e)}); $('#overlay_status_emoji').lsxEmojiPicker({ closeOnSelect:true, twemoji:!checkEmojiSupport(), @@ -1105,6 +1106,7 @@ autosize($('#header_status_form .status_textarea textarea')); $('#header_status_form .status_bottom').removeClass('invisible'); $('#header_status_form .submit_status_label').addClass('active_submit_button'); $('#header_status_form .character_count').html(current_instance_charlimit); +$('label[for=header_status_emoji]').click(function(e) {$('#header_status_emoji').trigger('click',e)}); $('#header_status_emoji').lsxEmojiPicker({ closeOnSelect:true, twemoji:!checkEmojiSupport(), @@ -1230,6 +1232,7 @@ $('#reply_status_form .status_bottom').removeClass('invisible'); $('#reply_status_form .submit_status_label').addClass('active_submit_button'); $('#reply_status_form textarea').val(replyto); $('#reply_status_form .character_count').html(current_instance_charlimit); +$('label[for=reply_status_emoji]').click(function(e) {$('#reply_status_emoji').trigger('click',e)}); $('#reply_status_emoji').lsxEmojiPicker({ closeOnSelect:true, twemoji:!checkEmojiSupport(), @@ -1409,6 +1412,7 @@ $('#single_reply_status_form').attr('tid',sid); $('.single_reply_status .single_reply_status_header span').addClass("emoji_poss").html(__("Reply to")+" "+display_name); $('#single_reply_status_form textarea').val(replyto); $('#single_reply_status_form .character_count').html(current_instance_charlimit); +$('label[for=single_reply_status_emoji]').click(function(e) {$('#single_reply_status_emoji').trigger('click',e)}); $('#single_reply_status_emoji').lsxEmojiPicker({ closeOnSelect:true, twemoji:!checkEmojiSupport(), diff --git a/language.php b/language.php index bcb8afc..dc75f33 100644 --- a/language.php +++ b/language.php @@ -2,12 +2,13 @@ $config = parse_ini_file(__DIR__.'/config/config.ini',true); $locale = ''; if(isset($_COOKIE['language'])) $locale = $_COOKIE['language']; -else { +else if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $langcode = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']); -if(file_exists(__DIR__.'/locale/'.$langcode)) $locale = $langcode; +if(file_exists(__DIR__.'/locale/'.$langcode)) $locale = langcode; else if(file_exists(__DIR__.'/locale/'.explode("_",$langcode)[0])) $locale = explode("_",$langcode)[0]; else $locale = $config['App']['default_language']; } +else $locale = $config['App']['default_language']; if(function_exists("putenv")) { putenv('LC_ALL='.$locale); } diff --git a/user.php b/user.php index b679f34..4900906 100644 --- a/user.php +++ b/user.php @@ -15,7 +15,7 @@

diff --git a/user_favorite.php b/user_favorite.php index d35c837..3e3aec2 100644 --- a/user_favorite.php +++ b/user_favorite.php @@ -15,7 +15,7 @@

diff --git a/user_followers.php b/user_followers.php index d2e5ebc..367fc4d 100644 --- a/user_followers.php +++ b/user_followers.php @@ -15,7 +15,7 @@

diff --git a/user_following.php b/user_following.php index 2413213..2005be4 100644 --- a/user_following.php +++ b/user_following.php @@ -15,7 +15,7 @@

diff --git a/user_include_replies.php b/user_include_replies.php index 810555c..3108aca 100644 --- a/user_include_replies.php +++ b/user_include_replies.php @@ -15,7 +15,7 @@

diff --git a/user_only_media.php b/user_only_media.php index 9aaf36e..147ea32 100644 --- a/user_only_media.php +++ b/user_only_media.php @@ -15,7 +15,7 @@

diff --git a/version.txt b/version.txt index 7ec1d6d..3e3c2f1 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.1.0 +2.1.1 diff --git a/widgets/create_status.php b/widgets/create_status.php index 4ed21b4..b21e758 100644 --- a/widgets/create_status.php +++ b/widgets/create_status.php @@ -48,7 +48,7 @@ - +
@@ -61,4 +61,4 @@
- \ No newline at end of file + diff --git a/widgets/lists_header.php b/widgets/lists_header.php index fa98f59..a18fb75 100644 --- a/widgets/lists_header.php +++ b/widgets/lists_header.php @@ -6,7 +6,7 @@
  • -

    +

diff --git a/widgets/overlay_confirm.php b/widgets/overlay_confirm.php index bf6921f..d74e546 100644 --- a/widgets/overlay_confirm.php +++ b/widgets/overlay_confirm.php @@ -6,7 +6,7 @@
- +
diff --git a/widgets/overlay_create_status.php b/widgets/overlay_create_status.php index e88000c..9b854f0 100644 --- a/widgets/overlay_create_status.php +++ b/widgets/overlay_create_status.php @@ -49,7 +49,7 @@ - +
diff --git a/widgets/overlay_prompt.php b/widgets/overlay_prompt.php index 7efc837..7ea661b 100644 --- a/widgets/overlay_prompt.php +++ b/widgets/overlay_prompt.php @@ -9,7 +9,7 @@
- +
diff --git a/widgets/overlay_single_reply.php b/widgets/overlay_single_reply.php index 769b4c7..9836859 100644 --- a/widgets/overlay_single_reply.php +++ b/widgets/overlay_single_reply.php @@ -50,7 +50,7 @@ - +