TheDesk Akane (16.0.0) - phase:2.1

This commit is contained in:
cutls 2018-07-29 18:43:08 +09:00
parent f6f3525bc8
commit 7178c2d6c5
7 changed files with 127 additions and 39 deletions

View File

@ -216,17 +216,17 @@ var lang_list_remove={
"ja":"リストから削除",
"en":"Remove from the list"
}
//js/notification.js
//tl/notification.js
var lang_notf_new={
"ja":"件の新しい通知",
"en":" new notifications"
}
//js/speech.js
//tl/speech.js
var lang_speech_refresh={
"ja":"音声読み上げ設定を更新しました。",
"en":"Refresh setting of TTS"
}
//js/src.js
//tl/src.js
var lang_src_ts={
"ja":"時系列",
"en":"chronological order"
@ -235,3 +235,87 @@ var lang_src_people={
"ja":"人がトゥート",
"en":" people toot"
}
//tl/tag.js
var lang_tags_always={
"ja":"常に",
"en":"Always toots with "
}
var lang_tags_realtime={
"ja":"実況",
"en":"Tag-stream toot"
}
var lang_tags_tagunpin={
"ja":"{{tag}}をよく使うタグから削除",
"en":"Unpin {{tag}}"
}
var lang_tags_tagwarn={
"ja":"次に{{tag}}なしでトゥートするまで全てのトゥートに{{tag}}が付与されます。",
"en":"When you toot without {{tag}}, tag-streaming mode will be off."
}
//tl/tl.js
var lang_tl_media={
"ja":"メディア",
"en":"Media"
}
//ui/layout.js
var lang_layout_gotop={
"ja":"一番上へ。アイコンが赤のときはストリーミングに接続できていません。F5等で再読込をお試し下さい。",
"en":"Go top of this column. When icon is red, this column cannot connect straming API. Please reload."
}
var lang_layout_thisacct={
"ja":"このアカウントの{{notf}}",
"en":"{{notf}} of this account"
}
var lang_layout_delthis={
"ja":"このカラムを削除",
"en":"Remove this column"
}
var lang_layout_setthis={
"ja":"このカラムの設定",
"en":"Setting of this column"
}
var lang_layout_mediafil={
"ja":"メディアフィルター",
"en":"Media filtering"
}
var lang_layout_linkana={
"ja":"リンク解析",
"en":"Auto Link Analyzer"
}
var lang_layout_linkanades={
"ja":"リンクの解析を切り替え(OFFで制限を回避出来る場合があります)",
"en":"Auto link analyzer(You may got limitation of API)"
}
var lang_layout_tts={
"ja":"読み上げ",
"en":"Text to speech "
}
var lang_layout_headercolor={
"ja":"TLヘッダーカラー",
"en":"Header color of this column"
}
var lang_layout_nodata={
"ja":"[ここにトゥートはありません。]<br>F5/⌘+Rで再読込できます。",
"en":"[No data]<br>F5/⌘+R to reload"
}
var lang_layout_dm={
"ja":"ダイレクトメッセージ",
"en":"Direct Message"
}
//ui/spotify.js
var lang_spotify_img={
"ja":"アルバムアートワークを添付します。",
"en":"Attach an album artwork"
}
var lang_spotify_imgno={
"ja":"アルバムアートワークを添付しません。",
"en":"Not ttach an album artwork"
}
var lang_spotify_acct={
"ja":"アカウント連携をしてください。",
"en":"Connect TheDesk to Spotify"
}
var lang_spotify_np={
"ja":"NowPlaying文書を更新しました。",
"en":"Done:templete of NowPlaying"
}

View File

@ -173,14 +173,14 @@ function notfToggle(acct, tlid) {
notfCanceler(acct)
}
function notfCanceler(acct){
$(".notf-reply_" + acct_id).text(0);
$(".notf-reply_" + acct_id).addClass("hide");
$(".notf-fav_" + acct_id).text(0);
$(".notf-fav_" + acct_id).addClass("hide");
$(".notf-bt_" + acct_id).text(0);
$(".notf-bt_" + acct_id).addClass("hide");
$(".notf-follow_" + acct_id).text(0);
$(".notf-follow_" + acct_id).addClass("hide");
$(".notf-reply_" + acct).text(0);
$(".notf-reply_" + acct).addClass("hide");
$(".notf-fav_" + acct).text(0);
$(".notf-fav_" + acct).addClass("hide");
$(".notf-bt_" + acct).text(0);
$(".notf-bt_" + acct).addClass("hide");
$(".notf-follow_" + acct).text(0);
$(".notf-follow_" + acct).addClass("hide");
$(".notf-icon_" + acct).removeClass("red-text");
}
function allNotfRead(){
@ -199,9 +199,8 @@ function allNotfRead(){
} else {
var obj = JSON.parse(multi);
}
console.log(obj);
var templete;
Object.keys(obj).forEach(function(key) {
console.log(key);
notfCanceler(key)
});
}

View File

@ -56,8 +56,8 @@ function favTag(){
var tags="";
Object.keys(obj).forEach(function(key) {
var tag = obj[key];
tags = tags + '<a onclick="tagShow(\'' + tag + '\')" class="pointer">#' + tag + '</a><span class="hide" data-tag="' + tag + '"> <a onclick="tagTL(\'tag\',\'' + tag + '\',false,\'add\')" class="pointer" title="#' + tag + 'のタイムライン">TL</a> <a onclick="brInsert(\'#' + tag + '\')" class="pointer" title="#' + tag + 'でトゥート">Toot</a> '+
'<a onclick="autoToot(\'#' + tag + ' \');brInsert(\'#' + tag + ' \')" class="pointer" title="常に#' + tag + 'でトゥート">実況</a> <a onclick="tagRemove(\'' + key + '\')" class="pointer" title="#' + tag + 'をよく使うタグから削除">削除</a></span> ';
tags = tags + '<a onclick="tagShow(\'' + tag + '\')" class="pointer">#' + tag + '</a><span class="hide" data-tag="' + tag + '"> <a onclick="tagTL(\'tag\',\'' + tag + '\',false,\'add\')" class="pointer" title="' +lang_parse_tagTL[lang].replace("{{tag}}" ,'#'+tag.name)+ '">TL</a> <a onclick="brInsert(\'#' + tag + '\')" class="pointer" title="' + lang_parse_tagtoot[lang].replace("{{tag}}" ,'#'+tag.name) + '">Toot</a> '+
'<a onclick="autoToot(\'#' + tag + ' \');brInsert(\'#' + tag + ' \')" class="pointer" title="'+lang_tags_always[lang] + lang_parse_tagtoot[lang].replace("{{tag}}" ,'#'+tag.name) + '">'+lang_tags_realtime[lang]+'</a> <a onclick="tagRemove(\'' + key + '\')" class="pointer" title="' +lang_tags_tagunpin[lang].replace("{{tag}}" ,'#'+tag.name)+ '">'+lang_del[lang]+'</a></span> ';
});
if(obj.length>0){
$("#taglist").append("My Tags:" + tags);
@ -108,5 +108,5 @@ function tagTL(a,b,c,d){
}
function autoToot(tag){
localStorage.setItem("stable",tag);
Materialize.toast("次に"+tag+"なしでトゥートするまで全てのトゥートに"+tag+"が付与されます。",3000);
Materialize.toast(lang_tags_tagwarn[lang].replace("{{tag}}" ,'#'+tag.name),3000);
}

View File

@ -331,7 +331,7 @@ function cap(type, data, acct_id) {
}
} else if (type == "local-media") {
if(localStorage.getItem("local_" + acct_id) && !locale){
var response=localStorage.getItem("local_" + acct_id)+"(メディア)";
var response=localStorage.getItem("local_" + acct_id)+"("+lang_tl_media[lang]+")";
}else{
var response="Local TL(Media)";
}
@ -343,7 +343,7 @@ function cap(type, data, acct_id) {
}
} else if (type == "pub-media") {
if(localStorage.getItem("public_" + acct_id) && !locale){
var response=localStorage.getItem("public_" + acct_id)+"(メディア)";
var response=localStorage.getItem("public_" + acct_id)+"("+lang_tl_media[lang]+")";
}else{
var response="Federated TL(Media)";
}

View File

@ -75,9 +75,14 @@ function parseColumn() {
var notf_attr='';
}
if(localStorage.getItem("notification_" + acct.domain)){
var unique_notf=localStorage.getItem("notification_" + acct.domain);
var unique_notf=lang_layout_thisacct[lang].replace("{{notf}}" ,localStorage.getItem("notification_" + acct.domain));
}else{
var unique_notf="通知";
if(lang=="ja"){
var notflocale="通知";
}else if(lang=="en"){
var notflocale="Notification";
}
var unique_notf=lang_layout_thisacct[lang].replace("{{notf}}" ,notflocale);
}
var insert="";
var icnsert="";
@ -104,26 +109,26 @@ function parseColumn() {
}
var html = '<div class="box" id="timeline_box_' + key + '_box" tlid="' + key +
'" data-acct="'+acct.domain+'"><div class="notice-box z-depth-2" id="menu_'+key+'" style="'+insert+'">'+
'<div class="area-notice"><i class="material-icons waves-effect red-text" id="notice_icon_' + key + '"'+notf_attr+' style="font-size:40px; padding-top:25%;" onclick="goTop(' + key + ')" title="一番上へ。アイコンが赤のときはストリーミングに接続できていません。F5等で再読込をお試し下さい。"></i></div>'+
'<div class="area-notice"><i class="material-icons waves-effect red-text" id="notice_icon_' + key + '"'+notf_attr+' style="font-size:40px; padding-top:25%;" onclick="goTop(' + key + ')" title="'+lang_layout_gotop[lang]+'"></i></div>'+
'<div class="area-notice_name"><span id="notice_' + key + '" class="tl-title"></span></div>'+
'<div class="area-a1"><a onclick="notfToggle(' + acct.domain + ',' + key +
')" class="setting nex" title="このアカウントの'+unique_notf+'"'+icnsert+'><i class="material-icons waves-effect nex notf-icon_' +
')" class="setting nex" title="'+unique_notf+'"'+icnsert+'><i class="material-icons waves-effect nex notf-icon_' +
acct.domain + '">notifications</i></div><div class="area-sta"><span class="new badge teal notf-reply_'+acct.domain+' hide" data-badge-caption="Reply">0</span><span class="new badge yellow black-text notf-fav_'+acct.domain+' hide" data-badge-caption="Fav">0</span><span class="new badge blue notf-bt_'+acct.domain+' hide" data-badge-caption="BT">0</span><span class="new badge orange notf-follow_'+acct.domain+' hide" data-badge-caption="Follow">0</span></a></div>'+
'<div class="area-a2"><a onclick="removeColumn(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="このカラムを削除"'+icnsert+'>cancel</i></a></div>'+
')" class="setting nex"><i class="material-icons waves-effect nex" title="'+lang_layout_delthis[lang]+'"'+icnsert+'>cancel</i></a></div>'+
'<div class="area-a3"><a onclick="setToggle(' + key +
')" class="setting nex" title="このカラムの設定"'+icnsert+'><i class="material-icons waves-effect nex">settings</i></a></div></div>'+
')" class="setting nex" title="'+lang_layout_setthis[lang]+'"'+icnsert+'><i class="material-icons waves-effect nex">settings</i></a></div></div>'+
'<div class="hide notf-indv-box z-depth-4" id="notf-box_' + key +
'"><div id="notifications_' + key +
'" data-notf="' + acct.domain + '" data-type="notf"></div></div><div class="hide notf-indv-box" id="util-box_' + key +
'" style="padding:5px;"><a onclick="mediaToggle(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="メディアフィルター">perm_media</i><span id="sta-media-' +
key + '">On</span></a>メディアフィルター<br><a onclick="cardToggle(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="リンクの解析を切り替え(OFFで制限を回避出来る場合があります)">link</i><span id="sta-card-' +
key + '">On</span></a>リンク解析<br><a onclick="voiceToggle(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="読み上げ">hearing</i><span id="sta-voice-' +
key + '">On</span></a>読み上げTL<br>TLヘッダーの色<br><div id="picker_'+key+'" class="color-picker"></div></div><div class="tl-box" tlid="' + key + '"><div id="timeline_' + key +
'" class="tl" tlid="' + key + '"'+notf_attr+' data-type="' + acct.type + '"><div style="text-align:center">[ここにトゥートはありません。]<br>F5/⌘+Rで再読込できます。</div></div></div></div>';
')" class="setting nex"><i class="material-icons waves-effect nex" title="'+lang_layout_mediafil[lang]+'">perm_media</i><span id="sta-media-' +
key + '">On</span></a>'+lang_layout_mediafil[lang]+'<br><a onclick="cardToggle(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="'+lang_layout_linkanades[lang]+'">link</i><span id="sta-card-' +
key + '">On</span></a>'+lang_layout_linkana[lang]+'<br><a onclick="voiceToggle(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="'+lang_layout_tts[lang]+'">hearing</i><span id="sta-voice-' +
key + '">On</span></a>'+lang_layout_tts[lang]+'TL<br>'+lang_layout_headercolor[lang]+'<br><div id="picker_'+key+'" class="color-picker"></div></div><div class="tl-box" tlid="' + key + '"><div id="timeline_' + key +
'" class="tl" tlid="' + key + '"'+notf_attr+' data-type="' + acct.type + '"><div style="text-align:center">'+lang_layout_nodata[lang]+'</div></div></div></div>';
$("#timeline-container").append(html);
localStorage.removeItem("pool_" + key);
if (acct.data) {
@ -204,7 +209,7 @@ function addselCk(){
$("#noauth").addClass("hide");
}
if(domain=="knzk.me" || domain=="mstdn.y-zu.org"){
$("#type-sel").append('<option value="dm" data-trans="dm" id="direct-add">ダイレクトメッセージ</option>');
$("#type-sel").append('<option value="dm" data-trans="dm" id="direct-add">'+lang_layout_dm[lang]+'</option>');
$('#type-sel').material_select('update');
}else{
$("#direct-add").remove();

View File

@ -57,10 +57,10 @@ function spotifyFlagSave(){
var awk = $("[name=awk]:checked").val();
if(awk=="yes"){
localStorage.setItem("artwork","yes");
Materialize.toast("アルバムアートワークを添付します。", 3000);
Materialize.toast(lang_spotify_img[lang], 3000);
}else{
localStorage.removeItem("artwork");
Materialize.toast("アルバムアートワークを添付しません。", 3000);
Materialize.toast(lang_spotify_imgno[lang], 3000);
}
}
function nowplaying(mode){
@ -115,7 +115,7 @@ function nowplaying(mode){
$("#textarea").val(content);
});
}else{
alert("アカウント連携設定をして下さい。");
alert(lang_spotify_acct[lang]);
}
}else if(mode=="itunes"){
var electron = require("electron");
@ -155,7 +155,7 @@ function nowplaying(mode){
function spotifySave(){
var temp=$("#np-temp").val();
localStorage.setItem("np-temp", temp);
Materialize.toast("NowPlaying文章を更新しました。", 3000);
Materialize.toast(lang_spotify_np[lang], 3000);
}
if(location.search){
var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/);

View File

@ -128,7 +128,7 @@ function spotifytips(){
spotint=setInterval(spotStart, 1000);
});
}else{
alert("アカウント連携設定をして下さい。");
alert(lang_spotify_acct[lang]);
}
}
function spotStart(){
@ -172,7 +172,7 @@ function clockStart(){
if(nowMin<10){nowMin="0"+nowMin }
var nowSec = nowTime.getSeconds(); // 秒を抜き出す
if(nowSec<10){nowSec="0"+nowSec }
var msg = nowTime.getFullYear()+""+(nowTime.getMonth()+1)+""+nowTime.getDate()+'<span style="font-size:20px; font-family:Open Sans">'+nowHour + ":" + nowMin + ":" + nowSec+"</span>";
var msg = nowTime.getFullYear()+"/"+(nowTime.getMonth()+1)+"/"+nowTime.getDate()+'<span style="font-size:20px; font-family:Open Sans">'+nowHour + ":" + nowMin + ":" + nowSec+"</span>";
$("#tips-text").html(msg);
}
function sleep(waitMsec) {