Skip to content

Commit 27a8e29

Browse files
committed
Reformat
1 parent 8749364 commit 27a8e29

5 files changed

Lines changed: 18 additions & 23 deletions

File tree

src/components/inputs/RecoreSlider.vue

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
2-
<v-container
3-
class="px-0 py-2">
2+
<v-container class="px-0 py-2">
43
<v-row>
54
<v-col :class="'pb-3'">
65
<v-subheader class="_recore-slider-subheader">
@@ -32,18 +31,15 @@ export default class RecoreSlider extends Mixins(BaseMixin) {
3231
declare type: string
3332
3433
@Prop({ type: String, required: true })
35-
declare initialValue: string
34+
declare initial_value: string
3635
3736
get value(): string {
38-
if (this.type == 'ssh'){
39-
return this.initialValue == 'yes' ? 1 : 0
40-
}
41-
else if (this.type == 'media'){
42-
return this.initialValue == 'emmc' ? 1 : 0
43-
}
44-
else {
45-
console.log("Unknown type: "+this.type)
37+
if (this.type == 'ssh') {
38+
return this.initial_value == 'yes' ? 1 : 0
39+
} else if (this.type == 'media') {
40+
return this.initial_value == 'emmc' ? 1 : 0
4641
}
42+
return 'Unknown'
4743
}
4844
4945
switchOutputPin(): void {

src/components/panels/RecorePanel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
card-class="miscellaneous-panel">
88
<div v-for="(object, index) of recore" :key="index">
99
<v-divider v-if="index"></v-divider>
10-
<recore-slider :name="object.name" :type="object.type" :initialValue="object.value"></recore-slider>
10+
<recore-slider :name="object.name" :type="object.type" :initial_value="object.value"></recore-slider>
1111
</div>
1212
</panel>
1313
</template>

src/store/server/actions.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,13 @@ export const actions: ActionTree<ServerState, RootState> = {
299299
dispatch('socket/removeInitModule', 'server/recoreState', { root: true })
300300
},
301301

302-
updateRecoreState({ commit, dispatch }, payload) {
302+
updateRecoreState({ commit }, payload) {
303303
if (payload.result == 'ok') {
304-
if (payload.requestParams.type == 'ssh'){
305-
commit('setRecoreSshEnabled', payload.requestParams.value)
306-
}
307-
else if (payload.requestParams.type == 'media'){
308-
commit('setRecoreBootMedia', payload.requestParams.value)
304+
if (payload.requestParams.type == 'ssh') {
305+
commit('setRecoreSshEnabled', payload.requestParams.value)
306+
} else if (payload.requestParams.type == 'media') {
307+
commit('setRecoreBootMedia', payload.requestParams.value)
309308
}
310309
}
311-
}
310+
},
312311
}

src/store/server/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export const getDefaultState = (): ServerState => {
4040
websocket_count: 0,
4141
moonraker_version: '',
4242
recore_state: {
43-
ssh_enabled: 'no',
44-
boot_media: 'emmc',
43+
ssh_enabled: 'no',
44+
boot_media: 'emmc',
4545
},
4646
}
4747
}

src/store/server/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export interface ServerState {
6262
history?: ServerHistoryState
6363
timelapse?: ServerTimelapseState
6464
recore_state: {
65-
ssh_enabled: string,
66-
boot_media: string
65+
ssh_enabled: string
66+
boot_media: string
6767
}
6868
}
6969

0 commit comments

Comments
 (0)