mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Tons of small styling cleanups. Also fixing refresh throttling.
This commit is contained in:
parent
bffeda9beb
commit
90f746d1ff
9 changed files with 33 additions and 35 deletions
|
@ -185,7 +185,8 @@ class UserSubscription(models.Model):
|
|||
feed = None
|
||||
us = None
|
||||
|
||||
logging.user(user, "~FRAdding URL: ~SB%s (in %s)" % (feed_address, folder))
|
||||
logging.user(user, "~FRAdding URL: ~SB%s (in %s) %s" % (feed_address, folder,
|
||||
"~FCAUTO-ADD" if not auto_active else ""))
|
||||
|
||||
feed = Feed.get_feed_from_url(feed_address)
|
||||
|
||||
|
@ -220,13 +221,9 @@ class UserSubscription(models.Model):
|
|||
user_sub_folders_object.folders = json.encode(user_sub_folders)
|
||||
user_sub_folders_object.save()
|
||||
|
||||
if auto_active:
|
||||
if auto_active or user.profile.is_premium:
|
||||
us.active = True
|
||||
else:
|
||||
feed_count = cls.objects.filter(user=user).count()
|
||||
if feed_count < 64 or user.profile.is_premium:
|
||||
us.active = True
|
||||
us.save()
|
||||
us.save()
|
||||
|
||||
if feed.last_update < datetime.datetime.utcnow() - datetime.timedelta(days=1):
|
||||
feed = feed.update()
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
}
|
||||
|
||||
.NB-stripe-form label.error {
|
||||
width: 200px;
|
||||
width: 100%;
|
||||
margin-left: 150px;
|
||||
text-transform: none;
|
||||
}
|
||||
|
|
|
@ -8211,6 +8211,9 @@ form.opml_import_form input {
|
|||
padding-right: 3px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.NB-profile-badge .NB-profile-badge-blurblog-link {
|
||||
text-transform: none;
|
||||
}
|
||||
.NB-profile-badge-actions {
|
||||
float: right;
|
||||
}
|
||||
|
@ -8369,10 +8372,10 @@ form.opml_import_form input {
|
|||
margin-bottom: 0;
|
||||
}
|
||||
.NB-interaction:hover {
|
||||
background-color: #EFF4FE;
|
||||
background-image: -moz-linear-gradient(top, #EFF4FE, #D3E2FE); /* FF3.6 */
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#EFF4FE), to(#D3E2FE)); /* Saf4+, Chrome */
|
||||
background-image: linear-gradient(top, #EFF4FE, #D3E2FE);
|
||||
background-color: #F3F6FD;
|
||||
background-image: -moz-linear-gradient(top, #F5F7FB, #EBF1FE); /* FF3.6 */
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#F5F7FB), to(#EBF1FE)); /* Saf4+, Chrome */
|
||||
background-image: linear-gradient(top, #F5F7FB, #EBF1FE);
|
||||
border: 1px solid #C3CFE2;
|
||||
border-bottom: 1px solid #B9C5DC;
|
||||
}
|
||||
|
@ -8416,9 +8419,9 @@ form.opml_import_form input {
|
|||
opacity: .9;
|
||||
}
|
||||
.NB-interaction-content {
|
||||
font-size: 13px;
|
||||
padding-top: 6px;
|
||||
line-height: 14px;
|
||||
font-size: 12px;
|
||||
padding-top: 8px;
|
||||
line-height: 16px;
|
||||
color: #808080;
|
||||
}
|
||||
.NB-interaction-username {
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -20,7 +20,7 @@ NEWSBLUR.Models.User = Backbone.Model.extend({
|
|||
},
|
||||
|
||||
blurblog_url: function() {
|
||||
return Inflector.sluggify(this.get('username')) + window.location.host.replace('www.', '');
|
||||
return 'http://' + Inflector.sluggify(this.get('username')) + window.location.host.replace('www.', '');
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -806,20 +806,16 @@
|
|||
'fetched_feeds': 0
|
||||
});
|
||||
|
||||
this.flags['has_unfetched_feeds'] = NEWSBLUR.assets.feeds.has_unfetched_feeds();
|
||||
|
||||
if (this.flags['has_unfetched_feeds']) {
|
||||
var counts = this.model.count_unfetched_feeds();
|
||||
this.counts['unfetched_feeds'] = counts['unfetched_feeds'];
|
||||
this.counts['fetched_feeds'] = counts['fetched_feeds'];
|
||||
var counts = this.model.count_unfetched_feeds();
|
||||
this.counts['unfetched_feeds'] = counts['unfetched_feeds'];
|
||||
this.counts['fetched_feeds'] = counts['fetched_feeds'];
|
||||
|
||||
if (this.counts['unfetched_feeds'] == 0) {
|
||||
this.flags['has_unfetched_feeds'] = false;
|
||||
this.hide_unfetched_feed_progress();
|
||||
} else {
|
||||
this.flags['has_unfetched_feeds'] = true;
|
||||
this.show_unfetched_feed_progress();
|
||||
}
|
||||
if (this.counts['unfetched_feeds'] == 0) {
|
||||
this.flags['has_unfetched_feeds'] = false;
|
||||
this.hide_unfetched_feed_progress();
|
||||
} else {
|
||||
this.flags['has_unfetched_feeds'] = true;
|
||||
this.show_unfetched_feed_progress();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -3579,6 +3575,8 @@
|
|||
if (self.active_feed == feed_id || self.active_feed == new_feed_id) {
|
||||
self.open_feed(new_feed_id, {force: true});
|
||||
}
|
||||
|
||||
self.check_feed_fetch_progress();
|
||||
}, true, new_feed_id, this.show_stories_error);
|
||||
},
|
||||
|
||||
|
@ -4267,11 +4265,9 @@
|
|||
this.locks.unfetched_feed_check = setInterval(_.bind(function() {
|
||||
var unfetched_feeds = NEWSBLUR.assets.unfetched_feeds();
|
||||
if (unfetched_feeds.length) {
|
||||
_.each(unfetched_feeds, _.bind(function(feed) {
|
||||
this.force_instafetch_stories(feed.id);
|
||||
}, this));
|
||||
this.force_instafetch_stories(unfetched_feeds[0].id);
|
||||
}
|
||||
}, this), 60*10*1000);
|
||||
}, this), 60*1*1000);
|
||||
},
|
||||
|
||||
// ==========
|
||||
|
|
|
@ -236,6 +236,8 @@ NEWSBLUR.Views.FeedTitleView = Backbone.View.extend({
|
|||
},
|
||||
|
||||
open_feed_link: function() {
|
||||
if ($('.NB-modal-feedchooser').is(':visible')) return;
|
||||
|
||||
NEWSBLUR.reader.mark_feed_as_read(this.model.id);
|
||||
window.open(this.model.get('feed_link'), '_blank');
|
||||
window.focus();
|
||||
|
|
|
@ -54,7 +54,7 @@ NEWSBLUR.Views.SocialProfileBadge = Backbone.View.extend({
|
|||
'shared ',
|
||||
Inflector.pluralize('story', profile.get('shared_stories_count')),
|
||||
' · ',
|
||||
$.make('a', { href: profile.blurblog_url(), target: "_blank", className: "NB-splash-link" }, profile.blurblog_url())
|
||||
$.make('a', { href: profile.blurblog_url(), target: "_blank", className: "NB-profile-badge-blurblog-link NB-splash-link" }, profile.blurblog_url())
|
||||
]))
|
||||
])
|
||||
])
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% if activity.category == 'feedsub' %}
|
||||
<img class="NB-interaction-photo" src="{{ activity.photo_url }}">
|
||||
<img class="NB-interaction-photo" src="/rss_feeds/icon/{{ activity.feed_id }}">
|
||||
<div class="NB-interaction-date">
|
||||
{{ activity.time_since }} ago
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue