diff --git a/README.md b/README.md index 9d64654..c94b8e9 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ We moved our instances list to a wiki page: https://notabug.org/halcyon-suite/ha or read our new wiki pages to install it manually: https://notabug.org/halcyon-suite/halcyon/wiki ## Blog +- Release of Version 2.1.4 - Added custom profile fields,verified links and custom profile link settings - Release of Version 2.1.3 - Added a autocomplete feature for usernames,hashtags and emojis,fixed a bug in the emoji picker (didn't open sometimes) - Release of Version 2.1.2 - Added toot to @someone button to profiles,remove blocked and muted people from who to follow,improved German translation - Release of Version 2.1.1 - Profile settings can be changed again,fixed various Firefox-only bugs,Removed error if browser sends no language diff --git a/assets/css/dark.css b/assets/css/dark.css index 6ea3520..cb5efc1 100644 --- a/assets/css/dark.css +++ b/assets/css/dark.css @@ -96,6 +96,7 @@ border-bottom-color:#000000; .copy_link_input { border: 1px solid #000; background-color: #132030; +color:#FFFFFF; } .relationship_button { border:1px solid #189EFC; @@ -416,6 +417,8 @@ color:#fff; #main .article_wrap .left_column .profile_section_wrap > .profile_username { color:#657786; } +#main .article_wrap .left_column .profile_section_wrap > .profile_bio a, +#main .article_wrap .left_column .profile_section_wrap .profile_field_value a, .profile_with_icon > a { color:#189EFC; } diff --git a/assets/css/style.css b/assets/css/style.css index 484e3ac..31a7ae1 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1966,7 +1966,8 @@ line-height: normal; color: rgb(20, 23, 26); margin-bottom: 8px; } -#main .article_wrap .left_column .profile_section_wrap > .profile_username { +#main .article_wrap .left_column .profile_section_wrap > .profile_username, +#main .article_wrap .left_column .profile_section_wrap .profile_field_header { color: rgb(101, 119, 134); font-size: 14px; font-weight: 300; @@ -1977,16 +1978,24 @@ font-size: 10px; display: inline-block; margin-left: 8px; } -#main .article_wrap .left_column .profile_section_wrap > .profile_bio { +#main .article_wrap .left_column .profile_section_wrap > .profile_bio, +#main .article_wrap .left_column .profile_section_wrap .profile_field_value { font-size: 14px; font-weight: 400; line-height: 20px; margin-bottom: 10px; -word-wrap: break-word; } -#main .article_wrap .left_column .profile_section_wrap > .profile_bio a { +#main .article_wrap .left_column .profile_section_wrap > .profile_bio a, +#main .article_wrap .left_column .profile_section_wrap .profile_field_value a { color: #2588D0; } +#main .article_wrap .left_column .profile_section_wrap .profile_field:last-child { +margin-bottom:15px; +} +#main .article_wrap .left_column .profile_section_wrap .profile_field_verified { +margin-right:2px; +color:#1DA1F2; +} .profile_with_icon > a,.profile_with_icon > span { font-size: 13px; font-weight: 300; diff --git a/assets/js/halcyon/halcyonFunctions.js b/assets/js/halcyon/halcyonFunctions.js index 5e9dabc..b79992e 100644 --- a/assets/js/halcyon/halcyonFunctions.js +++ b/assets/js/halcyon/halcyonFunctions.js @@ -38,35 +38,37 @@ function replaceInternalLink(){ $(".h-card > a").each(function(i) { $(this).attr('href',getRelativeURL($(this).attr('href'))); }); -$(".toot_article a").each(function(i) { -const pltags = $(this).attr('href').match(/https:\/\/.+..+\/tag\/(.+)\/?/); +$(".toot_article a,.profile_bio,.follows_profile_bio").each(function(i) { +const pltags = $(this).attr('href').match(/https:\/\/.+..+\/tag\/([a-zA-Z\d_%]+)\/?$/); if(pltags) { $(this).attr('target','_self').attr('href','/search?q='+pltags[1]); } -const mstags = $(this).attr('href').match(/https:\/\/.+..+\/tags\/(.+)\/?/); +const mstags = $(this).attr('href').match(/https:\/\/.+..+\/tags\/([a-zA-Z\d_%]+)\/?$/); if(mstags) { $(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) { +const plusers = $(this).attr('href').match(/https:\/\/.+..+\/users\/([a-zA-Z\d_]+)(\/statuses\/\d+)\/?$/); +if(plusers) { $(this).attr('target','_self').attr('href','/@'+plusers[1]+'@'+$(this).attr('href').split("/")[2]); } -else if(plusers && plusers[2] != undefined) { -$(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) { +const msusers = $(this).attr('href').match(/https:\/\/.+..+\/@([a-zA-Z\d_]+)\/?$/); +if(msusers) { $(this).attr('target','_self').attr('href','/@'+msusers[1]+'@'+$(this).attr('href').split("/")[2]); } -else if(msusers && msusers[2] != undefined) { -$(this).attr('target','_self').attr('href',"javascript:openStatus('"+msusers[0]+"');void(0)"); +const msstatus = $(this).attr('href').match(/https:\/\/.+..+\/@([a-zA-Z\d_]+)(\/\d+)\/?$/); +if(msstatus) { +$(this).attr('target','_self').attr('href',"javascript:openStatus('"+msstatus[0]+"');void(0)"); } -const gsstatus = $(this).attr('href').match(/https:\/\/.+..+\/notice\/(\d+)?/); +const msstatus2 = $(this).attr('href').match(/https:\/\/.+..+\/users\/([a-zA-Z\d_]+)\/?$/); +if(msstatus2) { +$(this).attr('target','_self').attr('href',"javascript:openStatus('"+msstatus2[0]+"');void(0)"); +} +const gsstatus = $(this).attr('href').match(/https:\/\/.+..+\/notice\/(\d+)\/?$/); if(gsstatus) { $(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) { +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) { $(this).attr('target','_self').attr('href',"javascript:openStatus('"+plstatus[0]+"');void(0)"); } if(localStorage.setting_link_previews == "true") { diff --git a/assets/js/halcyon/halcyonSettings.js b/assets/js/halcyon/halcyonSettings.js index 9292342..4fe0037 100644 --- a/assets/js/halcyon/halcyonSettings.js +++ b/assets/js/halcyon/halcyonSettings.js @@ -114,6 +114,19 @@ $(".about_me_wrap textarea[name='about_me']").val(AccountObj["note"]); if(AccountObj["locked"] == true) { $("#setting_lock_account")[0].checked = true; } +if(AccountObj.source && AccountObj.source.fields) { +for(var i=0;iMastodon'); $("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass("fa-check"); }); }); @@ -149,7 +162,7 @@ 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")); -}) +}); } }); $("#setting_header").change(function() { @@ -181,7 +194,19 @@ api.patch("accounts/update_credentials",formdata,function() { $("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass("fa-check"); putMessage(__(msgtext)); }); -}) +}); +$(document).on('change',".setting_field",function(e) { +$("#savestate").removeClass("fa-check").addClass("fa-spin").addClass("fa-circle-o-notch"); +var formdata = new FormData(); +for(var i=0;i<4;i++) { +formdata.append('fields_attributes['+i+'][name]',$("#setting_field_"+i+"_name").val()); +formdata.append('fields_attributes['+i+'][value]',$("#setting_field_"+i+"_value").val()); +} +api.patch("accounts/update_credentials",formdata,function() { +$("#savestate").removeClass("fa-spin").removeClass("fa-circle-o-notch").addClass("fa-check"); +putMessage(__("Changed custom profile field")); +}); +}); } else if(window.location.pathname == "/settings/appearance") { $('#js-settings_nav_appearance').toggleClass('view'); diff --git a/assets/js/halcyon/halcyonUI.js b/assets/js/halcyon/halcyonUI.js index 7fa1a3f..478dffc 100644 --- a/assets/js/halcyon/halcyonUI.js +++ b/assets/js/halcyon/halcyonUI.js @@ -729,6 +729,14 @@ $("#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); +for(var i=0;i").addClass("fa fa-check-circle").addClass("profile_field_verified"); +else var verified = ""; +$("#js_profile_fields").append( +$("
").addClass("profile_field").append( +$("").addClass("profile_field_header").addClass("emoji_poss").text(AccountObj.fields[i].name).prepend(verified)).append($("
")).append( +$("").addClass("profile_field_value").addClass("emoji_poss").html(AccountObj.fields[i].value))); +} console.log(AccountObj.id); console.log(current_id); if(AccountObj.acct.indexOf("@") != -1) { diff --git a/settings_profile.php b/settings_profile.php index 31c531b..838b95f 100644 --- a/settings_profile.php +++ b/settings_profile.php @@ -16,7 +16,7 @@

-
+
@@ -54,6 +54,42 @@
-
+
+
    +
  • +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+

To verify that the links in your custom fields really belong to you, you can add the link below to your website. The link text can be changed to whatever you want.

+ +
+- +
diff --git a/user.php b/user.php index 0902889..4d2c5f3 100644 --- a/user.php +++ b/user.php @@ -14,6 +14,7 @@ @

+
diff --git a/user_favorite.php b/user_favorite.php index 3e3aec2..55061eb 100644 --- a/user_favorite.php +++ b/user_favorite.php @@ -14,6 +14,7 @@ @

+
diff --git a/user_followers.php b/user_followers.php index ee54b87..640e712 100644 --- a/user_followers.php +++ b/user_followers.php @@ -14,6 +14,7 @@ @

+
diff --git a/user_following.php b/user_following.php index 1f9e8bb..b261273 100644 --- a/user_following.php +++ b/user_following.php @@ -14,6 +14,7 @@ @

+
diff --git a/user_include_replies.php b/user_include_replies.php index 985c8a8..08e9619 100644 --- a/user_include_replies.php +++ b/user_include_replies.php @@ -14,6 +14,7 @@ @

+
diff --git a/user_only_media.php b/user_only_media.php index 13cc7bf..c55934c 100644 --- a/user_only_media.php +++ b/user_only_media.php @@ -14,6 +14,7 @@ @

+
diff --git a/version.txt b/version.txt index ac2cdeb..7d2ed7c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.1.3 +2.1.4