diff --git a/www/images/music-broken.svg b/www/images/music-broken.svg new file mode 100644 index 0000000..9e0b732 --- /dev/null +++ b/www/images/music-broken.svg @@ -0,0 +1,30 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/www/images/music.svg b/www/images/music.svg new file mode 100644 index 0000000..bc72cad --- /dev/null +++ b/www/images/music.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/www/js/hugvey_console.js b/www/js/hugvey_console.js index c3201c9..6d5632b 100644 --- a/www/js/hugvey_console.js +++ b/www/js/hugvey_console.js @@ -727,6 +727,13 @@ class Graph { ; let textId = newNodeG.append( "text" ).attr( 'class', 'msg_id' ); let textContent = newNodeG.append( "text" ).attr( 'class', 'msg_txt' ); + let statusIcon = newNodeG.append( "image" ) + .attr( 'class', 'status_icon' ) + .attr( 'x', '-10' ) + .attr( 'y', '10' ) + .attr( 'width', '20' ) + .attr( 'height', '20' ) + ; // remove node.exit().remove(); @@ -771,6 +778,7 @@ class Graph { node.selectAll( "text.msg_id" ).text( d => d['@id'] ); node.selectAll( "text.msg_txt" ).text( d => formatText( `${d['text']}` ) ); + node.selectAll( "image.status_icon" ).attr('xlink:href', d => d['audio'] ? '' : '/images/music-broken.svg'); // console.log('q'); // // TODO: update text // let text = newNodeG.append("text")