TheDesk Miria (17.0.1)-beta3

This commit is contained in:
cutls 2019-02-01 01:30:25 +09:00
parent 456500e954
commit 810a08c8e7
12 changed files with 169 additions and 36 deletions

View File

@ -1,10 +1,28 @@
os: windows language: objective-c
language: node_js cache:
node_js: directories:
- '9.9.0' - node_modules
script: node -v env:
before_deploy: - NODE_VERSION="9.9.0"
before_install:
# nvm をインストールする。Travis の OS X 環境には nvm はデフォルトで入っていない
- git clone https://github.com/creationix/nvm.git /tmp/.nvm
- source /tmp/.nvm/nvm.sh
# 指定バージョンの Node をインストールする
- nvm install $NODE_VERSION
# 指定バージョンの Node を有効にする
- nvm use --delete-prefix $NODE_VERSION
- node --version
install:
- cd app - cd app
- npm install
script:
- npm test
before_deploy:
- brew update
- brew install wine
- wine --version
- brew install makensis
- npm install electron-builder -g - npm install electron-builder -g
- npm install - npm install
- electron-builder --win --ia32 - electron-builder --win --ia32
@ -13,18 +31,23 @@ before_deploy:
- electron-builder --win --x64 - electron-builder --win --x64
- mv ../build/TheDesk-setup.exe ../TheDesk-setup.exe - mv ../build/TheDesk-setup.exe ../TheDesk-setup.exe
- mv ../build/TheDesk*.exe ../TheDesk.exe - mv ../build/TheDesk*.exe ../TheDesk.exe
- cd ../ - electron-builder --linux --x64
- ls - mv ../build/TheDesk*.snap ../TheDesk.snap
after_deploy: ls - electron-builder --mac --x64
- mv ../build/TheDesk*.dmg ../TheDesk.dmg
deploy: deploy:
skip_cleanup: true
provider: releases provider: releases
# GitHub にリリースするための API KEY を暗号化した値
api_key: api_key:
secure: jndR02p5KRTtcJk18b3YsXL2cC+yzEf1AOqXdpWciF8f3lO5oY01jlxd17xdHIcK7VywSsLVZpLToSdqAoIEhJ5OxEQ/FmA3FlmbwwD6ou13gLa4VGIvsBHveCmKGjVu0Z++atIy76tZYU1SOWFWv4B0ZhnVz2ca2VZynvLgw3YNsPJH7rHO966GXgRkGYJAJ4UvLg3sj/iztVh2FSfbUj5IGO1e/JHJO63wAo1MSQtRjkutVgl/djnBLC6v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qoW5J5zCh5Ow7b3KXvEvlAts44mAag8tZTectxMP4iguXvTnv4=
# Releases ページにアップロードするファイル
file: file:
- TheDesk.exe - TheDesk.exe
- TheDesk-setup.exe - TheDesk-setup.exe
- TheDesk-ia32.exe - TheDesk-ia32.exe
- TheDesk-setup-ia32.exe - TheDesk-setup-ia32.exe
- TheDesk.snap
- TheDesk.dmg
skip_cleanup: true
on: on:
repo: cutls/TheDesk repo: cutls/TheDesk

View File

@ -95,6 +95,14 @@ macOS
Config is all on package.json Config is all on package.json
ビルド設定はすべてpackage.jsonに記載しています。 ビルド設定はすべてpackage.jsonに記載しています。
## Pleroma support
Did you find a bug with Pleroma accounts?
Pleroma **does not** follow Mastodon API rules completely although Pleroma developers say so.
Please write issues to improve TheDesk affinity with Pleroma.
Pleromaは、Mastodon APIとの互換性を謳っていますが、実際には様々な差異があり、TheDeskで不具合が発生することがあります。
Issuesに書いてある問題についてはなるべく対処しますので、ぜひお知らせください。
## See also/詳しく ## See also/詳しく
[TheDesk - マストドン日本語ウィキ](https://ja.mstdn.wiki/TheDesk) [TheDesk - マストドン日本語ウィキ](https://ja.mstdn.wiki/TheDesk)

View File

@ -29,16 +29,10 @@ function tl(data) {
var templete = parse([json[0]], '', acct_id, tlid); var templete = parse([json[0]], '', acct_id, tlid);
$("#timeline_nano").html(templete); $("#timeline_nano").html(templete);
jQuery("time.timeago").timeago(); jQuery("time.timeago").timeago();
reload(type, '', acct_id, data);
}); });
}
//Streaming接続 //Streaming接続
var websocket=[]; var websocket=[];
function reload(type, cc, acct_id, data) {
var tlid=0; var tlid=0;
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_"+ acct_id + "_at");
if (type == "home") { if (type == "home") {
var start = "wss://" + domain + var start = "wss://" + domain +
"/api/v1/streaming/?stream=user&access_token=" + at; "/api/v1/streaming/?stream=user&access_token=" + at;

View File

@ -279,10 +279,12 @@ function redraft(id, acct_id){
show(); show();
$("#textarea").val(html); $("#textarea").val(html);
var cwtxt=$("[toot-id="+id+"] .cw_text").html(); var cwtxt=$("[toot-id="+id+"] .cw_text").html();
if(cwtxt!=""){
cwtxt=$.strip_tags(cwtxt); cwtxt=$.strip_tags(cwtxt);
cw(); cw();
$("#cw-text").val(cwtxt); $("#cw-text").val(cwtxt);
} }
}
} }
//ピン留め //ピン留め
function pin(id, acct_id) { function pin(id, acct_id) {

View File

@ -56,14 +56,38 @@ function date(str, datetype) {
//特殊フォーマット(インスタンス情報で利用) //特殊フォーマット(インスタンス情報で利用)
function crat(str) { function crat(str) {
var date = new Date(str); var date = new Date(str);
if(date.getMonth()<9){
var mnt="0"+(date.getMonth()+1);
}else{
var mnt=date.getMonth()+1;
}
if(date.getDate()<10){
var dat="0"+date.getDate();
}else{
var dat=date.getDate();
}
if(date.getHours()<10){
var hrs="0"+date.getHours();
}else{
var hrs=date.getHours();
}
if(date.getMinutes()<10){
var mns="0"+date.getMinutes();
}else{
var mns=date.getMinutes();
}
if(date.getSeconds()<10){
var sec="0"+date.getSeconds();
}else{
var sec=date.getSeconds();
}
format_str = 'YYYY-MM-DD hh:mm:ss'; format_str = 'YYYY-MM-DD hh:mm:ss';
format_str = format_str.replace(/YYYY/g, date.getFullYear()); format_str = format_str.replace(/YYYY/g, date.getFullYear());
format_str = format_str.replace(/MM/g, date.getMonth()+1); format_str = format_str.replace(/MM/g, mnt);
format_str = format_str.replace(/DD/g, date.getDate()); format_str = format_str.replace(/DD/g, dat);
format_str = format_str.replace(/hh/g, date.getHours()); format_str = format_str.replace(/hh/g, hrs);
format_str = format_str.replace(/mm/g, date.getMinutes()); format_str = format_str.replace(/mm/g, mns);
format_str = format_str.replace(/ss/g, date.getSeconds()); format_str = format_str.replace(/ss/g, sec);
return format_str; return format_str;
} }

View File

@ -391,6 +391,9 @@ function exclude(key){
} }
function excludeCk(key,target){ function excludeCk(key,target){
var exc=localStorage.getItem("exclude-"+key); var exc=localStorage.getItem("exclude-"+key);
if(!exc){
return "";
}
if(~exc.indexOf(target)){ if(~exc.indexOf(target)){
return "checked" return "checked"
}else{ }else{

View File

@ -357,6 +357,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) {
} }
if (!toot.application) { if (!toot.application) {
var via = ''; var via = '';
viashow="hide";
} else { } else {
var via = toot.application.name; var via = toot.application.name;
//強調チェック //強調チェック
@ -374,6 +375,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) {
} }
}); });
} }
if(mix=="pinned"){
boostback = "emphasized";
}
if (toot.spoiler_text && cw) { if (toot.spoiler_text && cw) {
var content = toot.content; var content = toot.content;
var spoil = escapeHTML(toot.spoiler_text); var spoil = escapeHTML(toot.spoiler_text);

View File

@ -149,7 +149,7 @@ function parseColumn() {
key + '">On</span></a>'+lang.lang_layout_linkana +'<br><a onclick="voiceToggle(' + key + key + '">On</span></a>'+lang.lang_layout_linkana +'<br><a onclick="voiceToggle(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="'+lang.lang_layout_tts +'">hearing</i><span id="sta-voice-' + ')" 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 + 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[lang]+'</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 + ',\''+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" tlid="' + key + '" data-type="' + acct.type + '"><div id="landing_'+key+'" style="text-align:center">'+lang.lang_layout_nodata +'</div></div></div></div>'; '" class="tl" tlid="' + key + '" data-type="' + acct.type + '"><div id="landing_'+key+'" style="text-align:center">'+lang.lang_layout_nodata +'</div></div></div></div>';
$("#timeline-container").append(html); $("#timeline-container").append(html);
localStorage.removeItem("pool_" + key); localStorage.removeItem("pool_" + key);

View File

@ -92,7 +92,7 @@ function pinutl(before,user, acct_id) {
todo(error); todo(error);
console.error(error); console.error(error);
}).then(function(json) { }).then(function(json) {
var templete = parse(json, '', acct_id,'user'); var templete = parse(json, 'pinned', acct_id,'user');
if(!json[0]){ if(!json[0]){
templete=""; templete="";
} }

View File

@ -13,7 +13,7 @@ const Menu=electron.Menu
var updatewin=null; var updatewin=null;
const join = require('path').join; const join = require('path').join;
// linuxの時は定義しない // linuxの時は定義しない
if (process.platform!='linux') { if (process.platform=='win32') {
const {NowPlaying,PlayerName} = require("nowplaying-node"); const {NowPlaying,PlayerName} = require("nowplaying-node");
} }
// アプリケーションをコントロールするモジュール // アプリケーションをコントロールするモジュール
@ -580,7 +580,7 @@ ipc.on('nano', function (e, x, y) {
} catch (e) { } catch (e) {
window_pos = [0,0]; // デフォルトバリュー window_pos = [0,0]; // デフォルトバリュー
} }
var nanowindow = new BrowserWindow({width: 300, height: 200, var nanowindow = new BrowserWindow({width: 350, height: 200,
"transparent": false, // ウィンドウの背景を透過 "transparent": false, // ウィンドウの背景を透過
"frame": false, // 枠の無いウィンドウ "frame": false, // 枠の無いウィンドウ
"resizable": false }); "resizable": false });

View File

@ -13,6 +13,7 @@ html{
width:100vw; width:100vw;
height:100vh; height:100vh;
overflow:hidden; overflow:hidden;
font-family:sans-serif;
} }
body { body {
background-color: rgba(0, 0, 0, 0.1); background-color: rgba(0, 0, 0, 0.1);
@ -45,6 +46,7 @@ textarea {
} }
.area-actions{display:none !important;} .area-actions{display:none !important;}
.area-date_via{display:none !important;} .area-date_via{display:none !important;}
.area-side{display:none !important;}
/* Handle */ /* Handle */
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
@ -108,8 +110,6 @@ $.strip_tags = function(str, allowed) {
</div> </div>
<br> <br>
<textarea id="textarea" style="width:80%; background-color:transparent"></textarea> <textarea id="textarea" style="width:80%; background-color:transparent"></textarea>
<input type="hidden" id="reply">
<input type="hidden" id="media">
<button class="btn" onclick="post()">Post</button> <button class="btn" onclick="post()">Post</button>
<script> <script>
if(localStorage.getItem("lang")){ if(localStorage.getItem("lang")){
@ -118,9 +118,6 @@ $.strip_tags = function(str, allowed) {
var lang="ja"; var lang="ja";
} }
</script> </script>
<script type="text/javascript" src="./js/lang/lang.js"></script>
<script type="text/javascript" src="./js/lang/parse.lang.js"></script>
<script src="https://twemoji.maxcdn.com/2/twemoji.min.js?2.7"></script> <script src="https://twemoji.maxcdn.com/2/twemoji.min.js?2.7"></script>
<script type="text/javascript" src="./js/post/post.js"></script> <script type="text/javascript" src="./js/post/post.js"></script>
<script type="text/javascript" src="./js/post/use-txtbox.js"></script> <script type="text/javascript" src="./js/post/use-txtbox.js"></script>
@ -166,4 +163,52 @@ function mov(){
function resetmv(){ function resetmv(){
return false; return false;
} }
function post(){
var acct_id=$("#post-acct-sel").val();
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_"+ acct_id + "_at");
var start = "https://" + domain + "/api/v1/statuses";
var str=$("#textarea").val();
var toot={
status: str
}
var vis = loadVis(acct_id)
toot.visibility=vis;
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
httpreq.responseType = 'json';
httpreq.send(JSON.stringify(toot));
httpreq.onreadystatechange = function() {
if (httpreq.readyState == 4) {
$("#textarea").val("");
}
}
}
function loadVis(acct_id){
var vist = localStorage.getItem("vis");
console.log(vist);
if (!vist) {
return "public";
} else {
if (vist == "memory") {
var memory = localStorage.getItem("vis-memory-"+acct_id);
if (!memory) {
memory = "public";
}
return memory;
} else if(vist == "server") {
var multi = localStorage.getItem("multi");
var obj = JSON.parse(multi);
var memory = obj[acct_id]["vis"];
if (!memory) {
memory = "public";
}
return memory;
} else {
return vist;
}
}
}
</script> </script>

30
old.travis.yml Normal file
View File

@ -0,0 +1,30 @@
os: windows
language: node_js
node_js:
- '9.9.0'
script: node -v
before_deploy:
- cd app
- npm install electron-builder -g
- npm install
- electron-builder --win --ia32
- mv ../build/TheDesk-setup.exe ../TheDesk-setup-ia32.exe
- mv ../build/TheDesk*.exe ../TheDesk-ia32.exe
- electron-builder --win --x64
- mv ../build/TheDesk-setup.exe ../TheDesk-setup.exe
- mv ../build/TheDesk*.exe ../TheDesk.exe
- cd ../
- ls
after_deploy: ls
deploy:
skip_cleanup: true
provider: releases
api_key:
secure: jndR02p5KRTtcJk18b3YsXL2cC+yzEf1AOqXdpWciF8f3lO5oY01jlxd17xdHIcK7VywSsLVZpLToSdqAoIEhJ5OxEQ/FmA3FlmbwwD6ou13gLa4VGIvsBHveCmKGjVu0Z++atIy76tZYU1SOWFWv4B0ZhnVz2ca2VZynvLgw3YNsPJH7rHO966GXgRkGYJAJ4UvLg3sj/iztVh2FSfbUj5IGO1e/JHJO63wAo1MSQtRjkutVgl/djnBLC6vbL4YHkM3Ynpkx/YQEcxwrmeY0Ra8D5yYDq4MNIDMmZahWC+k4u2eA2Cj2ifBFNxbZvTN75vLwRBp6DsTNHsiqkXrSPDBdNeet31RbwTQ6LtsK8jqmL4S/59dmLcj7uCU2WxyBLPbJdbdZWlqW2ZQvfQY8QVAYy7S3MiHQWQN0oP5wqXk89jcgR42ig/zsqFNPpXHM4mExR7l/gDLPg0j9c3XEF6sWtk3FmJN1i4+B+9kn09b6UKlV7EFPKp8XcFNrz4ZcE9/I8lKwsqLVG2jAXIk7Z9LwDRcAmK5eG348X5zwFtOY6raKIvRw2cn92bPnEI+55v8A4WANS2647GFTgxHj30D0d/sOZmJ5BS34zpdWTgE0AlKg7sOqkncjqoW5J5zCh5Ow7b3KXvEvlAts44mAag8tZTectxMP4iguXvTnv4=
file:
- TheDesk.exe
- TheDesk-setup.exe
- TheDesk-ia32.exe
- TheDesk-setup-ia32.exe
on:
repo: cutls/TheDesk