TheDesk Mizuki (ver.5)

This commit is contained in:
cutls 2018-04-08 23:17:33 +09:00
parent 57079a7b93
commit 589945a1a4
16 changed files with 246 additions and 34 deletions

View File

@ -1,22 +1,18 @@
## For Astarte(kirishima.cloud), My Primary Instance
TheDesk :thedesk: Mizuki (ver.4)
・カラムヘッダーにの色変更(21色+デフォルト)
・画像読み込み進捗表示
・引用トゥートボタン
・トゥート詳細をブラウザで開くボタン
・トゥート内のトゥートへのリンクをTheDesk内で開く
TheDesk :thedesk: Mizuki (ver.5)
・アップデータを改良
・トゥートリンクを踏んだときの利用アカウントについて改良
・板橋丼サポート(限定公開もサポート)
ほか
https://thedesk.top
:github: https://github.com/cutls/TheDesk #Desk #DeskUpdate
## For Vanilla Instances
Windows/LinuxクライアントTheDesk Mizuki (ver.4)リリース
・カラムヘッダーにの色変更(21色+デフォルト)
・画像読み込み進捗表示
・引用トゥートボタン
・トゥート詳細をブラウザで開くボタン
・トゥート内のトゥートへのリンクをTheDesk内で開く
PCクライアントTheDesk :thedesk: Mizuki (ver.5)
・アップデータを改良
・トゥートリンクを踏んだときの利用アカウントについて改良
・板橋丼サポート(限定公開もサポート)
TheDeskはマルチカラムマルチアカウントはもちろんのことなにかとマストドンライフをシンプルに効率化するクライアントです。
https://thedesk.top

View File

@ -26,7 +26,7 @@
<script type="text/javascript" src="./js/ui/jquery-ui.min.js"></script>
<script>
//必ずアプデ時のremove instance消して
var ver="Mizuki (ver.4)";
var ver="Mizuki (ver.5)";
//betaを入れるとバージョンチェックしない
//var ver="beta";
var acct_id=0;
@ -262,7 +262,7 @@ var tlid=0;
</div>
<div class="mize" style="float:left;">
<a onclick="profShow()" style="vertical-align:-2.5rem;" class="pointer">
<img src="" id="acct-sel-prof" title="選択中のプロフィール表示(Ctrl+Shift+P)" data-trans-title="post_box_prof" width="24px">
<img src="./img/missing.svg" id="acct-sel-prof" title="選択中のプロフィール表示(Ctrl+Shift+P)" data-trans-title="post_box_prof" width="24px">
</a>
</div>
<!--Markdown-->
@ -357,6 +357,9 @@ var tlid=0;
<li>
<a onclick="vis('private')" id="private-button">非公開(Private)</a>
</li>
<li id="limited-button" class="hide">
<a onclick="vis('limited')">限定公開(Limited)</a>
</li>
<li>
<a onclick="vis('direct')" class="disabled direct">ダイレクト(Direct)</a>
</li>

View File

@ -61,7 +61,12 @@ var idata={
"mstdn.kemono-friends.info_home":"なわばり",
"mstdn.kemono-friends.info_local":"ますとどんちほー",
"mstdn.kemono-friends.info_notification":"ねえねえ!",
"mstdn.kemono-friends.info_public":"ジャパリパーク"
"mstdn.kemono-friends.info_public":"ジャパリパーク",
"itabashi.0j0.jp":"instance",
"itabashi.0j0.jp_name":"板橋丼",
"itabashi.0j0.jp_letters":"500",
"itabashi.0j0.jp_bbcode":"disabled",
"itabashi.0j0.jp_markdown":"disabled",
};
localStorage.setItem("instance", JSON.stringify(idata));

View File

@ -13,7 +13,13 @@
toot = url.match(/https:\/\/([a-zA-Z0-9.-]+)\/@([a-zA-Z0-9_]+)\/([0-9]+)/);
if(toot){
if(toot[1]){
detEx(url);
var acct_id=$a.parent().attr("data-acct");
if(!acct_id){
acct_id=0;
}
$a.parent().addClass("loadp")
$a.parent().text("Loading...")
detEx(url,acct_id);
}
}else{
//hrefがhttp/httpsならブラウザで

View File

@ -18,10 +18,10 @@ function mdCheck(){
localStorage.removeItem("md");
}
var domain = localStorage.getItem("domain_" + acct_id);
if(domain=="mstdn.y-zu.org"){
$("#private-button").text("限定公開(Yづドン!)");
if(domain=="itabashi.0j0.jp"){
$("#limited-button").removeClass("hide");
}else{
$("#private-button").text("非公開(Private)");
$("#limited-button").addClass("hide");
}
if(domain=="kirishima.cloud"){
$("#faicon-btn").show();

View File

@ -119,7 +119,7 @@ function emojiInsert(code, del) {
}
if (!del) {
$("#textarea").val(newt);
emoji();
//emoji();
} else {
var regExp = new RegExp(del, "g");
var now = now.replace(regExp, "");

View File

@ -35,6 +35,9 @@ function vis(set){
}else if(set=="direct"){
$("#vis-icon i").text("mail");
$("#vis-icon").addClass("red");
}else if(set=="limited"){
$("#vis-icon i").text("group");
$("#vis-icon").addClass("teal");
}
var vis=localStorage.getItem("vis");
if(vis=="memory"){

View File

@ -6,12 +6,31 @@ var input = document.getElementById("textarea");
var prev_val = input.value;
var oldSuggest;
var suggest;
input.addEventListener("focus", function() {
var acct_id = $("#post-acct-sel").val();
$("#suggest").html("");
window.clearInterval(timer);
timer = window.setInterval(function() {
var new_val = input.value;
if (prev_val != new_val) {
var semoji = new_val.match(/:(\S{3,})/);
if(semoji){
var obj = JSON.parse(localStorage.getItem("emoji_" + acct_id));
var num = obj.length;
var ehtml="";
for (i = 0; i < num; i++) {
var emoji = obj[i];
if ( ~emoji.shortcode.indexOf(semoji[1])) {
if (emoji) {
ehtml = ehtml+'<a onclick="emojiInsert(\':' + emoji.shortcode +
': \',\':'+semoji[1]+'\')" class="pointer"><img src="' + emoji.url + '" width="20"></a>';
}
}
}
$("#suggest").html(ehtml);
}
var tag = new_val.match(/#(\S{3,})/);
var acct = new_val.match(/@(\S{3,})/);
if (tag && tag[1]) {
@ -19,7 +38,7 @@ input.addEventListener("focus", function() {
} else if (acct && acct[1]) {
var q = acct[1];
} else {
$("#suggest").html("");
//$("#suggest").html("");
return;
}
var domain = localStorage.getItem("domain_" + acct_id);

View File

@ -13,6 +13,13 @@ function additional(acct_id, tlid) {
var urls = text.match(
/https?:\/\/([-a-zA-Z0-9@.]+)\/media\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
);
//トゥートのURLぽかったら
toot = text.match(/https:\/\/([a-zA-Z0-9.-]+)\/@([a-zA-Z0-9_]+)\/([0-9]+)/);
if(toot){
if(toot[1]){
$(this).attr("data-acct",acct_id);
}
}
if (urls) {
$(this).remove();
} else if (!card) {

View File

@ -237,8 +237,8 @@ function brws(){
shell.openExternal(url);
}
//外部からトゥート開く
function detEx(url){
var domain = localStorage.getItem("domain_0");
function detEx(url,acct_id){
var domain = localStorage.getItem("domain_"+acct_id);
var at = localStorage.getItem(domain + "_at");
var start = "https://" + domain + "/api/v1/search?resolve=true&q="+url
fetch(start, {
@ -261,7 +261,9 @@ function detEx(url){
shell.openExternal(url);
}else{
var id=json.statuses[0].id;
details(id, 0, 0)
$(".loadp").text($(".loadp").attr("href"));
$(".loadp").removeClass("loadp");
details(id, acct_id, 0)
}
});

View File

@ -9,6 +9,7 @@ const shell = electron.shell;
const os = require('os')
const path = require('path')
const Menu=electron.Menu
var updatewin=null;
// アプリケーションをコントロールするモジュール
const app = electron.app;
var platform=process.platform;
@ -128,18 +129,19 @@ ipc.on('native-notf', function(e, args) {
});
}
});
ipc.on('update', function(e, x, y) {
var platform=process.platform;
var bit=process.arch;
if(platform!="darwin"){
var window = new BrowserWindow({
updatewin = new BrowserWindow({
width: 600,
height: 400,
"transparent": false, // ウィンドウの背景を透過
"frame": false, // 枠の無いウィンドウ
"resizable": false
});
window.loadURL('file://' + __dirname + '/update.html');
updatewin.loadURL('file://' + __dirname + '/update.html');
return "true"
}else{
@ -273,19 +275,19 @@ function dl(ver,files,fullname){
r += c[Math.floor(Math.random()*cl)];
}
zip=zip+r;
mainWindow.webContents.send('comp', "ダウンロードを開始します。");
updatewin.webContents.send('mess', "ダウンロードを開始します。");
const opts = {
directory:files,
openFolderWhenDone: true,
onProgress: function(e) {
mainWindow.webContents.send('prog', e);
updatewin.webContents.send('prog', e);
},
saveAs: false
};
download(BrowserWindow.getFocusedWindow(),
'https://dl.thedesk.top/'+zip, opts)
.then(dl => {
mainWindow.webContents.send('comp', "ダウンロードが完了しました。");
updatewin.webContents.send('mess', "ダウンロードが完了しました。");
app.quit();
})
.catch(console.error);

166
app/oss.html Normal file
View File

@ -0,0 +1,166 @@
<!doctype html>
<html lang="ja">
<head>
<title>OSS License - TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport">
<link href="./css/materialize.css" type="text/css" rel="stylesheet">
<link href="./css/master.css" type="text/css" rel="stylesheet">
<link href='./css/font-awesome.css' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans|IBM+Plex+Mono" rel="stylesheet">
<meta charset="utf-8">
</head>
<body style="overflow-y:scroll;">
<script type="text/javascript" src="./js/common/jquery.js"></script>
<script type="text/javascript" src="./js/platform/first.js"></script>
<script type="text/javascript" src="./js/common/materialize.js"></script>
<a href="setting.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;"><i class="material-icons left">undo</i>戻る</a>
TheDeskのライセンスについては<a href="https://github.com/cutls/TheDesk/blob/master/LICENSE.md">TheDesk LICENSE (Latest Ver.)</a>を参照。<br>
<article style="width:500px; max-width:100%; margin:15px; font-family:IBM Plex Mono">
<h5>Electron</h5>
<i class="fa fa-github"></i><a href="https://github.com/electron/electron" target="_blank">electron/electron</a><br>
Copyright (c) 2013-2018 GitHub Inc.<br>
<br>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:<br>
<br>
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
<br>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<br>
<h5>electron-dl</h5>
<i class="fa fa-github"></i><a href="https://github.com/sindresorhus/electron-dl" target="_blank">sindresorhus/electron-dl</a><br>
MIT License<br>
Copyright (c) Sindre Sorhus &lt;sindresorhus@gmail.com&gt; (sindresorhus.com)<br>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<br>
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<br>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
THE USE OR OTHER DEALINGS IN THE SOFTWARE.<br>
<h5>Jimp</h5>
<i class="fa fa-github"></i><a href="https://github.com/oliver-moran/jimp" target="_blank">oliver-moran/jimp</a><br>
The MIT License (MIT)<br>
<br>
Copyright (c) 2014 Oliver Moran<br>
<br>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:<br>
<br>
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.<br>
<br>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.<br>
<h5>EmojiOne</h5>
<i class="fa fa-github"></i><a href="https://github.com/emojione/emojione" target="_blank">emojione/emojione</a><br>
<h6>EmojiOne Artwork</h6>
<ul>
<li>Applies to all PNG files found in the emojione-assets repo as well as any adaptations made.</li>
<li>Free license: <a href="https://www.emojione.com/developers/free-license" target="_blank">emojione.com/developers/free-license</a></li>
<li>Premium license: <a href="https://www.emojione.com/developers/premium-license" target="_blank">emojione.com/developers/premium-license</a></li>
</ul>
<h6>EmojiOne Non-Artwork</h6>
<ul>
<li>Applies to the Javascript, JSON, PHP, CSS, HTML files, and everything else not covered under the artwork license above, found in both the emojione and emojione-assets repos.</li>
<li>License: MIT</li>
<li>Complete Legal Terms: <a href="http://opensource.org/licenses/MIT" target="_blank">http://opensource.org/licenses/MIT</a></li>
</ul>
<h5>Font Awesome</h5>
<i class="fa fa-github"></i><a href="https://github.com/FortAwesome/Font-Awesome" target="_blank">FortAwesome/Font-Awesome</a><br>
Font Awesome Free License<br>
-------------------------<br>
<br>
Font Awesome Free is free, open source, and GPL friendly. You can use it for
commercial projects, open source projects, or really almost whatever you want.
Full Font Awesome Free license: https://fontawesome.com/license.<br>
<br>
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)<br>
In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
packaged as SVG and JS file types.<br>
<br>
# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)<br>
In the Font Awesome Free download, the SIL OLF license applies to all icons
packaged as web and desktop font files.<br>
<br>
# Code: MIT License (https://opensource.org/licenses/MIT)<br>
In the Font Awesome Free download, the MIT license applies to all non-font and
non-icon files.<br>
<br>
# Attribution<br>
Attribution is required by MIT, SIL OLF, and CC BY licenses. Downloaded Font
Awesome Free files already contain embedded comments with sufficient
attribution, so you shouldn't need to do anything additional when using these
files normally.<br>
<br>
We've kept attribution comments terse, so we ask that you do not actively work
to remove them from files, especially code. They're a great way for folks to
learn about Font Awesome.<br>
<br>
# Brand Icons<br>
All brand icons are trademarks of their respective owners. The use of these
trademarks does not indicate endorsement of the trademark holder by Font
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
to represent the company, product, or service to which they refer.**<br>
<h5>node-notifier</h5>
<i class="fa fa-github"></i><a href="https://github.com/mikaelbr/node-notifier" target="_blank">mikaelbr/node-notifier</a><br>
MIT License<br>
<br>
Copyright (c) 2017 Mikael Brevik<br>
<br>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:<br>
<br>
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.<br>
<br>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.<br>
<h5>Google Fonts</h5>
<ul>
<li>Open Sans:<a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0"> Apache License, Version 2.0 </a></li>
<li>Baloo Bhai:<a target="_blank" href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=OFL_web"> Open Font License </a></li>
<li>Material Icons:<a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0"> Apache License, Version 2.0 </a></li>
<li>IBM Plex Mono:<a target="_blank" href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=OFL_web"> Open Font License </a></li>
</ul>
</article>
<a href="setting.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;"><i class="material-icons left">undo</i>戻る</a>
<script type="text/javascript" src="./js/ui/theme.js"></script>
<script type="text/javascript" src="./js/platform/end.js"></script>
</body>

View File

@ -1,6 +1,6 @@
{
"name": "TheDesk",
"version": "14.3.1",
"version": "14.5.0",
"description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです",
"main": "main.js",
"scripts": {

View File

@ -74,14 +74,14 @@
<input class="with-gap" onchange="settings()" name="ul" type="radio" id="ul_no" value="no" />
<label for="ul_no">いいえ</label>
<br>
<h5>非表示設定の画像を隠す</h5>きつめのぼかしがかかります。
<h5>非表示設定の画像(NSFW)を隠す</h5>きつめのぼかしがかかります。
<br>
<input class="with-gap" onchange="settings()" name="nsfw" type="radio" id="n_yes" value="yes" />
<label for="n_yes">はい</label>
<input class="with-gap" onchange="settings()" name="nsfw" type="radio" id="n_no" value="no" />
<label for="n_no">いいえ</label>
<br>
<h5>非表示設定のテキストを隠す</h5>
<h5>非表示設定のテキスト(CW)を隠す</h5>
<input class="with-gap" onchange="settings()" name="cw" type="radio" id="c_yes" value="yes" />
<label for="c_yes">はい</label>
<input class="with-gap" onchange="settings()" name="cw" type="radio" id="c_no" value="no" />
@ -258,6 +258,7 @@
<br>
寿司を投げる<br>
<a href="https://osushi.love/Cutls_P" target="_blank">Osushi.love</a><br>
<a href="oss.html">OSS License(オープンソースライセンス)</a><br>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk on Mastodon 2018 & Cutls.com 2015 All Rights Reserved.
<a href="https://github.com/cutls/TheDesk/blob/master/LICENSE.md">TheDesk LICENSE (Latest Ver.)</a>
<br>Developer: Cutls P(

View File

@ -50,9 +50,11 @@ verck();
}
ipc.on('prog', function (event, arg) {
console.log(arg);
$(".determinate").css('width',arg*100+"%");
$(".determinate").css('width',arg*100+"%");
$("#prog").text("ダウンロード中:"+Math.floor(arg*100)+"%");
})
ipc.on('mess', function (event, arg) {
console.log(arg);
$("#prog").text(arg);
})
function verck(){

View File

@ -1 +1 @@
{"warn":"これはGCPにアップして下さい","warn2":"これはGCPにアップして下さい","warn3":"これはGCPにアップして下さい","desk":"Mizuki (ver.3[fixed])","date":"2018-04-07","detail":"内部V:14.4.0|・カラムヘッダーの色変更・引用トゥートボタンほか"}
{"warn":"これはGCPにアップして下さい","warn2":"これはGCPにアップして下さい","warn3":"これはGCPにアップして下さい","desk":"Mizuki (ver.5)","date":"2018-04-08","detail":"内部V:14.5.0|ダウンローダー修正/絵文字サジェスト/トゥートリンク修正/板橋丼サポート"}