mirror of
https://notabug.org/halcyon-suite/halcyon
synced 2025-01-02 21:10:00 +01:00
Added search suggestions,added instance info page,fixed bugs in profile and autocomplete,search for post urls now possible
This commit is contained in:
parent
04ac8d810e
commit
50374458f7
@ -36,6 +36,10 @@ RewriteRule ^whotofollow/?$ who_to_follow\.php [NC,L]
|
|||||||
RewriteBase /direct
|
RewriteBase /direct
|
||||||
RewriteRule ^direct/?$ direct\.php [NC,L]
|
RewriteRule ^direct/?$ direct\.php [NC,L]
|
||||||
|
|
||||||
|
# Instance
|
||||||
|
RewriteBase /instance
|
||||||
|
RewriteRule ^instance/?$ instance\.php [NC,L]
|
||||||
|
|
||||||
# Lists
|
# Lists
|
||||||
RewriteBase /lists
|
RewriteBase /lists
|
||||||
RewriteRule ^lists/?$ lists\.php [NC,L]
|
RewriteRule ^lists/?$ lists\.php [NC,L]
|
||||||
|
@ -63,6 +63,10 @@ r ^/direct/?$
|
|||||||
to direct.php
|
to direct.php
|
||||||
}
|
}
|
||||||
rewrite {
|
rewrite {
|
||||||
|
r ^/instance/?$
|
||||||
|
to instance.php
|
||||||
|
}
|
||||||
|
rewrite {
|
||||||
r ^/lists/?$
|
r ^/lists/?$
|
||||||
to lists.php
|
to lists.php
|
||||||
}
|
}
|
||||||
|
@ -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
|
or read our new wiki pages to install it manually: https://notabug.org/halcyon-suite/halcyon/wiki
|
||||||
|
|
||||||
## Blog
|
## Blog
|
||||||
|
- Release of Version 2.1.6 - Added search suggestions,fixed autocomplete bug,added instance info page,fixed small bug in profile settings,search for posts now supported
|
||||||
- Release of Version 2.1.5 - Added support for filter,added possibility to filter all bots,it's now easier to detect bots
|
- Release of Version 2.1.5 - Added support for filter,added possibility to filter all bots,it's now easier to detect bots
|
||||||
- Release of Version 2.1.4 - Added custom profile fields,verified links,custom profile link settings and improved regular expressions for links
|
- Release of Version 2.1.4 - Added custom profile fields,verified links,custom profile link settings and improved regular expressions for links
|
||||||
- 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.3 - Added a autocomplete feature for usernames,hashtags and emojis,fixed a bug in the emoji picker (didn't open sometimes)
|
||||||
|
@ -358,6 +358,21 @@ color:#fff;
|
|||||||
color:#fff;
|
color:#fff;
|
||||||
background-color:#189EFC;
|
background-color:#189EFC;
|
||||||
}
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions {
|
||||||
|
background-color:#243447;
|
||||||
|
box-shadow:.5px .5px 3px rgba(0,0,0,0.26);
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions::before {
|
||||||
|
background-color:#243447;
|
||||||
|
border:.5px solid rgba(0,0,0,.26);
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box h3,
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:hover .un {
|
||||||
|
color:#FFFFFF !important;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:hover .un {
|
||||||
|
color:#66757F;
|
||||||
|
}
|
||||||
#main .profile_nav_wrap {
|
#main .profile_nav_wrap {
|
||||||
background-color:#1b2836;
|
background-color:#1b2836;
|
||||||
box-shadow:0 1px 3px 0 rgba(0,0,0,0.25);
|
box-shadow:0 1px 3px 0 rgba(0,0,0,0.25);
|
||||||
@ -594,3 +609,6 @@ color:#FFF;
|
|||||||
.hoverLi h3,.hoverLi .un {
|
.hoverLi h3,.hoverLi .un {
|
||||||
color:#FFF !important;
|
color:#FFF !important;
|
||||||
}
|
}
|
||||||
|
.instance_field {
|
||||||
|
border:1px solid #000000;
|
||||||
|
}
|
||||||
|
@ -1690,6 +1690,96 @@ background-color: #189EFC;
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
cursor: pointer;
|
||||||
|
top: 50px;
|
||||||
|
width: 320px;
|
||||||
|
font-size: 12px;
|
||||||
|
border-radius: 3px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0.5px 0.5px 3px rgba(0,0,0,0.26);
|
||||||
|
margin-left:50px
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions::before {
|
||||||
|
display: block;
|
||||||
|
content: "";
|
||||||
|
z-index: -1;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
position: absolute;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
top: -5px;
|
||||||
|
left: 8px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 0.5px solid rgba(0,0,0,.26);
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box {
|
||||||
|
margin-bottom:0;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:hover {
|
||||||
|
background-color:#189EFC;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:hover h3,
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:hover .un {
|
||||||
|
color:#FFFFFF !important;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:first-child {
|
||||||
|
border-top-left-radius:3px;
|
||||||
|
border-top-right-radius:3px;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:last-child {
|
||||||
|
border-bottom-left-radius:3px;
|
||||||
|
border-bottom-right-radius:3px;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li .icon_box img {
|
||||||
|
margin-left:12px;
|
||||||
|
margin-top:8px;
|
||||||
|
width:32px;
|
||||||
|
height:32px;
|
||||||
|
border-radius:5px;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li .icon_box img.emoji {
|
||||||
|
border-radius:0;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li h3 {
|
||||||
|
font-size:16px;
|
||||||
|
}
|
||||||
|
/*#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul {
|
||||||
|
margin: 0 -21px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul::after {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
margin-top: 8px;
|
||||||
|
border-bottom: 1px solid #E6ECF0;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul:last-child::after {
|
||||||
|
border-bottom: 0px solid #E6ECF0;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li a .display_name {
|
||||||
|
display: block;
|
||||||
|
color: #000;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions a {
|
||||||
|
display: block;
|
||||||
|
padding: 8px 21px;
|
||||||
|
}
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions a:hover,
|
||||||
|
#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li a:hover .display_name {
|
||||||
|
background-color: #189EFC;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #fff;
|
||||||
|
}*/
|
||||||
.toot_button {
|
.toot_button {
|
||||||
width: 90px;
|
width: 90px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -2584,3 +2674,13 @@ display:inline;
|
|||||||
.hideDropDown {
|
.hideDropDown {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
.instance_field {
|
||||||
|
width:100%;
|
||||||
|
text-align:center;
|
||||||
|
font-size:40px;
|
||||||
|
font-weight:bold;
|
||||||
|
border:1px solid #E6ECF0;
|
||||||
|
border-radius:5px;
|
||||||
|
padding-top:34px;
|
||||||
|
padding-bottom:35px;
|
||||||
|
}
|
||||||
|
55
assets/js/autocomplete/search.js
Normal file
55
assets/js/autocomplete/search.js
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
function searchlocalfill() {
|
||||||
|
var dropdown = $("<ul>").addClass("account_list");
|
||||||
|
var searchsuggestions = new Array();
|
||||||
|
current_search_history.reverse();
|
||||||
|
for(var i=0;i<current_search_history.length;i++) {
|
||||||
|
if(searchsuggestions.length == 10) break;
|
||||||
|
if(searchsuggestions.indexOf(current_search_history[i]) == -1) {
|
||||||
|
dropdown.append($("<li>").data("value",current_search_history[i]).addClass("account_box").append($("<div>").addClass("icon_box").append($("<span>").addClass("emoji_poss").html("#️⃣").css("float","left").css("font-size","32px")))
|
||||||
|
.append($("<div>").addClass("label_box").append($("<span>").addClass("dn").append($("<h3>").html("#"+current_search_history[i])))).click(function() {
|
||||||
|
window.location.href = "/search?q="+encodeURIComponent($(this).data("value"));
|
||||||
|
}));
|
||||||
|
searchsuggestions.push(current_search_history[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
current_search_history.reverse();
|
||||||
|
$(".header_search_suggestions").empty().removeClass("invisible").append(dropdown);
|
||||||
|
replace_emoji();
|
||||||
|
}
|
||||||
|
function searchremotefill(text) {
|
||||||
|
if(text == "@") searchlocalfill();
|
||||||
|
else {
|
||||||
|
api.get("search?q="+encodeURIComponent(text)+"&resolve=false&limit=5",function(data) {
|
||||||
|
if(data.hashtags.length == 0 && data.accounts.length == 0) $(".header_search_suggestions").addClass("invisible");
|
||||||
|
else {
|
||||||
|
var dropdown = $("<ul>").addClass("account_list");
|
||||||
|
for(var i=0;i<data.hashtags.length;i++) {
|
||||||
|
if(i == 5) break;
|
||||||
|
dropdown.append($("<li>").data("value",data.hashtags[i]).addClass("account_box").append($("<div>").addClass("icon_box").append($("<span>").addClass("emoji_poss").html("#️⃣").css("float","left").css("font-size","32px")))
|
||||||
|
.append($("<div>").addClass("label_box").append($("<span>").addClass("dn").append($("<h3>").html("#"+data.hashtags[i])))).click(function() {
|
||||||
|
window.location.href = "/search?q="+encodeURIComponent($(this).data("value"));
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
for(var i=0;i<data.accounts.length;i++) {
|
||||||
|
if(i == 5) break;
|
||||||
|
if(data.accounts[i].display_name == "") data.accounts[i].display_name = data.accounts[i].username;
|
||||||
|
for(var a=0;a<data.accounts[i].emojis.length;a++) {
|
||||||
|
data.accounts[i].display_name = data.accounts[i].display_name.replace(new RegExp(":"+data.accounts[i].emojis[a].shortcode+":","g"),"<img src='"+data.accounts[i].emojis[a].url+"' class='emoji'>");
|
||||||
|
}
|
||||||
|
dropdown.append($("<li>").data("value",getRelativeURL(data.accounts[i].url,data.accounts[i].id)).addClass("account_box").append($("<div>").addClass("icon_box").append($("<img>").attr("src",data.accounts[i].avatar).css("float","left")))
|
||||||
|
.append($("<div>").addClass("label_box").css("width","unset").append($("<span>").addClass("dn").append($("<h3>").html(data.accounts[i].display_name).addClass("emoji_poss"))).append($("<span>").addClass("un").html(data.accounts[i].acct))).click(function() {
|
||||||
|
window.location.href = $(this).data("value");
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
$(".header_search_suggestions").empty().removeClass("invisible").append(dropdown);
|
||||||
|
replace_emoji();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function searchredirect(text) {
|
||||||
|
if(text[0] == "@") window.location.href = "/search/users?q="+encodeURIComponent(text.substr(1));
|
||||||
|
else if(text[0] == "#") window.location.href = "/search?q="+encodeURIComponent(text.substr(1));
|
||||||
|
else if(text.substr(0,8) == "https://") openStatus(text);
|
||||||
|
else window.location.href = "/search?q="+encodeURIComponent(text);
|
||||||
|
}
|
@ -63,6 +63,10 @@ getDropDown().removeClass('showDropDown').addClass('hideDropDown');
|
|||||||
});
|
});
|
||||||
if(resultname) {
|
if(resultname) {
|
||||||
if(resultname == "acct") {
|
if(resultname == "acct") {
|
||||||
|
if(ele.display_name == "") ele.display_name = ele.username;
|
||||||
|
for(var i=0;i<ele.emojis.length;i++) {
|
||||||
|
ele.display_name = ele.display_name.replace(new RegExp(":"+ele.emojis[i].shortcode+":","g"),"<img src='"+ele.emojis[i].url+"' class='emoji'>");
|
||||||
|
}
|
||||||
$(liNode).data("value",prepend+ele[resultname]+" ");
|
$(liNode).data("value",prepend+ele[resultname]+" ");
|
||||||
$(liNode).addClass("account_box").append($("<div>").addClass("icon_box").append($("<img>").attr("src",ele.avatar).css("float","left")))
|
$(liNode).addClass("account_box").append($("<div>").addClass("icon_box").append($("<img>").attr("src",ele.avatar).css("float","left")))
|
||||||
.append($("<div>").addClass("label_box").append($("<span>").addClass("dn").append($("<h3>").html(ele.display_name).addClass("emoji_poss"))).append($("<span>").addClass("un").html(prepend+ele.acct)));
|
.append($("<div>").addClass("label_box").append($("<span>").addClass("dn").append($("<h3>").html(ele.display_name).addClass("emoji_poss"))).append($("<span>").addClass("un").html(prepend+ele.acct)));
|
||||||
|
@ -232,6 +232,7 @@ current_statuses_count_link = localStorage.getItem("current_statuses_count_link"
|
|||||||
current_following_count_link = localStorage.getItem("current_following_count_link");
|
current_following_count_link = localStorage.getItem("current_following_count_link");
|
||||||
current_followers_count_link = localStorage.getItem("current_followers_count_link");
|
current_followers_count_link = localStorage.getItem("current_followers_count_link");
|
||||||
current_favourites_link = localStorage.getItem("current_favourites_link");
|
current_favourites_link = localStorage.getItem("current_favourites_link");
|
||||||
|
current_search_history = JSON.parse(localStorage.getItem("current_search_history"));
|
||||||
setCurrentProfile();
|
setCurrentProfile();
|
||||||
});
|
});
|
||||||
api.get("accounts/"+current_id+"/following",function(data) {
|
api.get("accounts/"+current_id+"/following",function(data) {
|
||||||
@ -319,6 +320,7 @@ current_instance_charlimit = localStorage.getItem("current_instance_charlimit");
|
|||||||
current_blocked_accts = localStorage.getItem("current_blocked_accts");
|
current_blocked_accts = localStorage.getItem("current_blocked_accts");
|
||||||
current_muted_accts = localStorage.getItem("current_muted_accts");
|
current_muted_accts = localStorage.getItem("current_muted_accts");
|
||||||
current_filters = JSON.parse(localStorage.getItem("current_filters"));
|
current_filters = JSON.parse(localStorage.getItem("current_filters"));
|
||||||
|
current_search_history = JSON.parse(localStorage.getItem("current_search_history"));
|
||||||
$(function() {setCurrentProfile()});
|
$(function() {setCurrentProfile()});
|
||||||
}
|
}
|
||||||
function setCurrentProfile() {
|
function setCurrentProfile() {
|
||||||
|
@ -71,15 +71,10 @@ $('#js-settings_nav_profile').toggleClass('view');
|
|||||||
$(function() {
|
$(function() {
|
||||||
api.get("accounts/verify_credentials",function(AccountObj) {
|
api.get("accounts/verify_credentials",function(AccountObj) {
|
||||||
$(".display_name_wrap input[name='display_name']").val(AccountObj["display_name"]);
|
$(".display_name_wrap input[name='display_name']").val(AccountObj["display_name"]);
|
||||||
if(AccountObj["source"]["note"].length != 0) {
|
if(AccountObj["source"]["note"].length != 0) $(".about_me_wrap textarea[name='about_me']").val(AccountObj["source"]["note"]);
|
||||||
$(".about_me_wrap textarea[name='about_me']").val(AccountObj["source"]["note"]);
|
else if(AccountObj["note"] == "<p></p>") $(".about_me_wrap textarea[name='about_me']").val("");
|
||||||
}
|
else $(".about_me_wrap textarea[name='about_me']").val(AccountObj["note"]);
|
||||||
else {
|
if(AccountObj["locked"] == true) $("#setting_lock_account")[0].checked = true;
|
||||||
$(".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) {
|
if(AccountObj.source && AccountObj.source.fields) {
|
||||||
for(var i=0;i<AccountObj.source.fields.length;i++) {
|
for(var i=0;i<AccountObj.source.fields.length;i++) {
|
||||||
$("#setting_field_"+i+"_name").val(AccountObj.source.fields[i].name);
|
$("#setting_field_"+i+"_name").val(AccountObj.source.fields[i].name);
|
||||||
|
@ -1004,6 +1004,29 @@ $(`<div class="profile_recent_images_item media_attachment" otype="image" sid="$
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
function setInstance() {
|
||||||
|
api.get("instance",function(data) {
|
||||||
|
$("#instance_title").html(data.title);
|
||||||
|
$("#instance_description").html(data.description);
|
||||||
|
$("#instance_thumbnail").attr("src",data.thumbnail);
|
||||||
|
$("#js-follows_profile").append(follows_template(data.contact_account));
|
||||||
|
api.get('accounts/relationships',[{name:'id',data:data.contact_account.id}],function(RelationshipsObj) {
|
||||||
|
if(RelationshipsObj[0].following) {
|
||||||
|
const button = $('#js-follows_profile .follow_button[mid="'+RelationshipsObj[0].id+'"]');
|
||||||
|
button.removeClass("follow_button");
|
||||||
|
button.addClass("following_button");
|
||||||
|
button.children("span").text(__('Following'));
|
||||||
|
button.children("i").removeClass("fa-user-plus").addClass("fa-user-times");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#instance_users").text(data.stats.user_count);
|
||||||
|
$("#instance_posts").text(data.stats.status_count);
|
||||||
|
$("#instance_domains").text(data.stats.domain_count);
|
||||||
|
$("#instance_version").text(data.version);
|
||||||
|
$("#instance_contact").attr("href","mailto:"+data.email).text(data.email);
|
||||||
|
$("#js-timeline_footer").remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
function badges_update(){
|
function badges_update(){
|
||||||
let current_count = Number(localStorage.getItem("notification_count"));
|
let current_count = Number(localStorage.getItem("notification_count"));
|
||||||
if ( current_count ) {
|
if ( current_count ) {
|
||||||
@ -2054,18 +2077,31 @@ history.pushState(null, null, current_file);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
$(function() {
|
$(function() {
|
||||||
$("#enable_follow").click(function() {
|
$("#enable_follow").click(function() {
|
||||||
localStorage.setItem("setting_who_to_follow","true");
|
localStorage.setItem("setting_who_to_follow","true");
|
||||||
setWhoToFollow(true);
|
setWhoToFollow(true);
|
||||||
});
|
});
|
||||||
})
|
$("#search_form").focus(function() {
|
||||||
$(function() {
|
if($("#search_form").val() == "") searchlocalfill();
|
||||||
|
else searchremotefill($("#search_form").val());
|
||||||
|
$(".header_search_suggestions").removeClass("invisible");
|
||||||
|
}).keyup(function() {
|
||||||
|
if($("#search_form").val() == "") searchlocalfill();
|
||||||
|
else searchremotefill($("#search_form").val());
|
||||||
|
});
|
||||||
|
$(document).click(function(e) {
|
||||||
|
if(!$(e.target).closest('.header_search_suggestions').length && !$(e.target).closest('#search_form').length) $(".header_search_suggestions").addClass("invisible");
|
||||||
|
});
|
||||||
|
$(".search_form").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
searchredirect($("#search_form").val());
|
||||||
|
});
|
||||||
shortcut.add("n",function() {
|
shortcut.add("n",function() {
|
||||||
$("#creat_status").click();
|
$("#creat_status").click();
|
||||||
},{
|
},{
|
||||||
"disable_in_input":true,
|
"disable_in_input":true,
|
||||||
});
|
});
|
||||||
shortcut.add("/",function() {
|
shortcut.add("/",function() {
|
||||||
$("#search_form").focus();
|
$("#search_form").focus();
|
||||||
|
@ -25,8 +25,6 @@ if($_SERVER["REQUEST_URI"] == "/settings/filters") include dirname(__FILE__).('/
|
|||||||
setOverlayStatus('<?php echo $_GET['status']; ?>');
|
setOverlayStatus('<?php echo $_GET['status']; ?>');
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
badges_update();
|
badges_update();
|
||||||
$('.footer_widget_about').attr('href','https://'+current_instance+'/about');
|
|
||||||
$('.footer_widget_instance').attr('href','https://'+current_instance+'/about/more');
|
|
||||||
$('.footer_widget_terms').attr('href','https://'+current_instance+'/terms');
|
$('.footer_widget_terms').attr('href','https://'+current_instance+'/terms');
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -30,6 +30,7 @@ echo '<link rel="stylesheet" href="/assets/css/dark.css" media="all">';
|
|||||||
<script src="/assets/js/emojipicker/emojipicker.js"></script>
|
<script src="/assets/js/emojipicker/emojipicker.js"></script>
|
||||||
<script src="/assets/js/halcyon/halcyonTemplates.js"></script>
|
<script src="/assets/js/halcyon/halcyonTemplates.js"></script>
|
||||||
<script src="/assets/js/halcyon/halcyonUI.js"></script>
|
<script src="/assets/js/halcyon/halcyonUI.js"></script>
|
||||||
|
<script src="/assets/js/autocomplete/search.js"></script>
|
||||||
<script src="/assets/js/pomo/pomo.js"></script>
|
<script src="/assets/js/pomo/pomo.js"></script>
|
||||||
<script src="/assets/js/twemoji/twemoji.min.js"></script>
|
<script src="/assets/js/twemoji/twemoji.min.js"></script>
|
||||||
<script src="/assets/js/clipboard.js/clipboard.min.js"></script>
|
<script src="/assets/js/clipboard.js/clipboard.min.js"></script>
|
||||||
@ -108,15 +109,16 @@ resetApp();
|
|||||||
</nav>
|
</nav>
|
||||||
<nav class="header_right_box">
|
<nav class="header_right_box">
|
||||||
<ul class="header_nav_list">
|
<ul class="header_nav_list">
|
||||||
<li class="header_nav_item serch_form_wrap">
|
<li class="header_nav_item search_form_wrap">
|
||||||
<form class="search_form" action="/search" method="GET">
|
<form class="search_form" action="/search" method="GET">
|
||||||
<input id="search_form" class="search_form_input" placeholder="<?=_('Search Mastodon')?>" type="text" name="q" accesskey="/">
|
<input id="search_form" class="search_form_input" placeholder="<?=_('Search Mastodon')?>" type="text" name="q" accesskey="/" autocomplete="off">
|
||||||
<span class="search_form_submit">
|
<span class="search_form_submit">
|
||||||
<button type="submit">
|
<button type="submit">
|
||||||
<i class="fa fa-fw fa-search"></i>
|
<i class="fa fa-fw fa-search"></i>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</form>
|
</form>
|
||||||
|
<nav class="header_search_suggestions invisible"></nav>
|
||||||
</li>
|
</li>
|
||||||
<li class="header_nav_item my_account_wrap">
|
<li class="header_nav_item my_account_wrap">
|
||||||
<button class="header_account_avatar">
|
<button class="header_account_avatar">
|
||||||
|
65
instance.php
Normal file
65
instance.php
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?php include ('header.php'); ?>
|
||||||
|
<main id="main">
|
||||||
|
<div class="article_wrap">
|
||||||
|
<aside class="left_column">
|
||||||
|
<?php include dirname(__FILE__).('/widgets/side_current_user.php'); ?>
|
||||||
|
<?php include dirname(__FILE__).('/widgets/side_footer.php'); ?>
|
||||||
|
</aside>
|
||||||
|
<article class="center_column">
|
||||||
|
<header class="timeline_header">
|
||||||
|
<ul class="header_items">
|
||||||
|
<li class="item toots view" id="instance_title"></li>
|
||||||
|
</ul>
|
||||||
|
</header>
|
||||||
|
<div class="timeline">
|
||||||
|
<div id="instance_description" style="margin:10px"></div>
|
||||||
|
<img id="instance_thumbnail" style="width:100%">
|
||||||
|
<div id="instance_information" style="margin:10px">
|
||||||
|
<div id="js-follows_profile" style="width:290px;float:left">
|
||||||
|
<div style="width:100%">
|
||||||
|
<center style="margin:5px"><?=_("Administrated by")?></center>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="float:left;width:calc(100% - 290px)">
|
||||||
|
<div style="width:32%;float:left;margin-right:6px">
|
||||||
|
<center style="margin:5px"><?=_("Users")?></center>
|
||||||
|
<div class="instance_field" id="instance_users"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:32%;float:left;margin-right:6px">
|
||||||
|
<center style="margin:5px"><?=_("Toots")?></center>
|
||||||
|
<div class="instance_field" id="instance_posts"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:32%;float:left">
|
||||||
|
<center style="margin:5px"><?=_("Connections")?></center>
|
||||||
|
<div class="instance_field" id="instance_domains"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="float:left;width:calc(100% - 290px)">
|
||||||
|
<div style="width:32%;float:left;margin-right:6px">
|
||||||
|
<center style="margin:5px"><?=_("Version")?></center>
|
||||||
|
<div class="instance_field" id="instance_version"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:calc(66% - 5px);float:left">
|
||||||
|
<center style="margin:5px"><?=_("Contact")?></center>
|
||||||
|
<div class="instance_field" style="padding-top:21px;padding-bottom:22px">
|
||||||
|
<i class="fa fa-envelope"></i>
|
||||||
|
<div style="margin-top:-20px">
|
||||||
|
<a id="instance_contact" style="font-size:16px"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="visibility:hidden">-</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<footer id="js-timeline_footer" class="timeline_footer">
|
||||||
|
<i id="savestate" class="fa fa-spin fa-circle-o-notch" aria-hidden="true"></i>
|
||||||
|
</footer>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<script>
|
||||||
|
setInstance();
|
||||||
|
$('title').text('Halcyon / Instance');
|
||||||
|
</script>
|
||||||
|
<?php include ('footer.php'); ?>
|
@ -31,6 +31,7 @@ echo "
|
|||||||
localStorage.setItem('current_id','$account_id');
|
localStorage.setItem('current_id','$account_id');
|
||||||
localStorage.setItem('current_instance','$domain');
|
localStorage.setItem('current_instance','$domain');
|
||||||
localStorage.setItem('current_authtoken', '$access_token');
|
localStorage.setItem('current_authtoken', '$access_token');
|
||||||
|
localStorage.setItem('current_search_history', '[]');
|
||||||
localStorage.setItem('setting_post_stream', 'auto');
|
localStorage.setItem('setting_post_stream', 'auto');
|
||||||
localStorage.setItem('setting_post_privacy', 'public');
|
localStorage.setItem('setting_post_privacy', 'public');
|
||||||
localStorage.setItem('setting_local_instance', 'default');
|
localStorage.setItem('setting_local_instance', 'default');
|
||||||
|
@ -54,6 +54,9 @@ rewrite ^/whotofollow/?$ /who_to_follow.php break;
|
|||||||
# Direct
|
# Direct
|
||||||
rewrite ^/direct/?$ /direct.php break;
|
rewrite ^/direct/?$ /direct.php break;
|
||||||
|
|
||||||
|
# Instance
|
||||||
|
rewrite ^/instance/?$ /instance.php break;
|
||||||
|
|
||||||
# Lists
|
# Lists
|
||||||
rewrite ^/lists/?$ /lists.php break;
|
rewrite ^/lists/?$ /lists.php break;
|
||||||
rewrite ^/lists/(\d+)/?$ /lists_view.php?id=$1 break;
|
rewrite ^/lists/(\d+)/?$ /lists_view.php?id=$1 break;
|
||||||
|
@ -33,12 +33,18 @@ current_file = location.pathname+location.search;
|
|||||||
$(function() {
|
$(function() {
|
||||||
var query = "<?= htmlspecialchars((string)filter_input(INPUT_GET, 'q'), ENT_QUOTES) ?>";
|
var query = "<?= htmlspecialchars((string)filter_input(INPUT_GET, 'q'), ENT_QUOTES) ?>";
|
||||||
if(query[0] == "@") {
|
if(query[0] == "@") {
|
||||||
window.location.href = "/search/users/?q="+query.substr(1);
|
window.location.href = "/search/users?q="+query.substr(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(query[0] == "#") {
|
if(query[0] == "#") {
|
||||||
query = query.substr(1);
|
query = query.substr(1);
|
||||||
}
|
}
|
||||||
|
if(query.length > 0) {
|
||||||
|
current_search_history.push(query);
|
||||||
|
if(current_search_history.length > 99) {
|
||||||
|
current_search_history.shift();
|
||||||
|
}
|
||||||
|
localStorage.current_search_history = JSON.stringify(current_search_history);
|
||||||
$('#main > .article_wrap > .center_column > .timeline_header > .header_items > .item').text("#"+query);
|
$('#main > .article_wrap > .center_column > .timeline_header > .header_items > .item').text("#"+query);
|
||||||
$('#js-header_title_box > h1').text(query);
|
$('#js-header_title_box > h1').text(query);
|
||||||
$('title').text('#'+query+' - Halcyon Search');
|
$('title').text('#'+query+' - Halcyon Search');
|
||||||
@ -53,6 +59,10 @@ setTimeline("timelines/tag/"+query,[{name:"local",data:"true"}]);
|
|||||||
}
|
}
|
||||||
replace_emoji();
|
replace_emoji();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
history.back();
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
window.location.href = "/";
|
window.location.href = "/";
|
||||||
|
@ -19,12 +19,17 @@
|
|||||||
current_file = location.pathname+location.search;
|
current_file = location.pathname+location.search;
|
||||||
<?php if(isset($_GET['q'])): ?>
|
<?php if(isset($_GET['q'])): ?>
|
||||||
const query = "<?= htmlspecialchars((string)filter_input(INPUT_GET, 'q'), ENT_QUOTES) ?>";
|
const query = "<?= htmlspecialchars((string)filter_input(INPUT_GET, 'q'), ENT_QUOTES) ?>";
|
||||||
|
if(query.length > 0) {
|
||||||
$('title').text(query+' - Halcyon Search');
|
$('title').text(query+' - Halcyon Search');
|
||||||
$('#js-header_title_box > h1').text(query);
|
$('#js-header_title_box > h1').text(query);
|
||||||
$('#js-search_nav_peoples').toggleClass('view');
|
$('#js-search_nav_peoples').toggleClass('view');
|
||||||
$('#js-search_nav_toots a ').attr('href','/search'+location.search);
|
$('#js-search_nav_toots a ').attr('href','/search'+location.search);
|
||||||
$('#js-search_nav_peoples a ').attr('href','/search/users'+location.search);
|
$('#js-search_nav_peoples a ').attr('href','/search/users'+location.search);
|
||||||
setUserSearch(query);
|
setUserSearch(query);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
history.go(-2);
|
||||||
|
}
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</script>
|
</script>
|
||||||
<?php include ('footer.php'); ?>
|
<?php include ('footer.php'); ?>
|
||||||
|
@ -1 +1 @@
|
|||||||
2.1.5
|
2.1.6
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<footer class="side_widgets_footer side_widget"><ul>
|
<footer class="side_widgets_footer side_widget"><ul>
|
||||||
<li><?=_('Halcyon for')?> <a href="https://github.com/tootsuite/mastodon">Mastodon</a> <?=_('and')?> <a href="https://git.pleroma.social/pleroma/pleroma">Pleroma</a></li>
|
<li><?=_('Halcyon for')?> <a href="https://github.com/tootsuite/mastodon">Mastodon</a> <?=_('and')?> <a href="https://git.pleroma.social/pleroma/pleroma">Pleroma</a></li>
|
||||||
<li><a class="footer_widget_about"><?=_('About')?></a></li>
|
<li><a href="/instance"><?=_('About')?></a></li>
|
||||||
<li><a class="footer_widget_terms"><?=_('Terms')?></a></li>
|
<li><a class="footer_widget_terms"><?=_('Terms')?></a></li>
|
||||||
<li><a href="https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/Apps.md"><?=_('Apps')?></a></li>
|
<li><a href="https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/Apps.md"><?=_('Apps')?></a></li>
|
||||||
<li><a href="https://notabug.org/halcyon-suite/halcyon"><?=_('Source code')?></a></li>
|
<li><a href="https://notabug.org/halcyon-suite/halcyon"><?=_('Source code')?></a></li>
|
||||||
@ -8,7 +8,7 @@
|
|||||||
<li><a href="/privacy"><?=_('Privacy policy')?></a></li>
|
<li><a href="/privacy"><?=_('Privacy policy')?></a></li>
|
||||||
<?php
|
<?php
|
||||||
if(file_exists("config/imprint.txt")) {
|
if(file_exists("config/imprint.txt")) {
|
||||||
echo "<li><a href='/imprint'>Imprint</a></li>";
|
echo "<li><a href='/imprint'>"._("Imprint")."</a></li>";
|
||||||
}
|
}
|
||||||
if(file_exists("config/footerlinks.txt")) {
|
if(file_exists("config/footerlinks.txt")) {
|
||||||
$footerlinks = json_decode(file_get_contents("config/footerlinks.txt"));
|
$footerlinks = json_decode(file_get_contents("config/footerlinks.txt"));
|
||||||
|
Loading…
Reference in New Issue
Block a user