mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add sharing function
This commit is contained in:
parent
93ad16971d
commit
54afe9d0c2
22 changed files with 17346 additions and 17048 deletions
31
dashboard-ui/cordova/sharingwidget.js
vendored
Normal file
31
dashboard-ui/cordova/sharingwidget.js
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
(function () {
|
||||
|
||||
function showMenu(options, successCallback, cancelCallback) {
|
||||
|
||||
Dashboard.confirm(Globalize.translate('ButtonShareHelp'), Globalize.translate('HeaderConfirm'), function (confirmed) {
|
||||
|
||||
if (!confirmed) {
|
||||
cancelCallback(options);
|
||||
return;
|
||||
}
|
||||
|
||||
var shareInfo = options.share;
|
||||
|
||||
window.plugins.socialsharing.share(shareInfo.Overview, shareInfo.Name, shareInfo.ImageUrl, shareInfo.Url, function () {
|
||||
|
||||
successCallback(options);
|
||||
|
||||
}, function () {
|
||||
|
||||
cancelCallback(options);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
window.SharingWidget = {
|
||||
showMenu: showMenu
|
||||
};
|
||||
|
||||
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue