TheDesk Mio (ver.4)

This commit is contained in:
cutls
2018-05-26 03:21:56 +09:00
parent 97e4d16642
commit d4de0a6ca8
44 changed files with 3737 additions and 17 deletions

View File

@@ -26,7 +26,7 @@
<script type="text/javascript" src="./js/ui/jquery-ui.min.js"></script>
<script>
//必ずアプデ時のremove instance消して
var ver="Mio (ver.4)";
var ver="Mio (ver.3)";
//betaを入れるとバージョンチェックしない
//var ver="beta";
var acct_id=0;

View File

@@ -177,7 +177,14 @@ function parse(obj, mix, acct_id, tlid, popup) {
if(native=="yes"){
var electron = require("electron");
var ipc = electron.ipcRenderer;
ipc.send('native-notf', ['TheDesk:'+domain,toot.account.display_name+"(" + toot.account.acct +")"+what+"\n\n"+$.strip_tags(toot.status.content),toot.account.avatar]);
var options = {
body: toot.account.display_name+"(" + toot.account.acct +")"+what+"\n\n"+$.strip_tags(toot.status.content),
icon: toot.account.avatar
};
var n = new Notification('TheDesk:'+domain, options);
console.log(n);
//ipc.send('native-notf', ['TheDesk:'+domain,toot.account.display_name+"(" + toot.account.acct +")"+what+"\n\n"+$.strip_tags(toot.status.content),toot.account.avatar]);
}
Materialize.toast("["+domain+"より]"+escapeHTML(toot.account.display_name)+what, popup * 1000);
}

View File

@@ -20,6 +20,8 @@ const app = electron.app;
withFallback: false, // Fallback to Growl or Balloons?
customPath: void 0 // Relative path if you want to use your fork of toast.exe
});
}else if(platform=="darwin"){
Notification = require('node-mac-notifier');
}
// ウィンドウを作成するモジュール
@@ -130,16 +132,24 @@ ipc.on('native-notf', function(e, args) {
var tmp_imge="";
}
notifier.notify({
message: args[1],
body: args[1],
title: args[0],
sound: false,//"Bottle",
icon : tmp_imge,
wait:false
}, function(error, response) {
});
});
}
}else if(platform=="darwin"){
Jimp.read(args[2], function (err, lenna) {
if(!err && lenna){
lenna.write(tmp_img);
var tmp_imge=tmp_img;
}else{
var tmp_imge="";
}
noti = new Notification(args[0], {body: args[0],icon: tmp_imge});
});
}
});
ipc.on('update', function(e, x, y) {

View File

@@ -1,26 +1,27 @@
{
"_from": "node-notifier@5.2.1",
"_from": "node-notifier",
"_id": "node-notifier@5.2.1",
"_inBundle": false,
"_integrity": "sha512-MIBs+AAd6dJ2SklbbE8RUDRlIVhU8MaNLh1A9SUZDUHPiZkWLFde6UNwG41yQHZEToHgJMXqyVZ9UcS/ReOVTg==",
"_location": "/node-notifier",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "tag",
"registry": true,
"raw": "node-notifier@5.2.1",
"raw": "node-notifier",
"name": "node-notifier",
"escapedName": "node-notifier",
"rawSpec": "5.2.1",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "5.2.1"
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.2.1.tgz",
"_shasum": "fa313dd08f5517db0e2502e5758d664ac69f9dea",
"_spec": "node-notifier@5.2.1",
"_spec": "node-notifier",
"_where": "C:\\Users\\ryuki\\TheDesk\\app",
"author": {
"name": "Mikael Brevik"

8
app/package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "TheDesk",
"version": "14.7.0",
"version": "15.4.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -317,6 +317,12 @@
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"itunes-nowplaying-mac": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/itunes-nowplaying-mac/-/itunes-nowplaying-mac-0.2.3.tgz",
"integrity": "sha512-1n418TnV4BnpSP6IzuxVECgPYnlm/nUZIXsblvzFVu4+rxmswXPnz3xi8XUq0r28I9njTi3g6vmBFa5YFHb8TA==",
"optional": true
},
"jimp": {
"version": "0.2.28",
"resolved": "https://registry.npmjs.org/jimp/-/jimp-0.2.28.tgz",

View File

@@ -12,9 +12,10 @@
"dependencies": {
"electron-dl": "^1.11.0",
"jimp": "^0.2.28",
"node-notifier": "5.2.1"
"node-notifier": "^5.2.1"
},
"optionalDependencies": {
"itunes-nowplaying-mac": "^0.2.3"
"itunes-nowplaying-mac": "^0.2.3",
"node-mac-notifier":"0.1.0"
}
}