Skip to content

Commit

Permalink
Merge pull request #147 from LordTocs/tocs
Browse files Browse the repository at this point in the history
Bug Fix And Log Spam Removal
  • Loading branch information
LordTocs authored May 16, 2022
2 parents aa78a4d + a061aa6 commit 2b87a5b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "castmate",
"version": "0.2.0-beta.0",
"version": "0.2.0-beta.1",
"private": "true",
"description": "CastMate is a broadcaster tool that allows Twitch viewers to interact with a broadcasters stream components through Chat Commands, Channel Point rewards, and more.",
"author": "LordTocs & FitzBro",
Expand Down
1 change: 0 additions & 1 deletion src/components/triggers/TriggerContext.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export default {
const result = [];
for (let pluginKey in this.stateLookup) {
for (let stateKey in this.stateLookup[pluginKey]) {
console.log("State Vars", pluginKey, stateKey);
result.push({
variable: `${pluginKey}.${stateKey}`,
color: this.plugins[pluginKey].color,
Expand Down
24 changes: 19 additions & 5 deletions src/components/triggers/TriggerList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,20 @@
<trigger-list-row
:pluginKey="pluginKey"
:triggerKey="triggerKey"
v-for="(mapping, i) in visibleTriggers[pluginKey][triggerKey]"
v-for="mapping in visibleTriggers[pluginKey][triggerKey]"
:mapping="mapping"
:key="mapping.id"
@mapping="
(tt, mapping) =>
updateMapping(tt, mapping, pluginKey, triggerKey, i)
updateMapping(
tt,
mapping,
pluginKey,
triggerKey,
mapping.id
)
"
@delete="deleteMapping(pluginKey, triggerKey, i)"
@delete="deleteMapping(pluginKey, triggerKey, mapping.id)"
/>
</template>
</template>
Expand Down Expand Up @@ -133,6 +139,9 @@ export default {
},
},
methods: {
getMappingIndex(pluginKey, triggerKey, id) {
return this.value[pluginKey][triggerKey].findIndex((m) => m.id == id);
},
addMappingInternal(newValue, triggerType, mapping) {
if (!(triggerType.pluginKey in newValue)) {
newValue[triggerType.pluginKey] = {};
Expand All @@ -148,8 +157,11 @@ export default {
this.addMappingInternal(newValue, triggerType, mapping);
this.$emit("input", newValue);
},
updateMapping(triggerType, mapping, pluginKey, triggerKey, index) {
updateMapping(triggerType, mapping, pluginKey, triggerKey, id) {
const newValue = _cloneDeep(this.value);
const index = this.getMappingIndex(pluginKey, triggerKey, id);
if (
triggerType.triggerKey != triggerKey ||
triggerType.pluginKey != pluginKey
Expand All @@ -175,7 +187,9 @@ export default {
}
}
},
deleteMapping(pluginKey, triggerKey, index) {
deleteMapping(pluginKey, triggerKey, id) {
const index = this.getMappingIndex(pluginKey, triggerKey, id);
const newValue = _cloneDeep(this.value);
this.deleteMappingInternal(newValue, pluginKey, triggerKey, index);
this.$emit("input", newValue);
Expand Down
23 changes: 19 additions & 4 deletions src/views/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,24 @@
<v-card-title> CastMate</v-card-title>
<v-card-subtitle> v{{ version }} </v-card-subtitle>
<v-card-text>
<a href="https://www.castmate.io/" target="_blank"> CastMate Home Page </a> <br>
<a href="https://www.github.com/LordTocs/CastMate" target="_blank"> GitHub </a> <br>
<!--a href="Put License Here" target="_blank"> License </a><br-->
<a href="https://www.castmate.io/" target="_blank">
CastMate Home Page
</a>
<br />
<a href="https://www.github.com/LordTocs/CastMate" target="_blank">
GitHub
</a>
<br />
<a href="https://discord.gg/txt4DUzYJM" target="_blank"> Discord </a>
<br />
<br />
<a
href="https://github.com/LordTocs/CastMate/blob/main/LICENSE.md"
target="_blank"
>
License
</a>
<br />
</v-card-text>
<v-card-actions>
<v-spacer />
Expand All @@ -25,7 +40,7 @@
<script>
import { app } from "@electron/remote/main";
import { ipcRenderer } from "electron";
import WelcomeDialog from '../components/wizard/WelcomeDialog.vue';
import WelcomeDialog from "../components/wizard/WelcomeDialog.vue";
export default {
components: { WelcomeDialog },
data() {
Expand Down

0 comments on commit 2b87a5b

Please sign in to comment.