Π·Π΅ΡΠΊΠ°Π»ΠΎ ΠΈΠ· https://github.com/nextcloud/news.git
π©Ή Fix rebase issues
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
This commit is contained in:
Π ΠΎΠ΄ΠΈΡΠ΅Π»Ρ
acd944a6ef
ΠΠΎΠΌΠΌΠΈΡ
b0b08326a8
|
@ -8,8 +8,7 @@
|
|||
* @copyright Bernhard Posselt 2014
|
||||
*/
|
||||
app.controller('ContentController', function (Publisher, FeedResource, ItemResource, SettingsResource, data, $route,
|
||||
$routeParams, $location, FEED_TYPE, ITEM_AUTO_PAGE_SIZE, Loading,
|
||||
$filter) {
|
||||
$routeParams, $location, FEED_TYPE, ITEM_AUTO_PAGE_SIZE, Loading) {
|
||||
'use strict';
|
||||
|
||||
this.showDropdown = [];
|
||||
|
@ -102,8 +101,8 @@ app.controller('ContentController', function (Publisher, FeedResource, ItemResou
|
|||
this.toggleKeepUnread = function (itemId) {
|
||||
var item = ItemResource.get(itemId);
|
||||
if (!item.unread) {
|
||||
ItemResource.markItemRead(itemId, false);
|
||||
FeedResource.markItemOfFeedUnread(item.feedId);
|
||||
ItemResource.markItemRead(itemId, false);
|
||||
}
|
||||
|
||||
item.keepUnread = !item.keepUnread;
|
||||
|
|
|
@ -21,11 +21,6 @@ app.controller('ShareController', function (ShareResource, Loading) {
|
|||
/** True if the most recent request failed */
|
||||
this.searchUsersFailed = false;
|
||||
|
||||
/** */
|
||||
this.facebookLimit = 180;
|
||||
this.twitterLimit = 100;
|
||||
this.emailLimit = 180;
|
||||
|
||||
/**
|
||||
* @param search Username search query
|
||||
*
|
||||
|
@ -178,17 +173,15 @@ app.controller('ShareController', function (ShareResource, Loading) {
|
|||
return media.some(m => this.isSocialAppEnabled(m));
|
||||
};
|
||||
|
||||
this.getFacebookUrl = function(url, intro){
|
||||
return `https://www.facebook.com/sharer/sharer.php?u=${url}"e=${intro.substring(0,this.facebookLimit)}`+
|
||||
`...`;
|
||||
this.getFacebookUrl = function(url){
|
||||
return 'https://www.facebook.com/sharer/sharer.php?u='+url;
|
||||
};
|
||||
|
||||
this.getTwitterUrl = function(url, intro){
|
||||
return `https://twitter.com/intent/tweet?url=${url}&text=${intro.substring(0,this.twitterLimit)}`+
|
||||
`...`;
|
||||
this.getTwitterUrl = function(url){
|
||||
return 'https://twitter.com/intent/tweet?url='+url;
|
||||
};
|
||||
|
||||
this.getEmailUrl = function(url, object, intro){
|
||||
return encodeURI(`mailto:?subject=${object}&body=${intro.substring(0,this.emailLimit)}...\n\n${url}`);
|
||||
this.getEmailUrl = function(url, object, body){
|
||||
return encodeURI('mailto:?subject=' + object + '&body=' + body + ' ' + url);
|
||||
};
|
||||
});
|
||||
|
|
|
@ -159,16 +159,16 @@
|
|||
<div ng-if="Share.isSocialAppEnabled('facebook')" class="col-4">
|
||||
<a target="_blank"
|
||||
class="icon-dropdown icon-facebook pr-5"
|
||||
ng-href="{{ Share.getFacebookUrl(item.url, item.intro) }}"></a>
|
||||
ng-href="{{ Share.getFacebookUrl(item.url) }}"></a>
|
||||
</div>
|
||||
<div ng-if="Share.isSocialAppEnabled('twitter')" class="col-4">
|
||||
<a target="_blank"
|
||||
class="icon-dropdown icon-twitter pr-5"
|
||||
ng-href="{{ Share.getTwitterUrl(item.url, item.intro) }}"></a>
|
||||
ng-href="{{ Share.getTwitterUrl(item.url) }}"></a>
|
||||
</div>
|
||||
<div ng-if="Share.isSocialAppEnabled('email')" class="col-4">
|
||||
<a class="icon-dropdown icon-mail pr-5"
|
||||
ng-href="{{ Share.getEmailUrl(item.url, '<?php p($l->t('I wanted you to see this article')) ?>', item.intro) }}"></a>
|
||||
ng-href="{{ Share.getEmailUrl(item.url, '<?php p($l->t('I wanted you to see this article')) ?>', '<?php p($l->t('Check out this article')) ?>') }}"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -203,7 +203,7 @@
|
|||
<?php p($l->t('by')) ?> {{ ::item.author }}
|
||||
</span>
|
||||
<span ng-if="!item.sharedBy" class="source"><?php p($l->t('from')) ?>
|
||||
<a ng-href="#/items/feeds/{{ item.feedId }}/">
|
||||
<a ng-href="#/items/feeds/{{ ::item.feedId }}/">
|
||||
{{ ::Content.getFeed(item.feedId).title }}
|
||||
<img ng-if="Content.getFeed(item.feedId).faviconLink && !Content.isCompactView()" src="{{ ::Content.getFeed(item.feedId).faviconLink }}" alt="favicon">
|
||||
</a>
|
||||
|
|
ΠΠ°Π³ΡΡΠ·ΠΊΠ°β¦
Π‘ΡΡΠ»ΠΊΠ° Π² Π½ΠΎΠ²ΠΎΠΉ Π·Π°Π΄Π°ΡΠ΅