'+
- '
'+
+ '
'+
'
'+
'
';
+ $("#mute-cli").append(templete);
+ });
+}
+}
+function cliMuteDel(key){
+ var cli = localStorage.getItem("client_mute");
+ var obj = JSON.parse(cli);
+ obj.splice(key, 1);
+ var json = JSON.stringify(obj);
+ localStorage.setItem("client_mute", json);
+ mute();
+}
+
+function wordmute(){
+ var word = localStorage.getItem("word_mute");
+ var obj = JSON.parse(word);
+ $('#wordmute').material_chip({
+ data: obj,
+ });
+}
+function wordmuteSave(){
+ var word=$('#wordmute').material_chip('data');
+ var json = JSON.stringify(word);
+ localStorage.setItem("word_mute", json);
+}
+
+function wordemp(){
+ var word = localStorage.getItem("word_emp");
+ var obj = JSON.parse(word);
+ $('#wordemp').material_chip({
+ data: obj,
+ });
+}
+function wordempSave(){
+ var word=$('#wordemp').material_chip('data');
+ var json = JSON.stringify(word);
+ localStorage.setItem("word_emp", json);
+}
\ No newline at end of file
diff --git a/app/js/userdata/showOnTL.js b/app/js/userdata/showOnTL.js
index 0e3ac7e5..3fb08ac5 100644
--- a/app/js/userdata/showOnTL.js
+++ b/app/js/userdata/showOnTL.js
@@ -51,14 +51,17 @@ function udg(user, acct_id) {
if(json.username!=json.acct){
//Remote
$('#his-data').attr("remote", "true");
+ var fullname=json.acct;
}else{
$('#his-data').attr("remote", "false");
+ var fullname=json.acct+"@"+domain;
}
utl(json.id, '', acct_id);
flw(json.id, '', acct_id);
fer(json.id, '', acct_id);
$("#his-name").text(json.display_name);
$("#his-acct").text(json.acct);
+ $("#his-acct").attr("fullname",fullname);
$("#his-prof").attr("src", json.avatar);
$('#his-data').css('background-image', 'url(' + json.header + ')');
$("#his-sta").text(json.statuses_count);
@@ -85,6 +88,7 @@ function udg(user, acct_id) {
$("#his-mute-btn").hide();
$("#his-notf-btn").hide();
$("#his-domain-btn").hide();
+ $("#his-emp-btn").hide();
$("#my-data-nav").show();
$("#his-data-nav").hide();
} else {
@@ -195,6 +199,7 @@ function reset(){
$("#his-mute-btn").show();
$("#his-notf-btn").show();
$("#his-domain-btn").show();
+ $("#his-emp-btn").show();
$("#his-follow-btn").text("フォロー");
$("#his-mute-btn").text("ミュート");
$("#his-block-btn").text("ブロック");
diff --git a/app/main.js b/app/main.js
index 1185e719..99df0e48 100644
--- a/app/main.js
+++ b/app/main.js
@@ -5,6 +5,9 @@ const electron = require("electron");
const fs = require("fs");
const dialog = require('electron').dialog;
var Jimp = require("jimp");
+const shell = electron.shell;
+const os = require('os')
+const path = require('path')
// アプリケーションをコントロールするモジュール
const app = electron.app;
@@ -41,7 +44,7 @@ function createWindow() {
electron.session.defaultSession.clearCache(() => {})
if(process.argv){
if(process.argv[1]){
- var m = process.argv[1].match(/([a-zA-Z0-9]+)\/\?[a-zA-Z-0-9]+=([a-zA-Z-0-9]+)/);
+ var m = process.argv[1].match(/([a-zA-Z0-9]+)\/\?[a-zA-Z-0-9]+=(.+)/);
if(m){
var mode=m[1];
var code=m[2];
@@ -80,19 +83,36 @@ ipc.on('update', function(e, x, y) {
return "true"
})
-ipc.on('nano', function(e, x, y) {
+ipc.on('screen', function(e, args) {
var window = new BrowserWindow({
- width: 300,
- height: 100,
- "transparent": true, // ウィンドウの背景を透過
+ width: args[0],
+ height: args[1],
+ "transparent": false, // ウィンドウの背景を透過
"frame": false, // 枠の無いウィンドウ
- "resizable": false
+ "resizable": true
});
- window.loadURL('file://' + __dirname + '/nano.html');
+ window.loadURL('file://' + __dirname + '/screenshot.html?id='+args[2]);
window.setAlwaysOnTop(true);
window.setPosition(0, 0);
return "true"
})
+//Web魚拓
+ipc.on('shot', function(e, args) {
+ console.log(args[0]);
+ Jimp.read(Buffer.from( args[3],'base64'), function (err, lenna) {
+ if (err) throw err;
+ lenna.crop( 0, 0, args[1], args[2] ).write(app.getPath('home')+"\\Pictures\\TheDesk\\Screenshots\\"+args[4]+"-toot.png");
+ });
+ shell.showItemInFolder(app.getPath('home')+"\\Pictures\\TheDesk\\Screenshots\\");
+})
+ipc.on('shot-img-dl', (e, args) => {
+ Jimp.read(args[0], function (err, lenna) {
+ if (err) throw err;
+ lenna.write(app.getPath('home')+"\\Pictures\\TheDesk\\Screenshots\\"+args[1]);
+ });
+
+});
+//アプデDL
ipc.on('download-btn', (e, args) => {
if(args=="true"){
dialog.showSaveDialog(null, {
@@ -143,10 +163,12 @@ function dl(files,fullname){
.catch(console.error);
}
ipc.on('general-dl', (e, args) => {
- console.log(args)
+ var name="";
+ var dir=app.getPath('home')+"\\Pictures\\TheDesk";
mainWindow.webContents.send('general-dl-message', "ダウンロードを開始します。");
const opts = {
- directory: app.getPath('home')+"\\Pictures\\TheDesk",
+ directory: dir,
+ filename:name,
openFolderWhenDone: true,
onProgress: function(e) {
mainWindow.webContents.send('general-dl-prog', e);
@@ -154,7 +176,7 @@ ipc.on('general-dl', (e, args) => {
saveAs: false
};
download(BrowserWindow.getFocusedWindow(),
- args, opts)
+ args[0], opts)
.then(dl => {
mainWindow.webContents.send('general-dl-message', "ダウンロードが完了しました。");
})
@@ -195,4 +217,14 @@ ipc.on('bmp-image', (e, args) => {
});
});
+ipc.on('nano', function (e, x, y) {
+ var window = new BrowserWindow({width: 300, height: 200,
+ "transparent": false, // ウィンドウの背景を透過
+ "frame": false, // 枠の無いウィンドウ
+ "resizable": false });
+ window.loadURL('file://' + __dirname + '/nano.html');
+ window.setAlwaysOnTop(true);
+ window.setPosition(0, 0);
+ return "true"
+ })
app.setAsDefaultProtocolClient('thedesk')
diff --git a/app/nano.html b/app/nano.html
new file mode 100644
index 00000000..3775b02f
--- /dev/null
+++ b/app/nano.html
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
TheDesk Nano
+
+
+
+
+
+
+
+
+
+ Local
+ Home
+
+ 表示
+ 終了
+
+
+
+
+
+
+
投稿
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/package.json b/app/package.json
index 3b25c8d7..cbf58820 100644
--- a/app/package.json
+++ b/app/package.json
@@ -1,6 +1,6 @@
{
"name": "TheDesk",
- "version": "12.8.0",
+ "version": "13.1.0",
"description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです",
"main": "main.js",
"scripts": {
diff --git a/app/screenshot.html b/app/screenshot.html
new file mode 100644
index 00000000..530cca88
--- /dev/null
+++ b/app/screenshot.html
@@ -0,0 +1,29 @@
+
+
+
+
TheDesk Screenshot
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
数秒お待ち下さい。完了後エクスプローラーが表示されます。
\ No newline at end of file
diff --git a/app/setting.html b/app/setting.html
index 81aa6dc3..e98b0a89 100644
--- a/app/setting.html
+++ b/app/setting.html
@@ -61,7 +61,6 @@
px
設定
-