Added full who to follow page and some bug fixes
This commit is contained in:
parent
6909e5324a
commit
eb8323853b
|
@ -26,6 +26,10 @@ RewriteRule ^federated/?$ federated\.php [NC,L]
|
|||
RewriteBase /notifications
|
||||
RewriteRule ^notifications/?$ notifications\.php [NC,L]
|
||||
|
||||
# Who to follow
|
||||
RewriteBase /whotofollow
|
||||
RewriteRule ^whotofollow/?$ who_to_follow\.php [NC,L]
|
||||
|
||||
# Search
|
||||
RewriteBase /search
|
||||
RewriteRule ^search/?$ search_hash_tag\.php [NC,L,QSA]
|
||||
|
|
|
@ -47,6 +47,10 @@ r ^/notifications/?$
|
|||
to /notifications.php
|
||||
}
|
||||
rewrite {
|
||||
r ^/whotofollow/?$
|
||||
to /who_to_follow.php
|
||||
}
|
||||
rewrite {
|
||||
r ^/search/?$
|
||||
to /search_hash_tag.php
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@ 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://social.dev-wiki.de - 1.1.6
|
||||
- https://halcyon.toromino.de - 1.2.0
|
||||
- https://itter.photog.social - 1.2.0
|
||||
- https://social.dev-wiki.de - 1.2.1
|
||||
- https://halcyon.toromino.de - 1.2.1
|
||||
- https://itter.photog.social - 1.2.1
|
||||
- https://halcyon.bka.li - 1.1.7
|
||||
- https://halcyon.tilde.team - 1.1.7
|
||||
- https://halcyon.distsn.org - 1.1.6
|
||||
|
@ -21,6 +21,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.1 - New who to follow page with more recommendations,bugfix at search,profiles now ignore "show replies" setting,small login page changes
|
||||
- [Release of Version 1.2.0 - The next big step and a view into future](https://nikisoft.myblog.de/nikisoft/art/11626391/Halcyon-1-2-0-The-next-big-step-and-a-view-into-future)
|
||||
- [Our move from Github to NotABug](https://nikisoft.myblog.de/nikisoft/art/11626163/Our-move-from-Github-to-NotABug)
|
||||
- Release of Version 1.1.7 - Fixed some bugs in compatibility with Pleroma,text fields now autoresizable,stopped undefined socket tries on profile pages
|
||||
|
|
|
@ -1277,20 +1277,20 @@ color: #66757F;
|
|||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
}
|
||||
.side_widget.stream_options .form_title{
|
||||
.side_widget.with_button .form_title{
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
.side_widget.stream_options .form_title h2 {
|
||||
margin-bottom: 0;
|
||||
.side_widget.with_button .form_title h2 {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.side_widget.stream_options .form_title button {
|
||||
.side_widget.with_button .form_title .headerbtn {
|
||||
cursor: pointer;
|
||||
flex-grow: 1;
|
||||
font-size: 12px;
|
||||
color: #189EFC;
|
||||
text-align: right;
|
||||
text-decoration:none;
|
||||
}
|
||||
.side_widget form.pulldown_form {
|
||||
overflow: hidden;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,8 +152,10 @@ $('.header_my_account_nav').addClass('invisible');
|
|||
$('.expand_menu').addClass('invisible');
|
||||
});
|
||||
});
|
||||
function setTimeline(level,load_options) {
|
||||
function setTimeline(level,load_options,show_replies) {
|
||||
if(show_replies === undefined) {
|
||||
var show_replies = localStorage.setting_show_replies;
|
||||
}
|
||||
let isSyncing = true;
|
||||
if(load_options === undefined) {
|
||||
var load_options = [];
|
||||
|
|
|
@ -65,7 +65,7 @@ location.href = "/";
|
|||
<span><i class="fa fa-newspaper-o" aria-hidden="true"></i>News</span>
|
||||
</li>
|
||||
</a>
|
||||
<a href="https://github.com/halcyon-suite/halcyon" class="no-underline">
|
||||
<a href="https://notabug.org/halcyon-suite/halcyon" class="no-underline">
|
||||
<li>
|
||||
<span><i class="fa fa-code" aria-hidden="true"></i>Source</span>
|
||||
</li>
|
||||
|
@ -112,7 +112,7 @@ or <a href="https://joinmastodon.org/">create an account</a>
|
|||
<label class="login_form_agree_check disallow_select pointer">
|
||||
<i class="fa fa-check-square-o" aria-hidden="true"></i>
|
||||
I agree with the <a href="/terms">Terms</a>
|
||||
<input id="agree" type="checkbox" required checked class="invisible"/>
|
||||
<input id="agree" type="checkbox" required checked class="invisible">
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -121,26 +121,26 @@ I agree with the <a href="/terms">Terms</a>
|
|||
<article id="article">
|
||||
<h2>What is Halcyon</h2>
|
||||
<p>
|
||||
Halcyon is standard <span style="font-weight: bold">Twitter like client</span> of Mastodon, And you can use it just by login to your instance. Let's Toot like a tweet.
|
||||
Halcyon is a webclient for <a href="https://joinmastodon.org">Mastodon</a> and <a href="https://pleroma.social">Pleroma</a> which aims to recreate the simple and beautiful user interface of Twitter while keeping all advantages of decentral networks in focus.
|
||||
</p>
|
||||
<div class="image_wrap">
|
||||
<ul>
|
||||
<li><img src="/login/assets/images/preview2.png" alt="halcyon_screenshot"/></li>
|
||||
<li><img src="/login/assets/images/preview1.png" alt="halcyon_screenshot"/></li>
|
||||
<li><img src="/login/assets/images/preview0.png" alt="halcyon_screenshot"/></li>
|
||||
<li><img src="/login/assets/images/preview2.png" alt="halcyon_screenshot"></li>
|
||||
<li><img src="/login/assets/images/preview1.png" alt="halcyon_screenshot"></li>
|
||||
<li><img src="/login/assets/images/preview0.png" alt="halcyon_screenshot"></li>
|
||||
</ul>
|
||||
<button class="prev_button switch_button"><i class="fa fa-angle-left" aria-hidden="true"></i></button>
|
||||
<button class="next_button switch_button"><i class="fa fa-angle-right" aria-hidden="true"></i></button>
|
||||
</div>
|
||||
<h2>Contact / Feedback</h2>
|
||||
<p>
|
||||
Mastodon: <a href="https://social.csswg.org/@halcyon" target="_blank">ï¼ halcyon@social.csswg.org</a><br />
|
||||
Email: <a href="http://www.nikisoft.one/contact.php" target="_blank">Use my contact form</a><br />
|
||||
Github: <a href="https://github.com/halcyon-suite/halcyon" target="_blank">halcyon-suite/halcyon</a>
|
||||
Mastodon: <a href="https://social.csswg.org/@halcyon" target="_blank">@halcyon@social.csswg.org</a><br/>
|
||||
Email: <a href="http://www.nikisoft.one/contact.php" target="_blank">Use my contact form</a><br/>
|
||||
Git repository: <a href="https://notabug.org/halcyon-suite/halcyon" target="_blank">halcyon-suite/halcyon</a>
|
||||
</p>
|
||||
<h2>Help us</h2>
|
||||
<p>
|
||||
Bitcoin: 1D6GThQqHQYnruKYrKyW9JC86ZGWxjt1hK<br />
|
||||
Bitcoin: 1D6GThQqHQYnruKYrKyW9JC86ZGWxjt1hK<br/>
|
||||
</p>
|
||||
</article>
|
||||
</main>
|
||||
|
@ -173,7 +173,7 @@ window.cookieconsent.initialise({
|
|||
<script>
|
||||
$(function() {
|
||||
var cause = "<?= htmlspecialchars((string)filter_input(INPUT_GET, 'cause'), ENT_QUOTES) ?>";
|
||||
if ( cause === "domain" ) {
|
||||
if(cause === "domain") {
|
||||
$('.login_form_main').addClass('error');
|
||||
$('.session_aleart').removeClass('invisible');
|
||||
$('.session_aleart > span').text('This instance does not exsist.');
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<span><i class="fa fa-newspaper-o" aria-hidden="true"></i>News</span>
|
||||
</li>
|
||||
</a>
|
||||
<a href="https://github.com/halcyon-suite/halcyon" class="no-underline">
|
||||
<a href="https://notabug.org/halcyon-suite/halcyon" class="no-underline">
|
||||
<li>
|
||||
<span><i class="fa fa-code" aria-hidden="true"></i>Source</span>
|
||||
</li>
|
||||
|
|
|
@ -31,6 +31,7 @@ rewrite ^/terms/?$ /login/terms.php last;
|
|||
rewrite ^/local/?$ /local.php last;
|
||||
rewrite ^/federated/?$ /federated.php last;
|
||||
rewrite ^/notifications/?$ /notifications.php last;
|
||||
rewrite ^/whotofollow/?$ /who_to_follow.php last;
|
||||
rewrite ^/search/?$ /search_hash_tag.php last;
|
||||
rewrite ^/search/users/?$ /search_user.php last;
|
||||
rewrite ^/settings/?$ /settings_general.php last;
|
||||
|
|
|
@ -31,7 +31,14 @@ View <span></span> new Toots
|
|||
current_file = location.pathname+location.search;
|
||||
<?php if(isset($_GET['q'])) { ?>
|
||||
$(function() {
|
||||
const query = "<?= htmlspecialchars((string)filter_input(INPUT_GET, 'q'), ENT_QUOTES) ?>";
|
||||
var query = "<?= htmlspecialchars((string)filter_input(INPUT_GET, 'q'), ENT_QUOTES) ?>";
|
||||
if(query[0] == "@") {
|
||||
window.location.href = "/search/users/?q="+query.substr(1);
|
||||
}
|
||||
else {
|
||||
if(query[0] == "#") {
|
||||
query = query.substr(1);
|
||||
}
|
||||
$('#main > .article_wrap > .center_column > .timeline_header > .header_items > .item').text("#"+query);
|
||||
$('#js-header_title_box > h1').text(query);
|
||||
$('title').text('#'+query+' - Halcyon Search');
|
||||
|
@ -45,6 +52,7 @@ else if(localStorage.getItem("setting_search_filter") === "local") {
|
|||
setTimeline("timelines/tag/"+query,[{name:"local",data:"true"}]);
|
||||
}
|
||||
replace_emoji();
|
||||
}
|
||||
});
|
||||
<?php } else { ?>
|
||||
window.location.href = "/";
|
||||
|
|
4
user.php
4
user.php
|
@ -73,7 +73,7 @@ api.get('accounts/'+account_id, function(userprofile) {
|
|||
if ( userprofile !== null ) {
|
||||
$('title').text(replaced_emoji_return(userprofile.display_name)+' (@'+userprofile.acct+') | Halcyon');
|
||||
setAccount(userprofile);
|
||||
setTimeline("accounts/"+userprofile.id+"/statuses",[{name:'exclude_replies',data:'true'}]);
|
||||
setTimeline("accounts/"+userprofile.id+"/statuses",[{name:'exclude_replies',data:'true'}],"false");
|
||||
setRecentImages(userprofile.id)
|
||||
} else {
|
||||
location.href = "/404.php";
|
||||
|
@ -94,7 +94,7 @@ location.href = "/404.php";
|
|||
} else if ("@"+search.accounts[0].acct === query || "@"+search.accounts[0].acct+"@"+localStorage.current_instance === query) {
|
||||
$('title').text(replaced_emoji_return(search.accounts[0].display_name)+' (@'+search.accounts[0].acct+') | Halcyon');
|
||||
setAccount(search.accounts[0]);
|
||||
setTimeline("accounts/"+search.accounts[0].id+"/statuses",[{name:'exclude_replies',data:'true'}]);
|
||||
setTimeline("accounts/"+search.accounts[0].id+"/statuses",[{name:'exclude_replies',data:'true'}],"false");
|
||||
setRecentImages(search.accounts[0].id)
|
||||
} else {
|
||||
location.href = "/404.php";
|
||||
|
|
|
@ -72,7 +72,7 @@ const account_id = <?= htmlspecialchars((string)filter_input(INPUT_GET, 'mid'),
|
|||
api.get('accounts/'+account_id, function(AccountObj) {
|
||||
if ( AccountObj !== null ) {
|
||||
setAccount(AccountObj);
|
||||
setTimeline("accounts/"+AccountObj.id+"/statuses");
|
||||
setTimeline("accounts/"+AccountObj.id+"/statuses",undefined,"true");
|
||||
setRecentImages(AccountObj.id);
|
||||
} else {
|
||||
location.href = "/404.php";
|
||||
|
@ -92,7 +92,7 @@ if ( !search.accounts.length ) {
|
|||
location.href = "/404.php";
|
||||
} else if ("@"+search.accounts[0].acct === query || "@"+search.accounts[0].acct+"@"+localStorage.current_instance === query) {
|
||||
setAccount(search.accounts[0]);
|
||||
setTimeline("accounts/"+search.accounts[0].id+"/statuses");
|
||||
setTimeline("accounts/"+search.accounts[0].id+"/statuses",undefined,"true");
|
||||
setRecentImages(search.accounts[0].id);
|
||||
} else {
|
||||
location.href = "/404.php";
|
||||
|
|
|
@ -72,7 +72,7 @@ const account_id = <?= htmlspecialchars((string)filter_input(INPUT_GET, 'mid'),
|
|||
api.get('accounts/'+account_id, function(AccountObj) {
|
||||
if ( AccountObj !== null ) {
|
||||
setAccount(AccountObj);
|
||||
setTimeline("accounts/"+AccountObj.id+"/statuses",[{name:'only_media',data:'true'}]);
|
||||
setTimeline("accounts/"+AccountObj.id+"/statuses",[{name:'only_media',data:'true'}],"false");
|
||||
setRecentImages(AccountObj.id);
|
||||
} else {
|
||||
location.href = "/404.php";
|
||||
|
@ -92,7 +92,7 @@ if ( !search.accounts.length ) {
|
|||
location.href="/404.php";
|
||||
} else if ("@"+search.accounts[0].acct === query || "@"+search.accounts[0].acct+"@"+localStorage.current_instance === query) {
|
||||
setAccount(search.accounts[0]);
|
||||
setTimeline("accounts/"+search.accounts[0].id+"/statuses",[{name:'only_media',data:'true'}]);
|
||||
setTimeline("accounts/"+search.accounts[0].id+"/statuses",[{name:'only_media',data:'true'}],"false");
|
||||
setRecentImages(search.accounts[0].id);
|
||||
} else {
|
||||
location.href="/404.php";
|
||||
|
|
|
@ -1 +1 @@
|
|||
1.2.0
|
||||
1.2.1
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<?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">
|
||||
<div id="js-follows_profile">
|
||||
</div>
|
||||
<footer id="js-follows_footer">
|
||||
<i class="fa fa-spin fa-circle-o-notch" aria-hidden="true"></i>
|
||||
</footer>
|
||||
</article>
|
||||
</div>
|
||||
</main>
|
||||
<script>
|
||||
$('title').text('Halcyon / Who to follow');
|
||||
var wtfprofiles = JSON.parse(localStorage.who_to_follow);
|
||||
var pcount = 0;
|
||||
var isSyncing = false;
|
||||
function nextprofiles(displayed) {
|
||||
if(wtfprofiles.length - displayed < 30) {
|
||||
fcount = wtfprofiles.length;
|
||||
}
|
||||
else {
|
||||
fcount = 30;
|
||||
}
|
||||
for(i=0;i<fcount;i++) {
|
||||
if(current_following_accts.indexOf(wtfprofiles[displayed+i]) == -1) {
|
||||
api.get('search',[{name:'q',data:"@"+wtfprofiles[displayed+i]},{name:'resolve',data:'true'}], function(search) {
|
||||
follows_template(search.accounts[0]).appendTo("#js-follows_profile");
|
||||
replace_emoji();
|
||||
if(i = 29) {
|
||||
isSyncing = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
nextprofiles(0);
|
||||
$(window).scroll(function () {
|
||||
if($(window).scrollTop()+window.innerHeight >= $(document).height()-700) {
|
||||
if(!isSyncing) {
|
||||
isSyncing = true;
|
||||
pcount++;
|
||||
nextprofiles(pcount*30);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php include ('footer.php'); ?>
|
|
@ -21,8 +21,11 @@ Halcyon needs to connect to an external server to get a list of users which have
|
|||
</center>
|
||||
<div style="height:100px"></div>
|
||||
</div>
|
||||
<div class="side_widget what_to_follow" style="display:none">
|
||||
<div class="side_widget with_button what_to_follow" style="display:none">
|
||||
<div class="form_title">
|
||||
<h2>Who to follow</h2>
|
||||
<a href="/whotofollow" class="headerbtn">MORE</a>
|
||||
</div>
|
||||
<ul class="account_list">
|
||||
<li class="account_box what_to_follow_0">
|
||||
<div class="icon_box">
|
||||
|
|
Loading…
Reference in New Issue