mirror of
https://github.com/chylex/Nextcloud-News.git
synced 2025-05-12 07:34:05 +02:00
try to fix out of syn issue
This commit is contained in:
parent
71f25d7e8a
commit
ddb0d5020f
@ -609,6 +609,10 @@ app.controller('NavigationController',
|
|||||||
return FeedResource.getUnreadCount();
|
return FeedResource.getUnreadCount();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.isUnread = function () {
|
||||||
|
return this.getUnreadCount() > 0;
|
||||||
|
};
|
||||||
|
|
||||||
this.getFeedUnreadCount = function (feedId) {
|
this.getFeedUnreadCount = function (feedId) {
|
||||||
var feed = FeedResource.getById(feedId);
|
var feed = FeedResource.getById(feedId);
|
||||||
if (feed !== undefined) {
|
if (feed !== undefined) {
|
||||||
@ -618,14 +622,26 @@ app.controller('NavigationController',
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.isFeedUnread = function (feedId) {
|
||||||
|
return this.getFeedUnreadCount(feedId) > 0;
|
||||||
|
};
|
||||||
|
|
||||||
this.getFolderUnreadCount= function (folderId) {
|
this.getFolderUnreadCount= function (folderId) {
|
||||||
return FeedResource.getFolderUnreadCount(folderId);
|
return FeedResource.getFolderUnreadCount(folderId);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.isFolderUnread = function (folderId) {
|
||||||
|
return this.getFolderUnreadCount(folderId) > 0;
|
||||||
|
};
|
||||||
|
|
||||||
this.getStarredCount = function () {
|
this.getStarredCount = function () {
|
||||||
return ItemResource.getStarredCount();
|
return ItemResource.getStarredCount();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.isStarredUnread = function () {
|
||||||
|
return this.getStarredCount() > 0;
|
||||||
|
};
|
||||||
|
|
||||||
this.toggleFolder = function (folderName) {
|
this.toggleFolder = function (folderName) {
|
||||||
FolderResource.toggleOpen(folderName);
|
FolderResource.toggleOpen(folderName);
|
||||||
};
|
};
|
||||||
|
4
js/build/app.min.js
vendored
4
js/build/app.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -63,6 +63,10 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource,
|
|||||||
return FeedResource.getUnreadCount();
|
return FeedResource.getUnreadCount();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.isUnread = function () {
|
||||||
|
return this.getUnreadCount() > 0;
|
||||||
|
};
|
||||||
|
|
||||||
this.getFeedUnreadCount = function (feedId) {
|
this.getFeedUnreadCount = function (feedId) {
|
||||||
var feed = FeedResource.getById(feedId);
|
var feed = FeedResource.getById(feedId);
|
||||||
if (feed !== undefined) {
|
if (feed !== undefined) {
|
||||||
@ -72,14 +76,26 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource,
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.isFeedUnread = function (feedId) {
|
||||||
|
return this.getFeedUnreadCount(feedId) > 0;
|
||||||
|
};
|
||||||
|
|
||||||
this.getFolderUnreadCount= function (folderId) {
|
this.getFolderUnreadCount= function (folderId) {
|
||||||
return FeedResource.getFolderUnreadCount(folderId);
|
return FeedResource.getFolderUnreadCount(folderId);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.isFolderUnread = function (folderId) {
|
||||||
|
return this.getFolderUnreadCount(folderId) > 0;
|
||||||
|
};
|
||||||
|
|
||||||
this.getStarredCount = function () {
|
this.getStarredCount = function () {
|
||||||
return ItemResource.getStarredCount();
|
return ItemResource.getStarredCount();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.isStarredUnread = function () {
|
||||||
|
return this.getStarredCount() > 0;
|
||||||
|
};
|
||||||
|
|
||||||
this.toggleFolder = function (folderName) {
|
this.toggleFolder = function (folderName) {
|
||||||
FolderResource.toggleOpen(folderName);
|
FolderResource.toggleOpen(folderName);
|
||||||
};
|
};
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<li ng-class="{
|
<li ng-class="{
|
||||||
active: Navigation.isFeedActive(feed.id),
|
active: Navigation.isFeedActive(feed.id),
|
||||||
unread: Navigation.getFeedUnreadCount(feed.id) > 0
|
unread: Navigation.isFeedUnread(feed.id)
|
||||||
}"
|
}"
|
||||||
ng-repeat="feed in Navigation.getFeedsOfFolder(<?php p($_['folderId']); ?>)
|
ng-repeat="feed in Navigation.getFeedsOfFolder(<?php p($_['folderId']); ?>)
|
||||||
| orderBy:'title.toLowerCase()' track by feed.url"
|
| orderBy:'title.toLowerCase()' track by feed.url"
|
||||||
ng-show="Navigation.getFeedUnreadCount(feed.id) > 0
|
ng-show="Navigation.isFeedUnread(feed.id)
|
||||||
|| Navigation.isShowAll()
|
|| Navigation.isShowAll()
|
||||||
|| Navigation.isFeedActive(feed.id)
|
|| Navigation.isFeedActive(feed.id)
|
||||||
|| !feed.id"
|
|| !feed.id"
|
||||||
@ -71,7 +71,7 @@
|
|||||||
ng-show="feed.id && !feed.editing && !feed.error && !feed.deleted">
|
ng-show="feed.id && !feed.editing && !feed.error && !feed.deleted">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="app-navigation-entry-utils-counter"
|
<li class="app-navigation-entry-utils-counter"
|
||||||
ng-show="feed.id && Navigation.getFeedUnreadCount(feed.id) > 0"
|
ng-show="feed.id && Navigation.isFeedUnread(feed.id)"
|
||||||
title="{{ Navigation.getFeedUnreadCount(feed.id) }}">
|
title="{{ Navigation.getFeedUnreadCount(feed.id) }}">
|
||||||
{{ Navigation.getFeedUnreadCount(feed.id) |
|
{{ Navigation.getFeedUnreadCount(feed.id) |
|
||||||
unreadCountFormatter }}
|
unreadCountFormatter }}
|
||||||
@ -113,7 +113,7 @@
|
|||||||
title="<?php p($l->t('Delete feed')); ?>">
|
title="<?php p($l->t('Delete feed')); ?>">
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li ng-show="Navigation.getFeedUnreadCount(feed.id) > 0" class="mark-read">
|
<li ng-show="Navigation.isFeedUnread(feed.id)" class="mark-read">
|
||||||
<button class="icon-checkmark"
|
<button class="icon-checkmark"
|
||||||
ng-click="Navigation.markFeedRead(feed.id)"
|
ng-click="Navigation.markFeedRead(feed.id)"
|
||||||
title="<?php p($l->t('Mark all articles read')); ?>">
|
title="<?php p($l->t('Mark all articles read')); ?>">
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
active: Navigation.isFolderActive(folder.id),
|
active: Navigation.isFolderActive(folder.id),
|
||||||
open: folder.opened || folder.getsFeed,
|
open: folder.opened || folder.getsFeed,
|
||||||
collapsible: Navigation.hasFeeds(folder.id) || folder.getsFeed,
|
collapsible: Navigation.hasFeeds(folder.id) || folder.getsFeed,
|
||||||
unread: Navigation.getFolderUnreadCount(folder.id) > 0
|
unread: Navigation.isFolderUnread(folder.id)
|
||||||
}"
|
}"
|
||||||
ng-repeat="folder in Navigation.getFolders() | orderBy:'name.toLowerCase()'"
|
ng-repeat="folder in Navigation.getFolders() | orderBy:'name.toLowerCase()'"
|
||||||
ng-show="Navigation.getFolderUnreadCount(folder.id) > 0
|
ng-show="Navigation.isFolderUnread(folder.id)
|
||||||
|| Navigation.isShowAll()
|
|| Navigation.isShowAll()
|
||||||
|| Navigation.isFolderActive(folder.id)
|
|| Navigation.isFolderActive(folder.id)
|
||||||
|| Navigation.subFeedActive(folder.id)
|
|| Navigation.subFeedActive(folder.id)
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li class="app-navigation-entry-utils-counter"
|
<li class="app-navigation-entry-utils-counter"
|
||||||
ng-show="folder.id &&
|
ng-show="folder.id &&
|
||||||
Navigation.getFolderUnreadCount(folder.id) > 0"
|
Navigation.isFolderUnread(folder.id)"
|
||||||
title="{{ Navigation.getFolderUnreadCount(folder.id) }}">
|
title="{{ Navigation.getFolderUnreadCount(folder.id) }}">
|
||||||
{{ Navigation.getFolderUnreadCount(folder.id) |
|
{{ Navigation.getFolderUnreadCount(folder.id) |
|
||||||
unreadCountFormatter }}
|
unreadCountFormatter }}
|
||||||
@ -121,7 +121,7 @@
|
|||||||
title="<?php p($l->t('Delete folder')); ?>">
|
title="<?php p($l->t('Delete folder')); ?>">
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li ng-show="Navigation.getFolderUnreadCount(folder.id) > 0" class="mark-read">
|
<li ng-show="Navigation.isFolderUnread(folder.id)" class="mark-read">
|
||||||
<button class="icon-checkmark"
|
<button class="icon-checkmark"
|
||||||
ng-click="Navigation.markFolderRead(folder.id)"
|
ng-click="Navigation.markFolderRead(folder.id)"
|
||||||
title="<?php p($l->t('Mark all articles read')); ?>">
|
title="<?php p($l->t('Mark all articles read')); ?>">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<li ng-class="{
|
<li ng-class="{
|
||||||
active: Navigation.isStarredActive(),
|
active: Navigation.isStarredActive(),
|
||||||
unread: Navigation.getStarredCount() > 0
|
unread: Navigation.isStarredUnread()
|
||||||
}"
|
}"
|
||||||
class="with-counter starred-feed">
|
class="with-counter starred-feed">
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<div class="app-navigation-entry-utils">
|
<div class="app-navigation-entry-utils">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="app-navigation-entry-utils-counter"
|
<li class="app-navigation-entry-utils-counter"
|
||||||
ng-show="Navigation.getStarredCount() > 0"
|
ng-show="Navigation.isStarredUnread()"
|
||||||
title="{{ Navigation.getStarredCount() }}">
|
title="{{ Navigation.getStarredCount() }}">
|
||||||
{{ Navigation.getStarredCount() | unreadCountFormatter }}
|
{{ Navigation.getStarredCount() | unreadCountFormatter }}
|
||||||
</li>
|
</li>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<li ng-class="{
|
<li ng-class="{
|
||||||
active: Navigation.isSubscriptionsActive(),
|
active: Navigation.isSubscriptionsActive(),
|
||||||
unread: Navigation.getUnreadCount() > 0
|
unread: Navigation.isUnread()
|
||||||
}"
|
}"
|
||||||
class="subscriptions-feed with-counter with-menu">
|
class="subscriptions-feed with-counter with-menu">
|
||||||
|
|
||||||
@ -12,10 +12,10 @@
|
|||||||
<?php p($l->t('All articles'))?>
|
<?php p($l->t('All articles'))?>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="app-navigation-entry-utils" ng-show="Navigation.getUnreadCount() > 0">
|
<div class="app-navigation-entry-utils" ng-show="Navigation.isUnread()">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="app-navigation-entry-utils-counter"
|
<li class="app-navigation-entry-utils-counter"
|
||||||
ng-show="Navigation.getUnreadCount() > 0"
|
ng-show="Navigation.isUnread()"
|
||||||
title="{{ Navigation.getUnreadCount() }}">
|
title="{{ Navigation.getUnreadCount() }}">
|
||||||
{{ Navigation.getUnreadCount() | unreadCountFormatter }}
|
{{ Navigation.getUnreadCount() | unreadCountFormatter }}
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user