upd: vue.emergency (user can now DELETE its own messages)
This commit is contained in:
parent
044abf22e4
commit
7cb932335c
|
@ -68,6 +68,24 @@
|
|||
font-size: .8em;
|
||||
}
|
||||
|
||||
#CONTAINER.message div span.del{ /* Del btn */
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: .5em;
|
||||
left: calc( 100% - 1.5em );
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
|
||||
background: url('/image/container/del-msg.svg@777777') center center no-repeat;
|
||||
background-size: 80% auto;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#CONTAINER.message div span.del:hover{
|
||||
background-image: url('/image/container/del-msg.svg@e33222')
|
||||
}
|
||||
|
||||
#CONTAINER.message div span span.code{ /* Code block */
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="Layer_1"
|
||||
version="1.1"
|
||||
viewBox="0 0 20 22"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="del-msg.svg"
|
||||
width="20"
|
||||
height="22"><metadata
|
||||
id="metadata4199"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs4197" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1056"
|
||||
id="namedview4195"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="39.666667"
|
||||
inkscape:cx="10"
|
||||
inkscape:cy="12"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1" /><style
|
||||
type="text/css"
|
||||
id="style4191">
|
||||
.st0{fill:#1E232D;}
|
||||
</style><path
|
||||
d="M 7,0 7,2 0,2 0,4 20,4 20,2 13,2 13,0 7,0 Z M 2,6 2,19.699219 C 2,20.799219 2.9,22 4,22 l 12,0 c 1.1,0 2,-1.200781 2,-2.300781 L 18,6 16,6 16,20 4,20 4,6 2,6 Z M 7,8 7,18 9,18 9,8 7,8 Z m 4,0 0,10 2,0 0,-10 -2,0 z"
|
||||
id="fill-edit"
|
||||
inkscape:connector-curvature="0" /></svg>
|
After Width: | Height: | Size: 1.8 KiB |
|
@ -6,6 +6,7 @@
|
|||
<span class='author' v-text='msg.user' v-if='id == 0 || gstore.notif.emergency.data[id-1].user != msg.user'></span>
|
||||
<span class='content' v-html='bbcode(msg.message)'></span>
|
||||
<span class='date' v-text='local_date(id)'></span>
|
||||
<span @click='del_message(msg.id)' class='del' v-if='msg.user == gstore.server.session.name'></span>
|
||||
</div>
|
||||
|
||||
<div class='end-pad'></div> <!-- End Spacing -->
|
||||
|
@ -75,6 +76,9 @@ export default {
|
|||
});
|
||||
|
||||
},
|
||||
del_message(id_msg){
|
||||
api.call("DELETE message/emergency/"+this.dep, { id: id_msg }, function(rs){});
|
||||
},
|
||||
bbcode: function(msg){
|
||||
return this.gstore.func.bbcode(msg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue