mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
Move subscription blocks to separate module
This commit is contained in:
@@ -1760,13 +1760,7 @@ api.backgrounds =
|
||||
text: t('backgroundTavernText')
|
||||
notes: t('backgroundTavernNotes')
|
||||
|
||||
api.subscriptionBlocks =
|
||||
basic_earned: months:1, price:5
|
||||
basic_3mo: months:3, price:15
|
||||
basic_6mo: months:6, price:30
|
||||
google_6mo: months:6, price:24, discount:true, original:30
|
||||
basic_12mo: months:12, price:48
|
||||
_.each api.subscriptionBlocks, (b,k)->b.key = k
|
||||
api.subscriptionBlocks = require('../../dist/scripts/content/subscription-blocks')
|
||||
|
||||
api.userDefaults = require('../../dist/scripts/content/user-defaults')
|
||||
|
||||
|
||||
32
common/script/src/content/subscription-blocks.js
Normal file
32
common/script/src/content/subscription-blocks.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import {each} from 'lodash';
|
||||
|
||||
let subscriptionBlocks = {
|
||||
basic_earned: {
|
||||
months: 1,
|
||||
price: 5
|
||||
},
|
||||
basic_3mo: {
|
||||
months: 3,
|
||||
price: 15
|
||||
},
|
||||
basic_6mo: {
|
||||
months: 6,
|
||||
price: 30
|
||||
},
|
||||
google_6mo: {
|
||||
months: 6,
|
||||
price: 24,
|
||||
discount: true,
|
||||
original: 30
|
||||
},
|
||||
basic_12mo: {
|
||||
months: 12,
|
||||
price: 48
|
||||
}
|
||||
};
|
||||
|
||||
each(subscriptionBlocks, function(block, key) {
|
||||
block.key = key;
|
||||
});
|
||||
|
||||
export default subscriptionBlocks;
|
||||
Reference in New Issue
Block a user