Skip to content

Commit 25df12f

Browse files
committed
wip #92
1 parent 2720911 commit 25df12f

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

src/common/coderbot.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,15 @@ class CoderBot {
375375
return this.$axios.post(`${this.CB}/control/stop`);
376376
}
377377

378-
speak(text) {
378+
speak(text, locale) {
379379
return this.$axios.post(`${this.CB}/control/speak`, {
380-
param1: text
380+
text: text,
381+
locale: locale
381382
});
382383
}
383384

384385
takePhoto() {
385-
return this.$axios.post(`${this.CB}/photos`);
386+
return this.$axios.post(`${this.CB}/media`);
386387
}
387388

388389
recVideo() {
@@ -398,15 +399,15 @@ class CoderBot {
398399
}
399400

400401
getPhotos() {
401-
return this.$axios.get(`${this.CB}/photos`);
402+
return this.$axios.get(`${this.CB}/media`);
402403
}
403404

404405
deletePhoto(name) {
405-
return this.$axios.delete(`${this.CB}/photos${name}`);
406+
return this.$axios.delete(`${this.CB}/media/${name}`);
406407
}
407408

408409
getPhotoURL(name) {
409-
return `${this.CB}/video/stream`;
410+
return `${this.CB}/media/${name}`;
410411
}
411412

412413
}

src/components/Activity.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
{{ program.name }}
103103
</v-list-item-title>
104104
<template v-slot:prepend>
105-
<v-btn v-if="program.default != 'True'" @click="deleteProgramDlg(program.name)">
105+
<v-btn v-if="program.default" @click="deleteProgramDlg(program.name)">
106106
<v-icon icon="mdi-delete"></v-icon>
107107
</v-btn>
108108
</template>

src/components/Control.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export default {
136136
name: 'Control',
137137
methods: {
138138
say() {
139-
this.$coderbot.speak(text = this.ttstext)
139+
this.$coderbot.speak(this.ttstext, this.$i18n.locale)
140140
.then(() => {
141141
this.ttsBtnEnabled = false;
142142
this.ttsdialog = false;

src/components/Gallery.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
</a>
4343
<v-card-actions>
4444
<v-btn
45-
v-on:click="photo=photos[n-1]; confirmDeleteDlg=true" text icon color="red lighten-2">
46-
<v-icon>delete</v-icon>
45+
v-on:click="photo=photos[n-1]; confirmDeleteDlg=true">
46+
<v-icon class="white--text" icon="mdi-delete"></v-icon>
4747
</v-btn>
4848
</v-card-actions>
4949
</v-card>
@@ -56,7 +56,7 @@
5656
{{ photo.name }}
5757
</v-card-title>
5858
<v-card-text>
59-
<v-img v-if="photo.type=='jpg'" height="100%" :src="getPhotoURL(photos[n-1].thumbName)" class="grey lighten-2" ref="photo" @click="getPixelColor">
59+
<v-img v-if="photo.type=='jpg'" height="100%" :src="getPhotoURL(photo.fileName)" class="grey lighten-2" ref="photo" @click="getPixelColor">
6060
<template v-slot:placeholder>
6161
<v-row class="fill-height ma-0" align="center" justify="center">
6262
<v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>

0 commit comments

Comments
 (0)