further refinements for #96

This commit is contained in:
Hannes Mannerheim 2015-08-25 14:00:07 +02:00
parent 3a7f8ab84d
commit 88c076ad11
3 changed files with 13 additions and 2 deletions

View File

@ -236,6 +236,7 @@ class QvitterAction extends ApiAction
window.siteLicenseTitle = '<?php print common_config('license', 'title'); ?>';
window.siteLicenseURL = '<?php print common_config('license', 'url'); ?>';
window.customTermsOfUse = <?php print json_encode(QvitterPlugin::settings("customtermsofuse")); ?>;
window.siteLocalOnlyDefaultPath = <?php print (common_config('public', 'localonly') ? 'true' : 'false'); ?>;
// available language files and their last update time
window.availableLanguages = {<?php

View File

@ -827,7 +827,16 @@ function getStreamFromUrl() {
var loc = window.location.href.replace('http://','').replace('https://','').replace(window.siteRootDomain,'');
// default/fallback
var streamToSet = 'statuses/public_timeline.json';
if(window.loggedIn) {
var streamToSet = 'statuses/friends_timeline.json';
}
else if(window.siteLocalOnlyDefaultPath) {
var streamToSet = 'statuses/public_timeline.json';
}
else {
var streamToSet = 'statuses/public_and_external_timeline.json';
}
// main/all, i.e. full network
if (loc == '/main/all') {

View File

@ -677,7 +677,8 @@ function isValidHexColor(maybeValidHexColor) {
function changeDesign(obj) {
// if we're logged out and this is the front page, we use the default design
if(!window.loggedIn && window.currentStream == 'statuses/public_timeline.json') {
if(!window.loggedIn &&
(window.currentStream == 'statuses/public_timeline.json' || window.currentStream == 'statuses/public_and_external_timeline.json')) {
obj.backgroundimage = window.fullUrlToThisQvitterApp + window.siteBackground;
obj.backgroundcolor = window.defaultBackgroundColor;
obj.linkcolor = window.defaultLinkColor;