Show share button when logged out #473

This commit is contained in:
Tobias Reich 2016-04-08 22:07:17 +02:00
parent 65a9a4476f
commit 592c7598a2
3 changed files with 15 additions and 7 deletions

View File

@ -306,8 +306,8 @@ contextMenu.sharePhoto = function(photoID, e) {
{ title: build.iconic('envelope-closed') + 'Mail', fn: () => photo.share(photoID, 'mail') },
{ title: build.iconic('dropbox', iconClass) + 'Dropbox', fn: () => photo.share(photoID, 'dropbox') },
{ title: build.iconic('link-intact') + 'Direct Link', fn: () => window.open(photo.getDirectLink()) },
{ },
{ title: build.iconic('ban') + 'Make Private', fn: () => photo.setPublic(photoID) }
{ visible: lychee.publicMode===false },
{ title: build.iconic('ban') + 'Make Private', visible: lychee.publicMode===false, fn: () => photo.setPublic(photoID) }
]
basicContext.show(items, e.originalEvent)
@ -325,9 +325,9 @@ contextMenu.shareAlbum = function(albumID, e) {
{ title: build.iconic('twitter', iconClass) + 'Twitter', fn: () => album.share('twitter') },
{ title: build.iconic('facebook', iconClass) + 'Facebook', fn: () => album.share('facebook') },
{ title: build.iconic('envelope-closed') + 'Mail', fn: () => album.share('mail') },
{ },
{ title: build.iconic('pencil') + 'Edit Sharing', fn: () => album.setPublic(albumID, true, e) },
{ title: build.iconic('ban') + 'Make Private', fn: () => album.setPublic(albumID, false) }
{ visible: lychee.publicMode===false },
{ title: build.iconic('pencil') + 'Edit Sharing', visible: lychee.publicMode===false, fn: () => album.setPublic(albumID, true, e) },
{ title: build.iconic('ban') + 'Make Private', visible: lychee.publicMode===false, fn: () => album.setPublic(albumID, false) }
]
basicContext.show(items, e.originalEvent)

View File

@ -236,8 +236,14 @@ lychee.setTitle = function(title, editable) {
lychee.setMode = function(mode) {
$('#button_settings, #button_trash_album, #button_share_album, .button_add, .header__divider').remove()
$('#button_trash, #button_move, #button_share, #button_star').remove()
$('#button_settings, #button_trash_album, .button_add, .header__divider').remove()
$('#button_trash, #button_move, #button_star').remove()
$('#button_share, #button_share_album')
.removeClass('button--eye')
.addClass('button--share')
.find('use')
.attr('xlink:href', '#share')
$(document)
.off('click', '.header__title--editable')

View File

@ -95,6 +95,8 @@
&--eye.active .iconic { fill: #ff9737; }
&--share .iconic { height: 18px; }
&--info.active .iconic { fill: $colorBlue; }
}