switch mp3 to tts, add genserver to app supervisor tree that periodically checks for newly connected devices and plays their associated tts message
This commit is contained in:
@@ -20,7 +20,7 @@ defmodule HereIAmWeb.DeviceLive.FormComponent do
|
||||
phx-submit="save"
|
||||
>
|
||||
<.input field={@form[:ip_address]} type="text" label="IP Address" />
|
||||
<.input field={@form[:audio]} type="text" label="Audio" />
|
||||
<.input field={@form[:tts]} type="text" label="tts" />
|
||||
<:actions>
|
||||
<.button phx-disable-with="Saving...">Save Device</.button>
|
||||
</:actions>
|
||||
|
@@ -13,7 +13,7 @@
|
||||
row_click={fn {_id, device} -> JS.navigate(~p"/devices/#{device}") end}
|
||||
>
|
||||
<:col :let={{_id, device}} label="IP Address"><%= device.ip_address %></:col>
|
||||
<:col :let={{_id, device}} label="Audio"><%= device.audio %></:col>
|
||||
<:col :let={{_id, device}} label="TTS"><%= device.tts %></:col>
|
||||
<:action :let={{_id, device}}>
|
||||
<div class="sr-only">
|
||||
<.link navigate={~p"/devices/#{device}"}>Show</.link>
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
<.list>
|
||||
<:item title="IP Address"><%= @device.ip_address %></:item>
|
||||
<:item title="Audio"><%= @device.audio %></:item>
|
||||
<:item title="TTS"><%= @device.tts %></:item>
|
||||
</.list>
|
||||
|
||||
<.back navigate={~p"/devices"}>Back to devices</.back>
|
||||
|
Reference in New Issue
Block a user