diff --git a/LATEST.md b/LATEST.md
index 3598e91d..2aad7774 100644
--- a/LATEST.md
+++ b/LATEST.md
@@ -1,23 +1,29 @@
## For Astarte(kirishima.cloud), My Primary Instance
-TheDesk :thedesk: Mio (ver.6)
-・ウィンドウの最大化を記憶するように
-・v2.4.0/1対応(bot表示/v2-search/rc時のトレンドタグ)
-・NanoウィンドウのUI改善
-・キーボードショートカット追加(Ctrl+Shift+1/2/3で特定文字を入力)
-・Spotifyのアートワーク投稿を任意に
-・さまざまなバグを修正
+TheDesk :thedesk: Mio (ver.7)
+・公開範囲情報の記録がインスタンスごとに(これにより一度記録がリセットされます。)
+・インスタンスのユーザー設定に従った公開範囲指定(アカウント設定より情報更新をしてください。)
+・インスタンスカラーを設定できるように(アカウント設定から)
+・スクリーンショット(魚拓)機能の高速化
+・Integrated TLのバグ修正
+・キーボードショートカットのバグ修正
+・コピペのバグ改善(ただし、ワンクリックコピーで複数の絵文字があるトゥートをコピーするとバグが発生します)
+・CWのバグ改善
+・[b]DTP鯖(dtp-mstdn.jp)( #dtp )とtheboss.tech( #theboss_tech )をサポート[/b]タグ付きトゥート時、デフォルトタグがないとき確認ダイアログが表示されます。
ほか
https://thedesk.top
:github: https://github.com/cutls/TheDesk #Desk #DeskUpdate
## For Other Instances
-PCクライアントTheDesk Mio (ver.3)
-・ウィンドウの最大化を記憶するように
-・v2.4.0/1対応(bot表示/v2-search/rc時のトレンドタグ)
-・NanoウィンドウのUI改善
-・キーボードショートカット追加(Ctrl+Shift+1/2/3で特定文字を入力)
-・Spotifyのアートワーク投稿を任意に
-・さまざまなバグを修正
+PCクライアントTheDesk Mio (ver.7)
+・公開範囲情報の記録がインスタンスごとに(これにより一度記録がリセットされます。)
+・インスタンスのユーザー設定に従った公開範囲指定(アカウント設定より情報更新をしてください。)
+・インスタンスカラーを設定できるように(アカウント設定から)
+・スクリーンショット(魚拓)機能の高速化
+・Integrated TLのバグ修正
+・キーボードショートカットのバグ修正
+・コピペのバグ改善(ただし、ワンクリックコピーで複数の絵文字があるトゥートをコピーするとバグが発生します)
+・CWのバグ改善
+・DTP鯖(dtp-mstdn.jp)( #dtp )とtheboss.tech( #theboss_tech )をサポート。タグ付きトゥート時、デフォルトタグがないとき確認ダイアログが表示されます。
https://thedesk.top
\ No newline at end of file
diff --git a/app/acct.html b/app/acct.html
index 31d6603e..477d0b26 100644
--- a/app/acct.html
+++ b/app/acct.html
@@ -15,6 +15,9 @@
body,html{overflow-y: scroll;}
#acct-list{display:flex; flex-wrap:wrap; color:white; align-items: flex-start}
.lts{font-size:150%}
+.colorsel{ display:flex; }
+.card .colorsel div:not(.exc){width:20px;height:20px;}
+.card .colorsel div.exc{width:40px;height:20px;}
@@ -68,6 +71,6 @@ body,html{overflow-y: scroll;}
マストドンバージョン:
-
+
\ No newline at end of file
diff --git a/app/css/master.css b/app/css/master.css
index 35cad694..860df449 100644
--- a/app/css/master.css
+++ b/app/css/master.css
@@ -254,7 +254,7 @@ blockquote:before, .quote:before {
/*スクロールバー*/
::-webkit-scrollbar {
width: 5px;
- height: 5px;
+ height: 10px;
background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-track {
diff --git a/app/index.html b/app/index.html
index c390ce47..a124ad0d 100644
--- a/app/index.html
+++ b/app/index.html
@@ -24,7 +24,7 @@
+
diff --git a/app/js/common/keyshortcut.js b/app/js/common/keyshortcut.js
index a226df1d..e819d8bf 100644
--- a/app/js/common/keyshortcut.js
+++ b/app/js/common/keyshortcut.js
@@ -145,7 +145,7 @@ $(function($) {
if (event.ctrlKey && event.shiftKey) {
if (e.keyCode >= 49 && e.keyCode <= 51) {
var no=e.keyCode-48;
- if(localStorage.getItem("oks-"+no)){$("#textarea").val(localStorage.getItem("oks-"+no))}
+ if(localStorage.getItem("oks-"+no)){$("#textarea").val($("#textarea").val()+localStorage.getItem("oks-"+no))}
return false;
}
}
diff --git a/app/js/login/instance.js b/app/js/login/instance.js
index d993189d..0eb7d723 100644
--- a/app/js/login/instance.js
+++ b/app/js/login/instance.js
@@ -1,51 +1,77 @@
-//入力時にハッシュタグと@をサジェスト
-var timer = null;
+//インスタンスリスト
+var idata={
+ "kirishima.cloud":"instance",
+ "kirishima.cloud_name":"アスタルテ",
+ "kirishima.cloud_letters":"6229",
+ "kirishima.cloud_bbcode":"enabled",
+ "kirishima.cloud_markdown":"enabled",
+ "minohdon.jp":"instance",
+ "minohdon.jp_name":"箕面丼",
+ "minohdon.jp_letters":"500",
+ "minohdon.jp_bbcode":"disabled",
+ "minohdon.jp_markdown":"disabled",
+ "knzk.me":"instance",
+ "knzk.me_name":"神崎丼",
+ "knzk.me_letters":"5000",
+ "knzk.me_bbcode":"disabled",
+ "knzk.me_markdown":"disabled",
+ "mastodos.com":"instance",
+ "mastodos.com_name":"マストどす",
+ "mastodos.com_letters":"500",
+ "mastodos.com_bbcode":"disabled",
+ "mastodos.com_markdown":"disabled",
+ "dev.kirishima.cloud":"hidden",
+ "dev.kirishima.cloud_name":"アスタルテ(Dev)",
+ "dev.kirishima.cloud_letters":"6229",
+ "dev.kirishima.cloud_bbcode":"enabled",
+ "dev.kirishima.cloud_markdown":"enabled",
+ "mstdn.y-zu.org":"instance",
+ "mstdn.y-zu.org_name":"Yづドン!(502 BadGateway)",
+ "mstdn.y-zu.org_letters":"500",
+ "mstdn.y-zu.org_bbcode":"disabled",
+ "mstdn.y-zu.org_markdown":"disabled",
+ "imastodon.net":"instance",
+ "imastodon.net_name":"im@stodon",
+ "imastodon.net_letters":"500",
+ "imastodon.net_bbcode":"disabled",
+ "imastodon.net_markdown":"disabled",
+ "imastodon.net_home":"オフィス",
+ "imastodon.net_local":"楽屋",
+ "imastodon.net_notification":"ホワイトボード",
+ "imastodon.net_public":"ライブステージ",
+ "mstdn.osaka":"instance",
+ "mstdn.osaka_name":"大阪丼",
+ "mstdn.osaka_letters":"500",
+ "mstdn.osaka_bbcode":"disabled",
+ "mstdn.osaka_markdown":"disabled",
+ "mstdn.osaka_home":"ウチ",
+ "mstdn.osaka_local":"近所",
+ "mstdn.osaka_notification":"あめちゃん",
+ "mstdn.osaka_public":"新世界",
+ "mstdn.kemono-friends.info":"instance",
+ "mstdn.kemono-friends.info_name":"ますとどんちほー",
+ "mstdn.kemono-friends.info_letters":"1024",
+ "mstdn.kemono-friends.info_bbcode":"disabled",
+ "mstdn.kemono-friends.info_markdown":"disabled",
+ "mstdn.kemono-friends.info_home":"なわばり",
+ "mstdn.kemono-friends.info_local":"ますとどんちほー",
+ "mstdn.kemono-friends.info_notification":"ねえねえ!",
+ "mstdn.kemono-friends.info_public":"ジャパリパーク",
+ "itabashi.0j0.jp":"instance",
+ "itabashi.0j0.jp_name":"板橋丼",
+ "itabashi.0j0.jp_letters":"1024",
+ "itabashi.0j0.jp_bbcode":"disabled",
+ "itabashi.0j0.jp_markdown":"disabled",
+ "theboss.tech":"instance",
+ "theboss.tech_name":"theboss.tech",
+ "theboss.tech_letters":"1000",
+ "theboss.tech_bbcode":"disabled",
+ "theboss.tech_markdown":"disabled",
+ "dtp-mstdn.jp":"instance",
+ "dtp-mstdn.jp_name":"DTP鯖",
+ "dtp-mstdn.jp_letters":"500",
+ "dtp-mstdn.jp_bbcode":"disabled",
+ "dtp-mstdn.jp_markdown":"disabled"
+};
-var input = document.getElementById("url");
-
-var prev_val = input.value;
-var oldSuggest;
-var suggest;
-input.addEventListener("focus", function() {
- $("#ins-suggest").html("");
- window.clearInterval(timer);
- timer = window.setInterval(function() {
- var new_val = input.value;
- if (prev_val != new_val) {
- if (new_val.length > 3) {
- var start = "https://instances.social/api/1.0/instances/search?q=" +
- new_val;
- fetch(start, {
- method: 'GET',
- headers: {
- 'content-type': 'application/json',
- 'Authorization': 'Bearer tC8F6xWGWBUwGScyNevYlx62iO6fdQ4oIK0ad68Oo7ZKB8GQdGpjW9TKxBnIh8grAhvd5rw3iyP9JPamoDpeLQdz62EToPJUW99hDx8rfuJfGdjQuimZPTbIOx0woA5M'
- },
- }).then(function(response) {
- return response.json();
- }).catch(function(error) {
- todo(error);
- console.error(error);
- }).then(function(json) {
- console.log(json);
- if (!json.error) {
-
- var urls = "もしかして:";
- Object.keys(json.instances).forEach(function(key) {
- var url = json.instances[key];
- urls = urls + ' ' + url.name + ' ';
- });
- $("#ins-suggest").html(urls);
- }
- });
- }
- oldSuggest = suggest;
- prev_value = new_val;
- }
- }, 1000);
-}, false);
-
-input.addEventListener("blur", function() {
- window.clearInterval(timer);
-}, false);
+localStorage.setItem("instance", JSON.stringify(idata));
diff --git a/app/js/login/login.js b/app/js/login/login.js
index a58a46be..a7fea708 100644
--- a/app/js/login/login.js
+++ b/app/js/login/login.js
@@ -5,71 +5,6 @@
localStorage.removeItem("kirishima")
localStorage.removeItem("imas")
localStorage.removeItem("image");
-var idata={
- "kirishima.cloud":"instance",
- "kirishima.cloud_name":"アスタルテ",
- "kirishima.cloud_letters":"6229",
- "kirishima.cloud_bbcode":"enabled",
- "kirishima.cloud_markdown":"enabled",
- "minohdon.jp":"instance",
- "minohdon.jp_name":"箕面丼",
- "minohdon.jp_letters":"500",
- "minohdon.jp_bbcode":"disabled",
- "minohdon.jp_markdown":"disabled",
- "knzk.me":"instance",
- "knzk.me_name":"神崎丼",
- "knzk.me_letters":"5000",
- "knzk.me_bbcode":"disabled",
- "knzk.me_markdown":"disabled",
- "mastodos.com":"instance",
- "mastodos.com_name":"マストどす",
- "mastodos.com_letters":"500",
- "mastodos.com_bbcode":"disabled",
- "mastodos.com_markdown":"disabled",
- "dev.kirishima.cloud":"hidden",
- "dev.kirishima.cloud_name":"アスタルテ(Dev)",
- "dev.kirishima.cloud_letters":"6229",
- "dev.kirishima.cloud_bbcode":"enabled",
- "dev.kirishima.cloud_markdown":"enabled",
- "mstdn.y-zu.org":"instance",
- "mstdn.y-zu.org_name":"Yづドン!(502 BadGateway)",
- "mstdn.y-zu.org_letters":"500",
- "mstdn.y-zu.org_bbcode":"disabled",
- "mstdn.y-zu.org_markdown":"disabled",
- "imastodon.net":"instance",
- "imastodon.net_name":"im@stodon",
- "imastodon.net_letters":"500",
- "imastodon.net_bbcode":"disabled",
- "imastodon.net_markdown":"disabled",
- "imastodon.net_home":"オフィス",
- "imastodon.net_local":"楽屋",
- "imastodon.net_notification":"ホワイトボード",
- "imastodon.net_public":"ライブステージ",
- "mstdn.osaka":"instance",
- "mstdn.osaka_name":"大阪丼",
- "mstdn.osaka_letters":"500",
- "mstdn.osaka_bbcode":"disabled",
- "mstdn.osaka_markdown":"disabled",
- "mstdn.osaka_home":"ウチ",
- "mstdn.osaka_local":"近所",
- "mstdn.osaka_notification":"あめちゃん",
- "mstdn.osaka_public":"新世界",
- "mstdn.kemono-friends.info":"instance",
- "mstdn.kemono-friends.info_name":"ますとどんちほー",
- "mstdn.kemono-friends.info_letters":"1024",
- "mstdn.kemono-friends.info_bbcode":"disabled",
- "mstdn.kemono-friends.info_markdown":"disabled",
- "mstdn.kemono-friends.info_home":"なわばり",
- "mstdn.kemono-friends.info_local":"ますとどんちほー",
- "mstdn.kemono-friends.info_notification":"ねえねえ!",
- "mstdn.kemono-friends.info_public":"ジャパリパーク",
- "itabashi.0j0.jp":"instance",
- "itabashi.0j0.jp_name":"板橋丼",
- "itabashi.0j0.jp_letters":"1024",
- "itabashi.0j0.jp_bbcode":"disabled",
- "itabashi.0j0.jp_markdown":"disabled",
-};
-localStorage.setItem("instance", JSON.stringify(idata));
function ck() {
var main = localStorage.getItem("main");
@@ -236,7 +171,9 @@ function getdata() {
name: json["display_name"],
domain: domain,
user: json["acct"],
- prof: avatar
+ prof: avatar,
+ id: json["id"],
+ vis: json["source"]["privacy"]
}];
var json = JSON.stringify(obj);
console.log(obj);
@@ -285,7 +222,8 @@ function getdataAdv(domain, at) {
domain: domain,
user: json["acct"],
prof: avatar,
- id: json["id"]
+ id: json["id"],
+ vis: json["source"]["privacy"]
};
var multi = localStorage.getItem("multi");
var obj = JSON.parse(multi);
@@ -408,6 +346,12 @@ function multi() {
}
$("#acct-sel-prof").attr("src",profimg);
$("#toot-post-btn").text("トゥート("+domain+")");
+ if(acct.background && acct.background!="def" && acct.text && acct.text!="def"){
+ $("#toot-post-btn").removeClass("indigo");
+ $("#toot-post-btn").css("background-color","#"+acct.background);
+ $("#toot-post-btn").css("color",acct.text);
+ }else{
+ }
if(domain=="kirishima.cloud"){
$("#faicon-btn").show();
}else{
diff --git a/app/js/login/manager.js b/app/js/login/manager.js
index b5159956..ac90970c 100644
--- a/app/js/login/manager.js
+++ b/app/js/login/manager.js
@@ -30,7 +30,12 @@ function load() {
Object.keys(obj).forEach(function(key) {
var acct = obj[key];
var list = key * 1 + 1;
- templete = '
(.+)<\/p>$/)[1]; + html = html.replace(/^
(.+)<\/p>$/,"$1");
html = html.replace(/
/, "\n");
html = html.replace(/
/, "\n");
html = html.replace(/<\/p>/, "\n");
+ console.log(html);
+ html = html.replace(//g, "$1");
html=$.strip_tags(html);
if(execCopy(html)){
Materialize.toast("トゥート本文をコピーしました", 1500);
@@ -222,14 +224,49 @@ function staCopy(id){
}
//魚拓
function shot(){
- var id=$("#tootmodal").attr("data-id");
- var w=$("#toot-this").width();
- var h=$("#toot-this").height()+150;
- var text=$("#toot-this").html();
- localStorage.setItem("sc-text",text)
+ var title=$("#tootmodal").attr("data-id");
+ var off = $('#toot-this').offset();
+ var w=$("#toot-this").width()+50;
+ var h=$("#toot-this").height()+50;
var electron = require("electron");
+ const fs = require("fs");
+ const os = require('os')
+ const shell = electron.shell;
+ const path = require('path')
var ipc = electron.ipcRenderer;
- ipc.send('screen', [w,h,id]);
+ let options = {
+ types: ['screen'],
+ thumbnailSize: {
+ width: window.parent.screen.width,
+ height: window.parent.screen.height
+ }
+ }
+ const desktopCapturer = electron.desktopCapturer;
+ desktopCapturer.getSources(options, function(error, sources) {
+ if (error) return console.log(error)
+
+ sources.forEach(function(source) {
+ if (source.name === 'Screen 1' || source.name === 'TheDesk') {
+ var durl=source.thumbnail.toDataURL();
+ var b64 = durl.match(
+ /data:image\/png;base64,(.+)/
+ );
+ const screenshotPath = path.join(os.tmpdir(), 'screenshot.png');
+ const savePath = path.join(os.tmpdir(), 'screenshot.png');
+ var ipc = electron.ipcRenderer;
+ ipc.send('shot', ['file://' + screenshotPath,w,h,b64[1],title,off.top+50,off.left]);
+ if($("#toot-this .img-parsed").length>0){
+ for(i=0;i<$("#toot-this .img-parsed").length;i++){
+ var url=$("#toot-this .img-parsed").eq(i).attr("data-url");
+ ipc.send('shot-img-dl', [url,title+"_img"+i+".png"]);
+ }
+ }
+ return;
+ const message = `Saved screenshot to: ${screenshotPath}`
+ //screenshotMsg.textContent = message
+ }
+ })
+ })
}
//翻訳
function trans(tar){
diff --git a/app/js/tl/mix.js b/app/js/tl/mix.js
index 1e7efcda..c7c774c9 100644
--- a/app/js/tl/mix.js
+++ b/app/js/tl/mix.js
@@ -36,7 +36,7 @@ function mixtl(acct_id, tlid, type) {
var homearr=[];
var timeline = jsonL.concat(jsonH);
timeline.sort(function(a,b){
- if(date(a.created_at,"unix")>date(b.created_at,"unix")) return -1;
+ if(date(a.created_at,"unix")>=date(b.created_at,"unix")) return -1;
if(date(a.created_at,"unix")