-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from nextcloud/refactor/migrate-to-new-18-shar…
…ing-2 Comply to 18 new sharing ui
- Loading branch information
Showing
14 changed files
with
47 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
* @copyright 2017, Roeland Jago Douma <[email protected]> | ||
* | ||
* @author Roeland Jago Douma <[email protected]> | ||
* @author John Molakvoæ <[email protected]> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
|
@@ -20,12 +21,12 @@ | |
* | ||
*/ | ||
|
||
(function() { | ||
var diaspora = new OC.Share.Social.Model({ | ||
key: 'diaspora', | ||
url: 'https://share.diasporafoundation.org/?url={{reference}}', | ||
name: 'Diaspora', | ||
iconClass: 'icon-social-diaspora' | ||
}); | ||
OC.Share.Social.Collection.add(diaspora); | ||
})(); | ||
window.addEventListener('DOMContentLoaded', () => { | ||
if (OCA.Sharing && OCA.Sharing.ExternalLinkActions) { | ||
OCA.Sharing.ExternalLinkActions.registerAction({ | ||
url: link =>`https://share.diasporafoundation.org/?url=${link}`, | ||
name: t('socialsharing_facebook', 'Share to Diaspora'), | ||
icon: 'icon-social-diaspora' | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
* @copyright 2017, Roeland Jago Douma <[email protected]> | ||
* | ||
* @author Roeland Jago Douma <[email protected]> | ||
* @author John Molakvoæ <[email protected]> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
|
@@ -20,15 +21,12 @@ | |
* | ||
*/ | ||
|
||
(function() { | ||
var email = new OC.Share.Social.Model({ | ||
key: 'email', | ||
url: 'mailto:?subject=' + | ||
t('socialsharing_email' , 'I shared a file with you') + | ||
'&body={{reference}}', | ||
name: 'Email', | ||
iconClass: 'icon-social-email', | ||
newWindow: false | ||
}); | ||
OC.Share.Social.Collection.add(email); | ||
})(); | ||
window.addEventListener('DOMContentLoaded', () => { | ||
if (OCA.Sharing && OCA.Sharing.ExternalLinkActions) { | ||
OCA.Sharing.ExternalLinkActions.registerAction({ | ||
url: link => `mailto:?subject=${t('socialsharing_email', 'I shared a file with you')}&body=${link}`, | ||
name: t('socialsharing_email', 'Share to email'), | ||
icon: 'icon-mail' | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
* @copyright 2017, Roeland Jago Douma <[email protected]> | ||
* | ||
* @author Roeland Jago Douma <[email protected]> | ||
* @author John Molakvoæ <[email protected]> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
|
@@ -20,12 +21,12 @@ | |
* | ||
*/ | ||
|
||
(function() { | ||
var facebook = new OC.Share.Social.Model({ | ||
key: 'facebook', | ||
url: 'https://www.facebook.com/sharer/sharer.php?u={{reference}}', | ||
name: 'Facebook', | ||
iconClass: 'icon-social-facebook' | ||
}); | ||
OC.Share.Social.Collection.add(facebook); | ||
})(); | ||
window.addEventListener('DOMContentLoaded', () => { | ||
if (OCA.Sharing && OCA.Sharing.ExternalLinkActions) { | ||
OCA.Sharing.ExternalLinkActions.registerAction({ | ||
url: link => `https://www.facebook.com/sharer/sharer.php?u=${link}`, | ||
name: t('socialsharing_facebook', 'Share to Facebook'), | ||
icon: 'icon-social-facebook' | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
* @copyright 2017, Roeland Jago Douma <[email protected]> | ||
* | ||
* @author Roeland Jago Douma <[email protected]> | ||
* @author John Molakvoæ <[email protected]> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
|
@@ -20,12 +21,12 @@ | |
* | ||
*/ | ||
|
||
(function() { | ||
var twitter = new OC.Share.Social.Model({ | ||
key: 'twitter', | ||
url: 'https://twitter.com/intent/tweet?url={{reference}}', | ||
name: 'Twitter', | ||
iconClass: 'icon-social-twitter' | ||
}); | ||
OC.Share.Social.Collection.add(twitter); | ||
})(); | ||
window.addEventListener('DOMContentLoaded', () => { | ||
if (OCA.Sharing && OCA.Sharing.ExternalLinkActions) { | ||
OCA.Sharing.ExternalLinkActions.registerAction({ | ||
url: link => `https://twitter.com/intent/tweet?url=${link}`, | ||
name: t('socialsharing_facebook', 'Share to Twitter'), | ||
icon: 'icon-social-twitter' | ||
}); | ||
} | ||
}); |