TheDesk Usamin (18.3.0)
This commit is contained in:
parent
9bb8ec0b66
commit
f58d4f349b
|
@ -112,73 +112,6 @@ function notfColumn(acct_id, tlid, sys){
|
|||
at;
|
||||
}
|
||||
|
||||
console.log(start);
|
||||
var wsid = websocketNotf.length;
|
||||
websocketNotf[acct_id] = new WebSocket(start);
|
||||
console.log(websocketNotf);
|
||||
websocketNotf[acct_id].onopen = function(mess) {
|
||||
console.log("Connect Streaming API(Notf):");
|
||||
console.log(mess);
|
||||
$("i[data-notf=" + acct_id +"]").removeClass("red-text");
|
||||
|
||||
}
|
||||
websocketNotf[acct_id].onmessage = function(mess) {
|
||||
console.log("Receive Streaming API(Notf):"+acct_id);
|
||||
var popup = localStorage.getItem("popup");
|
||||
if (!popup) {
|
||||
popup = 0;
|
||||
}
|
||||
console.log(domain)
|
||||
if(misskey){
|
||||
console.log("misskey")
|
||||
console.log(JSON.parse(mess.data));
|
||||
if (JSON.parse(mess.data).type == "notification") {
|
||||
var obj = JSON.parse(mess.data).body;
|
||||
console.log(obj);
|
||||
if(obj.type!="follow"){
|
||||
|
||||
templete = misskeyParse([obj], 'notf', acct_id, 'notf', popup);
|
||||
}else{
|
||||
templete = misskeyUserparse([obj], 'notf', acct_id, 'notf', popup);
|
||||
}
|
||||
if(obj.type=="reaction"){
|
||||
console.log("refresh")
|
||||
reactRefresh(acct_id,obj.note.id)
|
||||
}
|
||||
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
|
||||
$("div[data-notf=" + acct_id +"]").prepend(templete);
|
||||
}
|
||||
jQuery("time.timeago").timeago();
|
||||
}else if(JSON.parse(mess.data).type == "note-updated"){
|
||||
var obj = JSON.parse(mess.data).body.note;
|
||||
reactRefreshCore(obj)
|
||||
}
|
||||
}else{
|
||||
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
||||
console.log(obj);
|
||||
var type = JSON.parse(mess.data).event;
|
||||
if (type == "notification") {
|
||||
var templete="";
|
||||
localStorage.setItem("lastnotf_" + acct_id,obj.id);
|
||||
if(obj.type!="follow"){
|
||||
templete = parse([obj], 'notf', acct_id, 'notf', popup);
|
||||
}else{
|
||||
templete = userparse([obj], 'notf', acct_id, 'notf', popup);
|
||||
}
|
||||
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
|
||||
$(".tl[data-notf=" + acct_id +"]").prepend(templete);
|
||||
}
|
||||
$(".notf-timeline[data-acct=" + acct_id +"]").prepend(templete);
|
||||
jQuery("time.timeago").timeago();
|
||||
} else if (type == "delete") {
|
||||
$("[toot-id=" + obj + "]").hide();
|
||||
$("[toot-id=" + obj + "]").remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
websocketNotf[acct_id].onerror = function(error) {
|
||||
console.error('WebSocket Error ' + error);
|
||||
};
|
||||
}
|
||||
function notfCommon(acct_id, tlid, sys) {
|
||||
todo("Notifications Loading...");
|
||||
|
@ -318,6 +251,7 @@ function notfCommon(acct_id, tlid, sys) {
|
|||
}
|
||||
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
|
||||
$("div[data-notf=" + acct_id +"]").prepend(templete);
|
||||
$("div[data-const=notf_"+acct_id+"]").prepend(templete);
|
||||
}
|
||||
jQuery("time.timeago").timeago();
|
||||
}else if(JSON.parse(mess.data).type == "note-updated"){
|
||||
|
@ -338,6 +272,7 @@ function notfCommon(acct_id, tlid, sys) {
|
|||
}
|
||||
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
|
||||
$("div[data-notf=" + acct_id +"]").prepend(templete);
|
||||
$("div[data-const=notf_"+acct_id+"]").prepend(templete);
|
||||
}
|
||||
jQuery("time.timeago").timeago();
|
||||
} else if (type == "delete") {
|
||||
|
|
|
@ -199,7 +199,7 @@ function parseColumn() {
|
|||
')" class="setting nex"><i class="material-icons waves-effect nex" title="'+lang.lang_layout_tts +'">hearing</i><span id="sta-voice-' +
|
||||
key + '">On</span></a>'+lang.lang_layout_tts +'TL<br><a onclick="reconnector(' + key +
|
||||
',\''+acct.type+'\',\''+acct.domain+'\',\''+acct.data+'\')" class="setting nex '+if_notf+'"><i class="material-icons waves-effect nex '+if_notf+'" title="'+lang.lang_layout_reconnect+'">low_priority</i></a><span class="'+if_notf+'">'+lang.lang_layout_reconnect+'</span><br>'+lang.lang_layout_headercolor +'<br><div id="picker_'+key+'" class="color-picker"></div></div><div class="tl-box" tlid="' + key + '"><div id="timeline_' + key +
|
||||
'" class="tl '+acct.type+'-timeline " tlid="' + key + '" data-type="' + acct.type + '" data-acct="'+acct.domain+'"><div id="landing_'+key+'" style="text-align:center">'+lang.lang_layout_nodata +'</div></div></div>'
|
||||
'" class="tl '+acct.type+'-timeline " tlid="' + key + '" data-type="' + acct.type + '" data-acct="'+acct.domain+'" data-const="' + acct.type + '_'+acct.domain+'"><div id="landing_'+key+'" style="text-align:center">'+lang.lang_layout_nodata +'</div></div></div>'
|
||||
$('#timeline_box_' + basekey + '_parentBox').append(html);
|
||||
localStorage.removeItem("pool_" + key);
|
||||
if (acct.data) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "thedesk",
|
||||
"version": "18.2.3",
|
||||
"version": "18.3.0",
|
||||
"description": "TheDesk is a Mastodon client for PC.",
|
||||
"repository": "https://github.com/cutls/TheDesk",
|
||||
"main": "main.js",
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
input {
|
||||
max-height: 50px !important
|
||||
}
|
||||
|
||||
.pcr-result {
|
||||
height: 1rem !important;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
input {
|
||||
max-height: 50px !important
|
||||
}
|
||||
|
||||
.pcr-result {
|
||||
height: 1rem !important;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
input {
|
||||
max-height: 50px !important
|
||||
}
|
||||
|
||||
.pcr-result {
|
||||
height: 1rem !important;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
input {
|
||||
max-height: 50px !important
|
||||
}
|
||||
|
||||
.pcr-result {
|
||||
height: 1rem !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user