TheDesk Usamin (18.9.0)

This commit is contained in:
Cutls 2019-08-31 23:35:18 +09:00
parent f8f2719c5d
commit 7d02ef2b3e
10 changed files with 140 additions and 20 deletions

View File

@ -7,10 +7,10 @@
background-color: var(--postbox);
border: thin solid gray;
z-index: 501;
min-width: 300px;
max-width: 100%;
padding: 5px;
border-radius: 5px;
overflow: hidden;
}
textarea {
min-height: 100px !important;
@ -108,13 +108,18 @@ textarea {
}
#left-side {
float: left;
width: 300px;
overflow-y: scroll;
overflow-x: hidden;
height: calc(100% - 32px);
}
#right-side {
display: none;
float: left;
width: 300px;
padding: 5px;
overflow-y: scroll;
overflow-x: hidden;
height: calc(100% - 32px);
}
#poll {
}

View File

@ -285,11 +285,12 @@ iframe,
text-overflow: ellipsis;
overflow: hidden;
}
.area-additional.acct-note p:not(:first-child) {
.area-toot.acct-note p:not(:first-child) {
display: none;
}
.area-additional.acct-note p:first-child:after {
.area-toot.acct-note p:first-child:after {
content: "...";
color: var(--gray)
}
.area-actions {

View File

@ -13,6 +13,13 @@ function emojiToggle(reaction) {
if ($("#emoji").hasClass("hide")) {
$("#emoji").removeClass("hide")
$("#right-side").show()
$("#right-side").css("width", "300px")
$("#left-side").css("width","calc(100% - 300px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 300;
if (!width) {
width = 600
}
$("#post-box").css("width", width + "px")
$("#suggest").html("");
if (!localStorage.getItem("emoji_" + acct_id)) {
var html =
@ -23,9 +30,16 @@ function emojiToggle(reaction) {
}
} else {
$("#poll").addClass("hide")
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#emoji").addClass("hide")
$("#suggest").html("");
$("#right-side").hide()
$("#left-side").css("width","100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}

View File

@ -18,6 +18,13 @@ input.addEventListener("focus", function () {
$("#suggest").html("");
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}
return;
}
@ -42,11 +49,25 @@ input.addEventListener("focus", function () {
}
if (ehtml != "") {
$("#right-side").show()
$("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200;
if (!width) {
width = 600
}
$("#post-box").css("width", width + "px")
$("#poll").addClass("hide")
$("#emoji").addClass("hide")
} else {
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}
}
$("#suggest").html(ehtml);
@ -62,6 +83,13 @@ input.addEventListener("focus", function () {
$("#suggest").html("");
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}
return;
}
@ -119,6 +147,13 @@ input.addEventListener("focus", function () {
});
$("#suggest").html(ins);
$("#right-side").show()
$("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200;
if (!width) {
width = 600
}
$("#post-box").css("width", width + "px")
$("#poll").addClass("hide")
$("#emoji").addClass("hide")
}
@ -132,12 +167,26 @@ input.addEventListener("focus", function () {
}
});
$("#right-side").show()
$("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200;
if (!width) {
width = 600
}
$("#post-box").css("width", width + "px")
$("#suggest").html(accts);
$("#poll").addClass("hide")
$("#emoji").addClass("hide")
} else {
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}
}
});
@ -172,6 +221,13 @@ function tagInsert(code, del) {
$("#textarea").focus();
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "50%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
}
$("#suggest").html("");
}

View File

@ -1039,7 +1039,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
toot.acct + locked + '</span>' +
'</div>' +
'</div>' +
'<div class="area-additional acct-note">' + toot.note.replace(/<br\s?\/?>.+/g, "...") + '</div>' +
'<div class="area-toot acct-note">' + toot.note.replace(/<br\s?\/?>.+/g, '<span class="gray">...</span>') + '</div>' +
'<div style="justify-content:space-around;top:5px" class="area-actions"> <div class="cbadge" style="width:100px;">' + lang.lang_status_follow + ':' +
toot.following_count +
'</div><div class="cbadge" style="width:100px;">' + lang.lang_status_followers + ':' + toot.followers_count +

View File

@ -2,9 +2,23 @@
function pollToggle() {
if ($("#poll").hasClass("hide")) {
$("#right-side").show()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "calc(100% - 300px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 300;
if (!width) {
width = 600
}
$("#post-box").css("width", width + "px")
$("#poll").removeClass("hide")
} else {
$("#right-side").hide()
$("#left-side").css("width", "100%")
$("#right-side").css("width", "300px")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width + "px")
$("#emoji").addClass("hide")
$("#poll").addClass("hide")
}

View File

@ -2,6 +2,13 @@
//✕隠す
function hide() {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1;
if (!width) {
width = 300
}
$("#post-box").css("width", width)
$('#post-box').fadeOut()
$("#post-box").removeClass("appear")
$("#emoji").addClass("hide")
@ -38,6 +45,16 @@ function show() {
}
$('#post-box').css("left", left + "px")
$('#post-box').css("top", top + "px")
var height = localStorage.getItem("postbox-height");
var width = localStorage.getItem("postbox-width");
if (height) {
$('#post-box').css("height", height + "px")
}
if (width) {
$('#post-box').css("width", width + "px")
} else {
$('#post-box').css("width", "300px")
}
$('#post-box').fadeIn();
$('#textarea').characterCounter();
}
@ -62,6 +79,14 @@ $(function () {
localStorage.setItem("postbox-top", top);
}
});
$("#post-box").resizable({
minHeight: 150,
minWidth: 100,
stop: function (event, ui) {
localStorage.setItem("postbox-height", ui.size.height);
localStorage.setItem("postbox-width", ui.size.width);
}
});
});
//コード受信

View File

@ -1,6 +1,6 @@
{
"name": "thedesk",
"version": "18.8.3",
"version": "18.9.0",
"description": "TheDesk is a Mastodon client for PC.",
"repository": "https://github.com/cutls/TheDesk",
"main": "main.js",

View File

@ -54,12 +54,12 @@
<div class="row" style="margin-bottom:0;">
</span>
<div class="" style="float:left;">
<a onclick="profShow()" style="vertical-align:-2.5rem;" class="pointer mize">
<a onclick="profShow()" style="vertical-align:-1.7rem;" class="pointer mize">
<img src="../../img/missing.svg" id="acct-sel-prof" title="@@showSelectProf@@(Ctrl+Shift+P)"
data-trans-title="post_box_prof" width="24px">
</a>
</div>
<div class="input-field mize" style="float:left; width:calc(100% - 24px)">
<div class="input-field mize" style="float:left; width:calc(100% - 24px); margin-top:0;">
<select id="post-acct-sel" class="acct-sel" onchange="mdCheck()"></select>
</div>
<span class="cancel">
@ -135,7 +135,7 @@
<a onclick="previewEdit()">Edit</a>
</span>
</div>
<div class="input-field col s12" id="toot-field" style="margin-top: 10px;">
<div class="input-field col s12" id="toot-field" style="margin-top: 0;margin-bottom: 0;">
<textarea id="textarea" class="materialize-textarea unmize" style="margin-bottom:0;"
data-length="500"></textarea>
@ -679,20 +679,25 @@
<a href="https://thedesk.top" target="_blank">HP</a><br>
<a href="https://github.com/cutls/TheDesk" target="_blank">GitHub</a><br>
<br>
<div id="release-Usamin_18-8-3" class="release-do" style="display:none; ">
<div id="release-Usamin_18-9-0" class="release-do" style="display:none; ">
<a href="https://code.cutls.com/thedesk-log/" target="_blank">開発の経緯</a><br>
<a href="https://ja.mstdn.wiki/TheDesk" target="_blank">機能一覧</a><br>
Pixiv Fanboxでは支援者様限定で様々なTheDeskに関する記事をご覧いただけます。最低月一更新。<br>
困ったときは、<a href="https://docs.thedesk.top">TheDesk Docs</a>をご覧ください。
<h5>Release Note Usamin (18.8.3)</h5>
<h5>Release Note Usamin (18.9.0)</h5>
・設定エクスポートファイルが変更された<br>
.thedeskconfigv2: 17.2.0~18.8.3<br>
.thedeskconfig: 16.0.1~17.2.0<br>
.json5: 本バージョン以降<br>
<u>エクスポート可能な形式</u><br>
.json5<br>
<u>インポート可能な形式</u><br>
.thedeskconfigv2, .thedeskconfig, .json5
 .thedeskconfigv2: 17.2.0~18.8.3<br>
 .thedeskconfig: 16.0.1~17.2.0<br>
 .json5: 本バージョン以降<br>
 <u>エクスポート可能な形式</u><br>
 .json5<br>
 <u>インポート可能な形式</u><br>
 .thedeskconfigv2, .thedeskconfig, .json5<br>
・カスタムCSSを読み込める(自己責任): macOS: /Users/:user/Library/Application Support/TheDesk | Windows: C:\Users\:user\AppData\Roaming\thedesk<br>
・(v3.0|m追従)プロフィールディレクトリ読み込み<br>
・(v3.0|m追従)最終アクティブ時間をユーザー一覧表示時に一緒に表示<br>
・自己紹介をユーザー一覧表示時に一緒に表示<br>
・メニューとトゥートボックスがリサイズ可能になった<br>
</div>
<div id="release-en" style="display:none">
<h5>Let's make it native!</h5>

View File

@ -1,6 +1,6 @@
const fs = require("fs")
const readlineSync = require('readline-sync')
let ver = "Usamin (18.8.3)"
let ver = "Usamin (18.9.0)"
const execSync = require('child_process').execSync;
let gitHash = execSync("git rev-parse HEAD").toString().trim()
fs.writeFileSync("../../git", gitHash)