@@ -3,8 +3,8 @@ use std::sync::Arc;
3
3
use itertools:: Itertools ;
4
4
use leptos:: {
5
5
component, create_node_ref, create_rw_signal, ev, event_target_value, html, spawn_local,
6
- use_context, view, IntoView , NodeRef , RwSignal , Signal , SignalGetUntracked , SignalSet ,
7
- SignalUpdate , SignalWith , SignalWithUntracked ,
6
+ use_context, view, IntoView , RwSignal , Signal , SignalGetUntracked , SignalSet , SignalUpdate ,
7
+ SignalWith , SignalWithUntracked ,
8
8
} ;
9
9
use simfony:: parse:: ParseFromStr ;
10
10
use simfony:: simplicity:: jet:: elements:: ElementsEnv ;
@@ -102,8 +102,6 @@ pub struct Runtime {
102
102
pub run_succeeded : RwSignal < Option < bool > > ,
103
103
pub debug_output : RwSignal < String > ,
104
104
pub error_output : RwSignal < String > ,
105
- // This node ref needs to be mounted somewhere in order to work.
106
- pub alarm_audio_ref : NodeRef < html:: Audio > ,
107
105
}
108
106
109
107
impl Runtime {
@@ -114,14 +112,10 @@ impl Runtime {
114
112
run_succeeded : Default :: default ( ) ,
115
113
debug_output : Default :: default ( ) ,
116
114
error_output : Default :: default ( ) ,
117
- alarm_audio_ref : Default :: default ( ) ,
118
115
}
119
116
}
120
117
121
118
fn set_success ( self , success : bool ) {
122
- if !success {
123
- self . alarm_audio_ref . get ( ) . map ( |audio| audio. play ( ) ) ;
124
- }
125
119
spawn_local ( async move {
126
120
self . run_succeeded . set ( Some ( success) ) ;
127
121
gloo_timers:: future:: TimeoutFuture :: new ( 500 ) . await ;
0 commit comments