Fixed who to follow,improved settings menu and search bar

This commit is contained in:
nipos 2018-03-27 19:26:03 +02:00
parent 6728c4f853
commit 81c5a00ecf
5 changed files with 44 additions and 14 deletions

View File

@ -6,13 +6,14 @@ A Mastodon web client that looks like Twitter
<img src="https://halcyon.cybre.space/login/assets/images/preview0.png">
## Blog
- Release of Version 1.0.3 - "Who to follow" doesn't show people you already follow anymore and design of preferences and search bar is now much better
- Release of Version 1.0.2 - Fixed a Firefox-only bug and some wrong links, added version info and an annoying cookie notice (sorry, but that's EU law)
- Release of Version 1.0.1 - Two bugfixes
- [Release of Version 1.0.0](http://nikisoft.myblog.de/nikisoft/art/11264555/The-first-new-Halcyon-release-is-on-Github)
## Instances
These instances are publicly accessible and usable by everyone, no matter which Mastodon instance you use.
- https://halcyon.toromino.de - 1.0.2
- https://halcyon.toromino.de - 1.0.3
- https://social.dev-wiki.de - 1.0.1
- https://halcyon.cybre.space - Outdated

View File

@ -1299,17 +1299,28 @@ margin-top: 0px;
transition: 0.13s ease-out;
}
.side_widget form.pulldown_form.view {
height: 240px;
height: auto;
opacity: 1;
margin-top: 16px;
transition: 0.13s ease-out;
}
.side_widget select, .side_widget input {
margin: 8px 0 16px;
padding-left:5px;
width: 100%;
font-size: 14px;
color: #66757F;
box-sizing: border-box;
height:30px;
border:1px solid #E8EEF1;
border-radius:2px;
background-color:#F5F8FA;
outline:0;
}
.side_widget select:active, .side_widget input:focus {
outline:0;
border:1px solid #189EFC;
background-color:transparent;
}
.side_widget .account_box {
display: flex;
@ -1540,11 +1551,13 @@ border-radius: 16px;
border: 1px solid #E8EEF1;
background-color: #F5F8FA;
height: 100%;
transition: 0.15s ease-out;;
transition: 0.15s ease-out;
}
#header .header_nav_wrap .header_right_box .search_form .search_form_input:focus {
background-color: transparent;
transition: 0.15s ease-out;;
transition: 0.15s ease-out;
outline:0;
border:2px solid #189EFC;
}
#header .header_nav_wrap .header_right_box .search_form .search_form_submit {
display: block;

View File

@ -58,27 +58,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;
}
}
@ -150,6 +150,20 @@ current_statuses_count_link= localStorage.getItem("current_statuses_count_link")
current_following_count_link = localStorage.getItem("current_following_count_link");
current_followers_count_link = localStorage.getItem("current_followers_count_link");
current_favourites_link= localStorage.getItem("current_favourites_link");
if(!localStorage.getItem("current_following_ids")) {
current_following_ids = new Array();
api.get("accounts/"+current_id+"/following",function(data) {
followings = new Array();
for(i=0;i<data.length;i++) {
followings.push(data[i].id);
}
localStorage.setItem("current_following_ids",JSON.stringify(followings));
current_following_ids = followings;
});
}
else {
current_following_ids = JSON.parse(localStorage.getItem("current_following_ids"));
}
}
function setCurrentProfile() {
$(".js_current_profile_displayname").text(current_display_name);

View File

@ -151,7 +151,7 @@ $(document).on('click', function(e) {
$('.header_my_account_nav').addClass('invisible');
$('.expand_menu').addClass('invisible');
});
})
});
function mediaattachments_template(status) {
let media_views = "";
if(status.media_attachments[0].remote_url != null) {
@ -215,7 +215,8 @@ if (
status.account.id !== JSON.parse(localStorage.getItem("what_to_follow_0")).id &
status.account.id !== JSON.parse(localStorage.getItem("what_to_follow_1")).id &
status.account.id !== JSON.parse(localStorage.getItem("what_to_follow_2")).id &
status.account.id !== current_id
status.account.id != current_id &
current_following_ids.indexOf(status.account.id) === -1
) {
localStorage.setItem("what_to_follow_"+String(Math.floor(Math.random()*3)), JSON.stringify(status.account) );
}
@ -314,7 +315,8 @@ if (
status.reblog.account.id !== JSON.parse(localStorage.getItem("what_to_follow_0")).id &
status.reblog.account.id !== JSON.parse(localStorage.getItem("what_to_follow_1")).id &
status.reblog.account.id !== JSON.parse(localStorage.getItem("what_to_follow_2")).id &
status.account.id!== current_id
status.reblog.account.id != current_id &
current_following_ids.indexOf(status.reblog.account.id) === -1
) {
localStorage.setItem("what_to_follow_" + String(Math.floor(Math.random()*3)), JSON.stringify(status.reblog.account));
}

View File

@ -1 +1 @@
1.0.2
1.0.3