Skip to content

Commit

Permalink
Merge pull request #1163 from crowbartools/v5
Browse files Browse the repository at this point in the history
V5.38.2 Hotfix
  • Loading branch information
ebiggz committed May 11, 2021
2 parents eb5ce6f + b1ab382 commit 5442890
Show file tree
Hide file tree
Showing 100 changed files with 285 additions and 5,211 deletions.
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ module.exports = function(grunt) {
require('./grunt/compile.js')(grunt);
require('./grunt/setup.js')(grunt);
require('./grunt/secrets.js')(grunt);
require('./grunt/include-source')(grunt);

grunt.registerTask('build', ['scss', 'pack', 'compile']);
grunt.registerTask('build', ['scss', 'include-source', 'pack', 'compile']);
};
21 changes: 7 additions & 14 deletions backend/effects/builtin/update-channel-reward.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
"use strict";

const { ControlKind, InputEvent } = require('../../interactive/constants/MixplayConstants');
const effectModels = require("../models/effectModels");
const { EffectTrigger } = effectModels;

const { EffectCategory } = require('../../../shared/effect-constants');

const toggleConnection = {
Expand All @@ -13,10 +9,7 @@ const toggleConnection = {
description: "Update settings for a channel reward",
icon: "fad fa-gifts",
categories: [EffectCategory.ADVANCED],
dependencies: [],
triggers: {
[EffectTrigger.CHANNEL_REWARD]: true
}
dependencies: []
},
globalSettings: {},
optionsTemplate: `
Expand Down Expand Up @@ -131,17 +124,17 @@ const toggleConnection = {
if (effect.channelRewardId == null) {
errors.push("Please select a channel reward to update.");
} else if (effect.rewardSettings.name.update &&
effect.rewardSettings.name.newValue == null ||
effect.rewardSettings.name.newValue === "") {
(effect.rewardSettings.name.newValue == null ||
effect.rewardSettings.name.newValue === "")) {
errors.push("Please provide a new name for the reward.");
} else if (effect.rewardSettings.description.update &&
effect.rewardSettings.description.newValue == null ||
effect.rewardSettings.description.newValue === "") {
(effect.rewardSettings.description.newValue == null ||
effect.rewardSettings.description.newValue === "")) {
errors.push("Please provide a new description for the reward.");
} else if (effect.rewardSettings.cost.update &&
effect.rewardSettings.cost.newValue == null ||
(effect.rewardSettings.cost.newValue == null ||
effect.rewardSettings.cost.newValue === "" ||
effect.rewardSettings.cost.newValue < 1) {
effect.rewardSettings.cost.newValue < 1)) {
errors.push("Please provide a new cost for the reward.");
}

Expand Down
2 changes: 1 addition & 1 deletion backend/events/twitch-events/sub.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function getSubType (subPlan) {
*/
exports.triggerSub = (subInfo) => {
const subType = getSubType(subInfo.subPlan);
const totalMonths = subInfo.months != null ? subInfo.months : 1;
const totalMonths = subInfo.cumulativeMonths != null ? subInfo.cumulativeMonths : 1;
const streak = subInfo.streakMonths != null ? subInfo.streakMonths : 1;
const isPrime = subInfo.subPlan === "Prime";

Expand Down
1 change: 1 addition & 0 deletions backend/variables/builtin/reward-cost.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { OutputDataType, VariableCategory } = require("../../../shared/variable-c
let triggers = {};
triggers[EffectTrigger.EVENT] = ["twitch:channel-reward-redemption"];
triggers[EffectTrigger.CHANNEL_REWARD] = true;
triggers[EffectTrigger.PRESET_LIST] = true;
triggers[EffectTrigger.MANUAL] = true;

const model = {
Expand Down
1 change: 1 addition & 0 deletions backend/variables/builtin/reward-description.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { OutputDataType, VariableCategory } = require("../../../shared/variable-c
let triggers = {};
triggers[EffectTrigger.EVENT] = ["twitch:channel-reward-redemption"];
triggers[EffectTrigger.CHANNEL_REWARD] = true;
triggers[EffectTrigger.PRESET_LIST] = true;
triggers[EffectTrigger.MANUAL] = true;

const model = {
Expand Down
1 change: 1 addition & 0 deletions backend/variables/builtin/reward-image-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { OutputDataType, VariableCategory } = require("../../../shared/variable-c
let triggers = {};
triggers[EffectTrigger.EVENT] = ["twitch:channel-reward-redemption"];
triggers[EffectTrigger.CHANNEL_REWARD] = true;
triggers[EffectTrigger.PRESET_LIST] = true;
triggers[EffectTrigger.MANUAL] = true;

const model = {
Expand Down
1 change: 1 addition & 0 deletions backend/variables/builtin/reward-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { OutputDataType, VariableCategory } = require("../../../shared/variable-c
let triggers = {};
triggers[EffectTrigger.EVENT] = ["twitch:channel-reward-redemption"];
triggers[EffectTrigger.CHANNEL_REWARD] = true;
triggers[EffectTrigger.PRESET_LIST] = true;
triggers[EffectTrigger.MANUAL] = true;

const model = {
Expand Down
1 change: 1 addition & 0 deletions backend/variables/builtin/reward-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { OutputDataType, VariableCategory } = require("../../../shared/variable-c
let triggers = {};
triggers[EffectTrigger.EVENT] = ["twitch:channel-reward-redemption"];
triggers[EffectTrigger.CHANNEL_REWARD] = true;
triggers[EffectTrigger.PRESET_LIST] = true;
triggers[EffectTrigger.MANUAL] = true;

const model = {
Expand Down
32 changes: 32 additions & 0 deletions grunt/include-source.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
grunt include-source
Includes all AngularJS files in the index.html file
*/

'use strict';
module.exports = function (grunt) {
grunt.config.merge({
includeSource: {
options: {
//This is the directory inside which grunt-include-source will be looking for files
basePath: 'gui/app/',
templates: {
html: {
js: '<script type="text/javascript" src="./{filePath}"></script>',
css: '<link rel="stylesheet" type="text/css" href="./{filePath}" />'
}
}
},
app: {
files: {
//Overwriting index.html
'gui/app/index.html': 'gui/app/index.html'
}
}
}
});

grunt.loadNpmTasks('grunt-include-source');

grunt.registerTask('include-source', ['includeSource']);
};
3 changes: 0 additions & 3 deletions gui/app/controllers/mainController.js → gui/app/app-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"pascalprecht.translate",
"ngToast",
"agGrid",
"slidingPuzzle",
'ngYoutubeEmbed',
'countUpModule',
'pageslide-directive',
Expand Down Expand Up @@ -513,6 +512,4 @@
return input ? input.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") : "";
};
});


}(angular));
File renamed without changes.

0 comments on commit 5442890

Please sign in to comment.