TheDesk Mio (ver.2)

This commit is contained in:
cutls 2018-05-12 03:12:25 +09:00
parent f19d95a2a6
commit a379617427
11 changed files with 62 additions and 18 deletions

View File

@ -310,7 +310,7 @@ p:not(:last-child){
max-height: 190px;
overflow-y: scroll;
}
.mention {
.u-url {
color: black;
cursor: text;
}
@ -322,7 +322,7 @@ p:not(:last-child){
.blacktheme .notf-box,.blacktheme .modal-footer,.blacktheme #sidebar {
background-color: #424242;
}
.blacktheme .btn-flat,.blacktheme .mention ,.blacktheme #sidebar a {
.blacktheme .btn-flat,.blacktheme .u-url ,.blacktheme #sidebar a {
color: white
}
.blacktheme .shared {
@ -338,7 +338,7 @@ p:not(:last-child){
.indigotheme .notf-box,.indigotheme .modal-footer,.indigotheme #sidebar {
background-color: #0d1351;
}
.indigotheme .btn-flat,.indigotheme .mention ,.indigotheme #sidebar a {
.indigotheme .btn-flat,.indigotheme .u-url ,.indigotheme #sidebar a {
color: white
}
.indigotheme .shared {
@ -354,7 +354,7 @@ p:not(:last-child){
.browntheme .notf-box,.browntheme .modal-footer,.browntheme #sidebar {
background-color: #4e342e;
}
.browntheme .btn-flat,.browntheme .mention ,.browntheme #sidebar a {
.browntheme .btn-flat,.browntheme .u-url ,.browntheme #sidebar a {
color: white
}
.browntheme .shared {

View File

@ -26,7 +26,7 @@
<script type="text/javascript" src="./js/ui/jquery-ui.min.js"></script>
<script>
//必ずアプデ時のremove instance消して
var ver="Mio (ver.1[fixed])";
var ver="Mio (ver.2)";
//betaを入れるとバージョンチェックしない
//var ver="beta";
var acct_id=0;
@ -56,6 +56,7 @@ var tlid=0;
<option value="local" data-trans="local">ローカル</option>
<option value="home" data-trans="home">ホーム</option>
<option value="pub" data-trans="public">連合</option>
<option value="dm" data-trans="dm">ダイレクトメッセージ</option>
<option value="mix" data-trans="integrated">統合(ローカルとホーム)</option>
<option value="plus" data-trans="plus">統合(ローカルとブースト・リプライ)</option>
<option value="notf" data-trans="notification">通知</option>
@ -277,7 +278,7 @@ var tlid=0;
<a onclick="previewEdit()">Edit</a>
</span>
</div>
<div class="input-field col s12" id="toot-field" style="margin-top: 0;">
<div class="input-field col s12" id="toot-field" style="margin-top: 10px;">
<textarea id="textarea" class="materialize-textarea unmize" style="margin-bottom:0;" data-length="500"></textarea>
<label for="textarea" data-trans="toot">トゥート</label>

View File

@ -11,6 +11,17 @@
urls = url.match(/https?:\/\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/);
//トゥートのURLぽかったら
toot = url.match(/https:\/\/([a-zA-Z0-9.-]+)\/@([a-zA-Z0-9_]+)\/([0-9]+)/);
//タグのURLぽかったら
var tags=[];
tags = url.match(
/https:\/\/([-a-zA-Z0-9@.]+)\/tags\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
);
//メンションっぽかったら
var ats=[];
ats = url.match(
/https:\/\/([-a-zA-Z0-9@.]+)\/@([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
);
console.log(ats);
if(toot){
if(toot[1]){
var acct_id=$a.parent().attr("data-acct");
@ -21,6 +32,15 @@
$a.parent().text("Loading...")
detEx(url,acct_id);
}
}else if(tags){
if(tags[2]){
tagShow(tags[2]);
}
}else if(ats){
if(ats[2]){
return false;
}
}else{
//hrefがhttp/httpsならブラウザで
if(urls){

View File

@ -125,7 +125,13 @@ function emojiInsert(code, del) {
var now = now.replace(regExp, "");
$("#textarea").val(now + " " + code);
}
$("#textarea").focus();
var selin = $("#textarea").prop('selectionStart');
if(!selin){
selin=0;
}
localStorage.setItem("cursor", selin);
}
//改行挿入
function brInsert(code) {

View File

@ -2,8 +2,26 @@
//全てのTL処理で呼び出し
function additional(acct_id, tlid) {
//メンション系
$(".mention").attr("href", "#");
//$(".mention").attr("href", "");
$(".mention").addClass("parsed");
$(".hashtag").each(function(i, elem) {
var tags = $(this).attr("href").match(
/https?:\/\/([-a-zA-Z0-9@.]+)\/tags\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
);
$(this).attr("href","#");
if(tags){
if(tags[2]){
$(this).attr("onclick",'tagShow(\'' + tags[2] + '\')');
}
}
});
//トゥートサムネ
$("#timeline_" + tlid + " .toot a:not(.parsed)").each(function(i, elem) {
var domain = localStorage.getItem("domain_" + acct_id);

View File

@ -379,7 +379,7 @@ function parse(obj, mix, acct_id, tlid, popup) {
var mentions = "";
//メンションであれば
if (menck) {
mentions = "Links: ";
mentions = "";
Object.keys(toot.mentions).forEach(function(key3) {
var mention = toot.mentions[key3];
mentions = mentions + '<a onclick="udg(\'' + mention.id + '\',' +
@ -391,12 +391,9 @@ function parse(obj, mix, acct_id, tlid, popup) {
var tags = "";
//タグであれば
if (tagck) {
if (!menck) {
tags = "Links: ";
}
Object.keys(toot.tags).forEach(function(key4) {
var tag = toot.tags[key4];
tags = tags + '<a onclick="tagShow(\'' + tag.name + '\')" class="pointer">#' + tag.name + '</a><span class="hide" data-tag="' + tag.name + '"> <a onclick="tl(\'tag\',\'' + tag.name + '\',' + acct_id +
tags = tags + '<span class="hide" data-tag="' + tag.name + '">#' + tag.name + ':<a onclick="tl(\'tag\',\'' + tag.name + '\',' + acct_id +
',\'add\')" class="pointer" title="#' + tag.name + 'のタイムライン">TL</a> <a onclick="brInsert(\'#' + tag.name + '\')" class="pointer" title="#' + tag.name + 'でトゥート">Toot</a> '+
'<a onclick="tagPin(\'' + tag.name + '\')" class="pointer" title="#' + tag.name + 'をよく使うタグへ">Pin</a></span> ';
});

View File

@ -93,7 +93,7 @@ function parseColumn() {
}
}
var html = '<div class="box" id="timeline_box_' + key + '_box" tlid="' + key +
'"><div class="notice-box z-depth-2" id="menu_'+key+'"'+insert+'>'+
'" data-acct="'+acct.domain+'"><div class="notice-box z-depth-2" id="menu_'+key+'"'+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_name"><span id="notice_' + key + '" class="tl-title"></span></div>'+
'<div class="area-a1"><a onclick="notfToggle(' + acct.domain + ',' + key +

View File

@ -75,7 +75,9 @@ function sort(){
var add = {
domain: data.domain,
type: data.type,
data:data.data
data:data.data,
background:data.background,
text:data.text
};
newobj.push(add);
if(flags[i]=="true"){

View File

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

View File

@ -113,8 +113,8 @@
1画面で得られる情報量が格段にアップしますが、すこし鬱陶しいと思うかもしれません。<br>
<input class="with-gap" onchange="settings()" name="mov" type="radio" id="mov_yes" value="yes" />
<label for="mov_yes">はい</label>
<input class="with-gap" onchange="settings()" name="mov" type="radio" id="mov_hide" value="no" />
<label for="mov_hide">いいえ</label>
<input class="with-gap" onchange="settings()" name="mov" type="radio" id="mov_no" value="no" />
<label for="mov_no">いいえ</label>
<br>
<h5>指定行数以上を折りたたむ</h5>5文字以下のトゥートは折りたたみません。また、折りたたみ時は改行が描画されません。
<br>

View File

@ -1 +1 @@
{"warn":"これはGCPにアップして下さい","warn2":"これはGCPにアップして下さい","warn3":"これはGCPにアップして下さい","desk":"Mio (ver.1[fixed])","date":"2018-05-10","detail":"内部V:15.1.0|Adobeフォトエディタ/UI変更"}
{"warn":"これはGCPにアップして下さい","warn2":"これはGCPにアップして下さい","warn3":"これはGCPにアップして下さい","desk":"Mio (ver.2)","date":"2018-05-12","detail":"内部V:15.2.0|バグ修正他"}