File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 6
6
import { send_to_py } from " ./py_vue_bridge.js"
7
7
import {get_tokens } from ' ./clip_tokeniser/clip_encoder.js'
8
8
9
+ let notification_sound = new Audio (require (' @/assets/notification.mp3' ))
9
10
10
11
function remove_non_ascii (str ) {
11
12
@@ -87,6 +88,9 @@ export default {
87
88
// }
88
89
// }
89
90
if (msg_code == " nwim" ){
91
+ if (this .$parent .app_state .app_data .settings .notification_sound == true ) {
92
+ notification_sound .play ();
93
+ }
90
94
let impath = msg .substring (5 ).trim ()
91
95
if (this .attached_cbs ){
92
96
if (this .attached_cbs .on_img )
Original file line number Diff line number Diff line change 4
4
<div v-if =" !is_custom_model_loading" >
5
5
<h1 >Settings</h1 >
6
6
<br >
7
- <!-- <h2>General Settings</h2>
7
+ <h2 >General Settings</h2 >
8
8
<br >
9
9
<div class =" setting_box" >
10
10
<div class =" settings_left" >
11
+ <h2 >Notification sound</h2 >
12
+ <p >Allows to start a sound when the generation of an image is completed</p >
13
+ </div >
14
+ <hr >
15
+ <div style =" float :right ;margin-right : 9px ;align-self : center ;" >
16
+ <label class =" switch" >
17
+ <input type =" checkbox" v-model =" app_state.app_data.settings.notification_sound" checked >
18
+ <span class =" toggle round" ></span >
19
+ </label >
20
+ </div >
21
+ </div >
22
+ <hr >
23
+ <!--
24
+ <div class="setting_box">
25
+ <div class="settings_left">
11
26
<h2>Allow NSFW Content</h2>
12
27
<p>Allows image generation considered NSFW</p>
13
28
</div>
You can’t perform that action at this time.
0 commit comments