mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update schedules direct mapping
This commit is contained in:
parent
bd43e4e167
commit
c97c4ac4e3
10 changed files with 126 additions and 80 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "polymer",
|
"name": "polymer",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"main": [
|
"main": [
|
||||||
"polymer.html"
|
"polymer.html"
|
||||||
],
|
],
|
||||||
|
@ -25,11 +25,11 @@
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/Polymer/polymer",
|
"homepage": "https://github.com/Polymer/polymer",
|
||||||
"_release": "1.1.4",
|
"_release": "1.1.5",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.1.4",
|
"tag": "v1.1.5",
|
||||||
"commit": "eaedcbc28671ee6cf6a4c0350133bdddfbff50b8"
|
"commit": "4c94736fac6681e84ec8c00da53484c5d3c2226b"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/Polymer/polymer.git",
|
"_source": "git://github.com/Polymer/polymer.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "polymer",
|
"name": "polymer",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"main": [
|
"main": [
|
||||||
"polymer.html"
|
"polymer.html"
|
||||||
],
|
],
|
||||||
|
|
26
dashboard-ui/cordova/android/iap.js
vendored
26
dashboard-ui/cordova/android/iap.js
vendored
|
@ -5,7 +5,7 @@
|
||||||
function getStoreFeatureId(feature) {
|
function getStoreFeatureId(feature) {
|
||||||
|
|
||||||
if (feature == 'embypremieremonthly') {
|
if (feature == 'embypremieremonthly') {
|
||||||
return "emby.supporter.weekly";
|
return "emby.supporter.monthly";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "com.mb.android.unlock";
|
return "com.mb.android.unlock";
|
||||||
|
@ -39,14 +39,26 @@
|
||||||
return products.length ? products[0] : null;
|
return products.length ? products[0] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var storeReady = false;
|
||||||
|
function onStoreReady() {
|
||||||
|
storeReady = true;
|
||||||
|
refreshPurchases();
|
||||||
|
}
|
||||||
|
|
||||||
function isPurchaseAvailable(feature) {
|
function isPurchaseAvailable(feature) {
|
||||||
|
|
||||||
return NativeIapManager.isStoreAvailable();
|
return storeReady;
|
||||||
}
|
}
|
||||||
|
|
||||||
function beginPurchase(feature, email) {
|
function beginPurchase(feature, email) {
|
||||||
var id = getStoreFeatureId(feature);
|
|
||||||
return MainActivity.beginPurchase(id, email);
|
if (feature == 'embypremieremonthly') {
|
||||||
|
return MainActivity.purchasePremiereMonthly(email);
|
||||||
|
}
|
||||||
|
if (feature == 'embypremiereweekly') {
|
||||||
|
return MainActivity.purchasePremiereWeekly(email);
|
||||||
|
}
|
||||||
|
return MainActivity.purchaseUnlock(email);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPurchaseComplete(result) {
|
function onPurchaseComplete(result) {
|
||||||
|
@ -90,10 +102,10 @@
|
||||||
updateProduct: updateProductInfo,
|
updateProduct: updateProductInfo,
|
||||||
beginPurchase: beginPurchase,
|
beginPurchase: beginPurchase,
|
||||||
onPurchaseComplete: onPurchaseComplete,
|
onPurchaseComplete: onPurchaseComplete,
|
||||||
getStoreFeatureId: getStoreFeatureId,
|
getSubscriptionOptions: getSubscriptionOptions,
|
||||||
getSubscriptionOptions: getSubscriptionOptions
|
onStoreReady: onStoreReady
|
||||||
};
|
};
|
||||||
|
|
||||||
refreshPurchases();
|
NativeIapManager.initStore();
|
||||||
|
|
||||||
})();
|
})();
|
78
dashboard-ui/cordova/iap.js
vendored
78
dashboard-ui/cordova/iap.js
vendored
|
@ -1,6 +1,7 @@
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
var updatedProducts = [];
|
var updatedProducts = [];
|
||||||
|
var enteredEmail;
|
||||||
|
|
||||||
function getStoreFeatureId(feature) {
|
function getStoreFeatureId(feature) {
|
||||||
|
|
||||||
|
@ -41,6 +42,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function beginPurchase(feature, email) {
|
function beginPurchase(feature, email) {
|
||||||
|
|
||||||
|
if (email) {
|
||||||
|
enteredEmail = email;
|
||||||
|
}
|
||||||
|
|
||||||
var id = getStoreFeatureId(feature);
|
var id = getStoreFeatureId(feature);
|
||||||
store.order(id);
|
store.order(id);
|
||||||
}
|
}
|
||||||
|
@ -54,32 +60,45 @@
|
||||||
// product attributes:
|
// product attributes:
|
||||||
// https://github.com/j3k0/cordova-plugin-purchase/blob/master/doc/api.md#validation-error-codes
|
// https://github.com/j3k0/cordova-plugin-purchase/blob/master/doc/api.md#validation-error-codes
|
||||||
|
|
||||||
alert(JSON.stringify(product));
|
var productId = product.id;
|
||||||
alert(JSON.stringify(product.transaction));
|
var transactionId = product.transaction.id;
|
||||||
|
var receipt = product.transaction.appStoreReceipt;
|
||||||
|
var price = product.price;
|
||||||
|
|
||||||
callback(true, {
|
HttpClient.send({
|
||||||
|
type: "POST",
|
||||||
});
|
url: "https://mb3admin.com/test/admin/service/appstore/register",
|
||||||
|
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||||
//callback(true, { ... transaction details ... }); // success!
|
data: {
|
||||||
|
store: "Apple",
|
||||||
//// OR
|
application: "com.emby.mobile",
|
||||||
//callback(false, {
|
product: productId,
|
||||||
// error: {
|
type: "Subscription",
|
||||||
// code: store.PURCHASE_EXPIRED,
|
feature: "MBSClubMonthly",
|
||||||
// message: "XYZ"
|
email: enteredEmail,
|
||||||
// }
|
token: receipt,
|
||||||
//});
|
amt: price,
|
||||||
|
storeId: transactionId
|
||||||
//// OR
|
},
|
||||||
//callback(false, "Impossible to proceed with validation");
|
headers: {
|
||||||
|
"X-Emby-Token": "08606E86D043"
|
||||||
}
|
}
|
||||||
|
|
||||||
function initProduct(id, alias, type) {
|
}).done(function () {
|
||||||
|
|
||||||
|
callback(true, product);
|
||||||
|
|
||||||
|
}).fail(function () {
|
||||||
|
|
||||||
|
callback(false, product);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function initProduct(id, requiresVerification, type) {
|
||||||
|
|
||||||
store.register({
|
store.register({
|
||||||
id: id,
|
id: id,
|
||||||
alias: alias,
|
alias: id,
|
||||||
type: type
|
type: type
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -87,12 +106,12 @@
|
||||||
// show some logs and finish the transaction.
|
// show some logs and finish the transaction.
|
||||||
store.when(id).approved(function (product) {
|
store.when(id).approved(function (product) {
|
||||||
|
|
||||||
product.finish();
|
|
||||||
//if (product.type == store.PAID_SUBSCRIPTION) {
|
|
||||||
// product.verify();
|
|
||||||
//} else {
|
|
||||||
//product.finish();
|
//product.finish();
|
||||||
//}
|
if (requiresVerification) {
|
||||||
|
product.verify();
|
||||||
|
} else {
|
||||||
|
product.finish();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
store.when(id).verified(function (p) {
|
store.when(id).verified(function (p) {
|
||||||
|
@ -105,8 +124,12 @@
|
||||||
|
|
||||||
if (product.loaded && product.valid && product.state == store.APPROVED) {
|
if (product.loaded && product.valid && product.state == store.APPROVED) {
|
||||||
Logger.log('finishing previously created transaction');
|
Logger.log('finishing previously created transaction');
|
||||||
|
if (requiresVerification) {
|
||||||
|
product.verify();
|
||||||
|
} else {
|
||||||
product.finish();
|
product.finish();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
updateProductInfo(product);
|
updateProductInfo(product);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -119,8 +142,8 @@
|
||||||
|
|
||||||
store.validator = validateProduct;
|
store.validator = validateProduct;
|
||||||
|
|
||||||
initProduct(getStoreFeatureId(""), "premium features", store.NON_CONSUMABLE);
|
initProduct(getStoreFeatureId(""), false, store.NON_CONSUMABLE);
|
||||||
initProduct(getStoreFeatureId("embypremieremonthly"), "emby premiere monthly", store.PAID_SUBSCRIPTION);
|
initProduct(getStoreFeatureId("embypremieremonthly"), true, store.PAID_SUBSCRIPTION);
|
||||||
|
|
||||||
// When every goes as expected, it's time to celebrate!
|
// When every goes as expected, it's time to celebrate!
|
||||||
// The "ready" event should be welcomed with music and fireworks,
|
// The "ready" event should be welcomed with music and fireworks,
|
||||||
|
@ -163,7 +186,6 @@
|
||||||
getProductInfo: getProduct,
|
getProductInfo: getProduct,
|
||||||
beginPurchase: beginPurchase,
|
beginPurchase: beginPurchase,
|
||||||
restorePurchase: restorePurchase,
|
restorePurchase: restorePurchase,
|
||||||
getStoreFeatureId: getStoreFeatureId,
|
|
||||||
getSubscriptionOptions: getSubscriptionOptions
|
getSubscriptionOptions: getSubscriptionOptions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
8
dashboard-ui/cordova/registrationservices.js
vendored
8
dashboard-ui/cordova/registrationservices.js
vendored
|
@ -13,8 +13,6 @@
|
||||||
|
|
||||||
function validateFeature(feature, deferred) {
|
function validateFeature(feature, deferred) {
|
||||||
|
|
||||||
var id = IapManager.getStoreFeatureId(feature);
|
|
||||||
|
|
||||||
if (validatedFeatures.indexOf(feature) != -1) {
|
if (validatedFeatures.indexOf(feature) != -1) {
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
return;
|
return;
|
||||||
|
@ -23,7 +21,7 @@
|
||||||
var info = IapManager.getProductInfo(feature) || {};
|
var info = IapManager.getProductInfo(feature) || {};
|
||||||
|
|
||||||
if (info.owned) {
|
if (info.owned) {
|
||||||
notifyServer(id);
|
notifyServer(info.id);
|
||||||
validatedFeatures.push(feature);
|
validatedFeatures.push(feature);
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
return;
|
return;
|
||||||
|
@ -31,7 +29,7 @@
|
||||||
|
|
||||||
var unlockableProductInfo = IapManager.isPurchaseAvailable(feature) ? {
|
var unlockableProductInfo = IapManager.isPurchaseAvailable(feature) ? {
|
||||||
enableAppUnlock: IapManager.isPurchaseAvailable(feature),
|
enableAppUnlock: IapManager.isPurchaseAvailable(feature),
|
||||||
id: id,
|
id: info.id,
|
||||||
price: info.price,
|
price: info.price,
|
||||||
feature: feature
|
feature: feature
|
||||||
|
|
||||||
|
@ -211,7 +209,7 @@
|
||||||
$('.btnRestorePurchase', elem).on('click', function () {
|
$('.btnRestorePurchase', elem).on('click', function () {
|
||||||
|
|
||||||
isCancelled = false;
|
isCancelled = false;
|
||||||
IapManager.restorePurchase(info.feature);
|
IapManager.restorePurchase();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(elem).on('iron-overlay-closed', function () {
|
$(elem).on('iron-overlay-closed', function () {
|
||||||
|
|
|
@ -363,17 +363,23 @@
|
||||||
|
|
||||||
if (items.length) {
|
if (items.length) {
|
||||||
|
|
||||||
var cssClass = index !== 0 ? 'listHeader' : 'listHeader';
|
var screenWidth = $(window).width();
|
||||||
|
|
||||||
html += '<div>';
|
html += '<div>';
|
||||||
html += '<h1 class="' + cssClass + '">' + Globalize.translate('HeaderMyMedia') + '</h1>';
|
html += '<h1 class="listHeader">' + Globalize.translate('HeaderMyMedia') + '</h1>';
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="homeTopViews">';
|
var scrollX = enableScrollX() && $.browser.safari && screenWidth > 800;
|
||||||
|
|
||||||
|
if (scrollX) {
|
||||||
|
html += '<div class="hiddenScrollX itemsContainer homeTopViews">';
|
||||||
|
} else {
|
||||||
|
html += '<div class="itemsContainer homeTopViews">';
|
||||||
|
}
|
||||||
html += LibraryBrowser.getPosterViewHtml({
|
html += LibraryBrowser.getPosterViewHtml({
|
||||||
items: items,
|
items: items,
|
||||||
shape: shape,
|
shape: scrollX ? 'overflowBackdrop' : shape,
|
||||||
showTitle: showTitles,
|
showTitle: showTitles,
|
||||||
centerText: true,
|
centerText: true,
|
||||||
lazy: true,
|
lazy: true,
|
||||||
|
|
|
@ -95,7 +95,7 @@ var Dashboard = {
|
||||||
var url = data.url.toLowerCase();
|
var url = data.url.toLowerCase();
|
||||||
|
|
||||||
// Don't bounce to login on failures to contact our external servers
|
// Don't bounce to login on failures to contact our external servers
|
||||||
if (url.indexOf('emby.media') != -1) {
|
if (url.indexOf('emby.media') != -1 || url.indexOf('mb3admin.com') != -1) {
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.background-theme-b, paper-dialog.background-theme-b {
|
.background-theme-b, paper-dialog.background-theme-b {
|
||||||
background: radial-gradient(circle, #282828, #101010);
|
background: #181818;
|
||||||
}
|
}
|
||||||
|
|
||||||
.backdropContainer .pageBackground {
|
.backdropContainer .pageBackground {
|
||||||
|
|
|
@ -19,10 +19,16 @@
|
||||||
listingsId = info.ListingsId;
|
listingsId = info.ListingsId;
|
||||||
$('#selectListing', page).val(info.ListingsId || '');
|
$('#selectListing', page).val(info.ListingsId || '');
|
||||||
page.querySelector('.txtUser').value = info.Username || '';
|
page.querySelector('.txtUser').value = info.Username || '';
|
||||||
page.querySelector('.txtPass').value = info.Username || '';
|
page.querySelector('.txtPass').value = '';
|
||||||
|
|
||||||
page.querySelector('.txtZipCode').value = info.ZipCode || '';
|
page.querySelector('.txtZipCode').value = info.ZipCode || '';
|
||||||
|
|
||||||
|
if (info.Username && info.Password) {
|
||||||
|
page.querySelector('.listingsSection').classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
page.querySelector('.listingsSection').classList.add('hide');
|
||||||
|
}
|
||||||
|
|
||||||
setCountry(info);
|
setCountry(info);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
<div class="listingsSection hide">
|
||||||
<div style="font-size:16px;">
|
<div style="font-size:16px;">
|
||||||
<div style="display:inline-block;background-color:rgba(82,181,75,.8);color:#fff;padding:2px 10px;font-size:20px;border-radius:1000px;vertical-align:middle;">
|
<div style="display:inline-block;background-color:rgba(82,181,75,.8);color:#fff;padding:2px 10px;font-size:20px;border-radius:1000px;vertical-align:middle;">
|
||||||
2
|
2
|
||||||
|
@ -59,3 +60,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
Loading…
Add table
Add a link
Reference in a new issue