mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 23:23:55 +08:00
feat: 添加语音盒子自定义主题功能
This commit is contained in:
@@ -448,6 +448,7 @@ export default {
|
||||
'device.bindWithCode': '6-stelliger Bestätigungscode-Bindung',
|
||||
'device.manualAdd': 'Manuell hinzufügen',
|
||||
'device.unbind': 'Bindung aufheben',
|
||||
'device.deviceThemeGeneration': 'Gerätethema erstellen',
|
||||
'device.toolCall': 'Werkzeugaufruf',
|
||||
'device.selectAtLeastOne': 'Bitte wählen Sie mindestens einen Datensatz aus',
|
||||
'device.confirmBatchUnbind': 'Sind Sie sicher, dass Sie {count} ausgewählte Geräte entbinden möchten?',
|
||||
|
||||
@@ -448,6 +448,7 @@ export default {
|
||||
'device.bindWithCode': '6-digit Verification Code Binding',
|
||||
'device.manualAdd': 'Manual Add',
|
||||
'device.unbind': 'Unbind',
|
||||
'device.deviceThemeGeneration': 'Device theme generation',
|
||||
'device.toolCall': 'Tool Call',
|
||||
'device.selectAtLeastOne': 'Please select at least one record',
|
||||
'device.confirmBatchUnbind': 'Are you sure you want to unbind {count} selected devices?',
|
||||
|
||||
@@ -448,6 +448,7 @@ export default {
|
||||
'device.bindWithCode': 'Liên kết bằng mã xác minh 6 chữ số',
|
||||
'device.manualAdd': 'Thêm thủ công',
|
||||
'device.unbind': 'Hủy liên kết',
|
||||
'device.deviceThemeGeneration': 'Tạo chủ đề thiết bị',
|
||||
'device.toolCall': 'Gọi công cụ',
|
||||
'device.selectAtLeastOne': 'Vui lòng chọn ít nhất một bản ghi',
|
||||
'device.confirmBatchUnbind': 'Bạn có chắc chắn muốn hủy liên kết {count} thiết bị đã chọn?',
|
||||
|
||||
@@ -448,6 +448,7 @@ export default {
|
||||
'device.bindWithCode': '6位验证码绑定',
|
||||
'device.manualAdd': '手动添加',
|
||||
'device.unbind': '解绑',
|
||||
'device.deviceThemeGeneration': '设备主题生成',
|
||||
'device.toolCall': '工具调用',
|
||||
'device.selectAtLeastOne': '请至少选择一条记录',
|
||||
'device.confirmBatchUnbind': '确认要解绑选中的 {count} 台设备吗?',
|
||||
|
||||
@@ -448,6 +448,7 @@ export default {
|
||||
'device.bindWithCode': '6位驗證碼綁定',
|
||||
'device.manualAdd': '手動添加',
|
||||
'device.unbind': '解綁',
|
||||
'device.deviceThemeGeneration': '設備主題生成',
|
||||
'device.toolCall': '工具調用',
|
||||
'device.selectAtLeastOne': '請至少選擇一條記錄',
|
||||
'device.confirmBatchUnbind': '確認要解綁選中的 {count} 台設備嗎?',
|
||||
|
||||
@@ -64,6 +64,9 @@
|
||||
<el-button size="mini" type="text" @click="handleUnbind(scope.row.device_id)">
|
||||
{{ $t('device.unbind') }}
|
||||
</el-button>
|
||||
<el-button v-if="isGenerate(scope.row)" size="mini" type="text" @click="handleGenertor">
|
||||
{{ $t('device.deviceThemeGeneration') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -334,6 +337,10 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
handleGenertor() {
|
||||
sessionStorage.setItem('devicePath', window.location.href);
|
||||
window.location.href = `${window.location.origin}/generator/index.html`;
|
||||
},
|
||||
goFirst() {
|
||||
this.currentPage = 1;
|
||||
},
|
||||
@@ -467,6 +474,11 @@ export default {
|
||||
this.$message.error(msg || this.$t('message.error'))
|
||||
})
|
||||
},
|
||||
// 判断是否可以生成表情、主题、字体bin文件
|
||||
isGenerate(row) {
|
||||
const version = row.firmwareVersion.replace(/\./g, '');
|
||||
return Number(version) >= 200;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user