Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish removing unecessary props. #170

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 9 additions & 27 deletions src/components/ExportPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
import XrayExportSession from "./xray/XrayExportSession";
import ZephyrSquadExportSession from "./zephyr/ZephyrSquadExportSession";
import ZephyrScaleExportSession from "./zephyr/ZephyrScaleExportSession";
import { mapGetters } from "vuex";

export default {
name: "ExportPanel",
Expand All @@ -141,37 +142,18 @@ export default {
ZephyrSquadExportSession,
ZephyrScaleExportSession,
},
props: {
items: {
type: Array,
default: () => [],
},
configItem: {
type: Object,
default: () => {},
},
credentialItems: {
type: Object,
default: () => {},
},
},
watch: {
items: function (newValue) {
this.itemLists = newValue;
},
configItem: function (newValue) {
this.config = newValue;
},
credentialItems: function (newValue) {
this.credentials = newValue;
},
props: {},

computed: {
...mapGetters({
itemLists: "sessionItems",
config: "config/fullConfig",
credentials: "auth/credentials",
}),
},
data() {
return {
exportSessionDialog: false,
itemLists: this.items,
config: this.configItem,
credentials: this.credentialItems,
evidenceExportDestinationMenu: false,
};
},
Expand Down
14 changes: 6 additions & 8 deletions src/components/ReviewWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import MindmapEditor from "./MindmapEditor.vue";

import { STATUSES, FILE_TYPES } from "../modules/constants";
import { updateImageForWeb } from "@/helpers/WebHelpers";
import { mapGetters } from "vuex";

export default {
name: "ReviewWrapper",
Expand Down Expand Up @@ -82,10 +83,6 @@ export default {
type: String,
default: () => "",
},
configItem: {
type: Object,
default: () => {},
},
},
watch: {
item: function (newValue) {
Expand All @@ -97,19 +94,20 @@ export default {
autoSave: function (newValue) {
this.autoSaveEvent = newValue;
},
configItem: function (newValue) {
this.config = newValue;
},
},
data() {
return {
editSessionItem: this.item,
triggerSaveEvent: this.triggerSave,
autoSaveEvent: this.autoSave,
currentViewName: this.currentView,
config: this.configItem,
};
},
computed: {
...mapGetters({
config: "config/fullConfig",
}),
},
methods: {
getType(type) {
return FILE_TYPES[type];
Expand Down
12 changes: 6 additions & 6 deletions src/components/TimelineWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,7 @@ import { STATUSES, TEXT_TYPES, FILE_TYPES } from "@/modules/constants";
import AddEvidenceDialog from "@/components/dialogs/AddEvidenceDialog.vue";
import EditEvidenceDialog from "@/components/dialogs/EditEvidenceDialog.vue";
import WaveSurfer from "wavesurfer.js";
import { mapGetters } from "vuex";

export default {
name: "TimelineWrapper",
Expand All @@ -964,10 +965,6 @@ export default {
draggable,
},
props: {
items: {
type: Array,
default: () => [],
},
selectedItems: {
type: Array,
default: () => [],
Expand All @@ -979,8 +976,8 @@ export default {
},
watch: {
items: {
async handler(newValue) {
this.itemLists = newValue;
async handler() {
this.itemLists = this.items;
let newMap = { ...this.emojiMenu };
this.itemLists.map(async (item) => {
newMap[`menu-${item.stepID}`] = false;
Expand Down Expand Up @@ -1025,6 +1022,9 @@ export default {
};
},
computed: {
...mapGetters({
items: "sessionItems",
}),
status() {
return this.$store.state.session.status;
},
Expand Down
12 changes: 4 additions & 8 deletions src/components/WorkspaceWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@
</v-container>
</template>
<script>
import { mapGetters } from "vuex";
import NotesWrapper from "./NotesWrapper.vue";
import TimelineWrapper from "./TimelineWrapper.vue";

export default {
name: "WorkspaceWrapper",
computed: {
...mapGetters({
itemLists: "sessionItems",
}),
currentTheme() {
if (this.$vuetify.theme.dark) {
return this.$vuetify.theme.themes.dark;
Expand All @@ -52,10 +56,6 @@ export default {
TimelineWrapper,
},
props: {
items: {
type: Array,
default: () => [],
},
selectedItems: {
type: Array,
default: () => [],
Expand All @@ -66,9 +66,6 @@ export default {
},
},
watch: {
items: function (newValue) {
this.itemLists = newValue;
},
selectedItems: function (newValue) {
this.selected = newValue;
},
Expand All @@ -78,7 +75,6 @@ export default {
},
data() {
return {
itemLists: this.items,
selected: this.selectedItems,
eventName: this.eventType,
currentTab: "timeline",
Expand Down
16 changes: 0 additions & 16 deletions src/components/authentication/SigninWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,34 +157,18 @@ export default {
name: "SigninWrapper",
components: {},
props: {
configItem: {
type: Object,
default: () => {},
},
credentialItems: {
type: Object,
default: () => {},
},
prevRoute: {
type: Object,
default: () => {},
},
},
watch: {
configItem: function (newValue) {
this.config = newValue;
},
credentialItems: function (newValue) {
this.credentials = newValue;
},
prevRoute: function (newValue) {
this.previousRoute = newValue;
},
},
data() {
return {
config: this.configItem,
credentials: this.credentialItems,
previousRoute: this.prevRoute,
loading: false,
snackBar: {
Expand Down
23 changes: 7 additions & 16 deletions src/components/authentication/SigninYattWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,37 +86,28 @@
import axios from "axios";
import dayjs from "dayjs";
import yattIntegrationHelper from "../../integrations/YattIntegrationHelpers";
import { mapGetters } from "vuex";

export default {
name: "SigninYattWrapper",
props: {
configItem: {
type: Object,
default: () => {},
},
credentialItems: {
type: Object,
default: () => {},
},
prevRoute: {
type: Object,
default: () => {},
},
},
watch: {
configItem: function (newValue) {
this.config = newValue;
},
credentialItems: function (newValue) {
this.credentials = newValue;
},
prevRoute: function (newValue) {
this.previousRoute = newValue;
},
},
computed: {
...mapGetters({
credentials: "auth/credentials",
}),
},
data() {
return {
config: this.configItem,
credentials: this.credentialItems,
previousRoute: this.prevRoute,
username: "",
password: "",
Expand Down
23 changes: 6 additions & 17 deletions src/components/authentication/SignupMainWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,39 +147,24 @@
<script>
import axios from "axios";
import dayjs from "dayjs";
import { mapGetters } from "vuex";

export default {
name: "SignupMainWrapper",
components: {},
props: {
configItem: {
type: Object,
default: () => {},
},
credentialItems: {
type: Object,
default: () => {},
},
prevRoute: {
type: Object,
default: () => {},
},
},
watch: {
configItem: function (newValue) {
this.config = newValue;
},
credentialItems: function (newValue) {
this.credentials = newValue;
},
prevRoute: function (newValue) {
this.previousRoute = newValue;
},
},
data() {
return {
config: this.configItem,
credentials: this.credentialItems,
previousRoute: this.prevRoute,
loading: false,
snackBar: {
Expand All @@ -188,7 +173,11 @@ export default {
},
};
},
computed: {},
computed: {
...mapGetters({
credentials: "auth/credentials",
}),
},
mounted() {
if (this.$isElectron) {
this.$electronService.onJiraLogin(this.jiraLogin);
Expand Down
23 changes: 7 additions & 16 deletions src/components/dialogs/AudioErrorDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,26 @@

<script>
import LogoWrapper from "../LogoWrapper.vue";
import { mapGetters } from "vuex";

export default {
name: "AudioErrorDialog",
components: {
LogoWrapper,
},
props: {
configItem: {
type: Object,
default: () => {},
},
title: String,
text: String,
},
data() {
return {
config: this.configItem,
};
},
watch: {
configItem: function (newValue) {
this.config = newValue;
},
return {};
},
computed: {
...mapGetters({
hotkeys: "config/hotkeys",
}),
cancelHotkey() {
return this.$hotkeyHelpers.findBinding(
"general.cancel",
this.config.hotkeys
);
return this.$hotkeyHelpers.findBinding("general.cancel", this.hotkeys);
},
currentTheme() {
if (this.$vuetify.theme.dark) {
Expand Down
Loading