Compare commits

..

4 Commits

Author SHA1 Message Date
Cutls
2b84a27cdc TheDesk Usain (18.9.2) 2019-09-01 21:27:18 +09:00
Cutls
6f7f5cbabc Fix: poll UI 2019-09-01 01:46:42 +09:00
Cutls
174a8696b0 fix 2019-09-01 01:32:05 +09:00
Cutls
d5a27ba814 TheDesk Usamin (18.9.1) 2019-09-01 01:31:19 +09:00
9 changed files with 79 additions and 61 deletions

View File

@@ -16,6 +16,9 @@ textarea {
min-height: 100px !important; min-height: 100px !important;
font-family: inherit; font-family: inherit;
} }
#post-box .ui-resizable-s, #post-box .ui-resizable-se{
display: none !important;
}
.cancel { .cancel {
font-size: 0.5rem; font-size: 0.5rem;
@@ -108,7 +111,6 @@ textarea {
} }
#left-side { #left-side {
float: left; float: left;
overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
height: calc(100% - 32px); height: calc(100% - 32px);
} }
@@ -117,18 +119,9 @@ textarea {
float: left; float: left;
width: 300px; width: 300px;
padding: 5px; padding: 5px;
overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
height: calc(100% - 32px); height: calc(100% - 32px);
} }
#poll {
}
.poll-provider {
position: absolute;
height: calc(100% - 90px);
overflow-y: scroll;
top: 90px;
}
#posttgl,#toot-post-btn { #posttgl,#toot-post-btn {
background-color: var(--accentbtn); background-color: var(--accentbtn);
} }

View File

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

View File

@@ -110,7 +110,7 @@ function post(mode, postvis) {
} else { } else {
var scheduled = ""; var scheduled = "";
} }
if ($("#poll-sel").val() == "mastodon-poll") { if (!$("#poll").hasClass("hide")) {
var options = []; var options = [];
$(".mastodon-choice").map(function () { $(".mastodon-choice").map(function () {
var choice = $(this).val(); var choice = $(this).val();
@@ -274,6 +274,8 @@ function clear() {
$("#days_poll").val(0); $("#days_poll").val(0);
$("#hours_poll").val(0); $("#hours_poll").val(0);
$("#mins_poll").val(6); $("#mins_poll").val(6);
$("#poll").addClass("hide")
$("#pollsta").text(lang.lang_no)
$(".mastodon-choice").map(function () { $(".mastodon-choice").map(function () {
$(this).val(""); $(this).val("");
}); });

View File

@@ -20,8 +20,10 @@ input.addEventListener("focus", function () {
$("#right-side").hide() $("#right-side").hide()
$("#right-side").css("width", "300px") $("#right-side").css("width", "300px")
$("#left-side").css("width", "100%") $("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1; var width = localStorage.getItem("postbox-width");
if (!width) { if (width) {
width = width.replace("px", "") * 1
} else {
width = 300 width = 300
} }
$("#post-box").css("width", width + "px") $("#post-box").css("width", width + "px")
@@ -51,8 +53,10 @@ input.addEventListener("focus", function () {
$("#right-side").show() $("#right-side").show()
$("#right-side").css("width", "200px") $("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)") $("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200; var width = localStorage.getItem("postbox-width");
if (!width) { if (width) {
width = width.replace("px", "") * 1 + 200
} else {
width = 600 width = 600
} }
$("#post-box").css("width", width + "px") $("#post-box").css("width", width + "px")
@@ -63,8 +67,10 @@ input.addEventListener("focus", function () {
$("#right-side").hide() $("#right-side").hide()
$("#right-side").css("width", "300px") $("#right-side").css("width", "300px")
$("#left-side").css("width", "100%") $("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1; var width = localStorage.getItem("postbox-width");
if (!width) { if (width) {
width = width.replace("px", "") * 1
} else {
width = 300 width = 300
} }
$("#post-box").css("width", width + "px") $("#post-box").css("width", width + "px")
@@ -85,8 +91,10 @@ input.addEventListener("focus", function () {
$("#right-side").hide() $("#right-side").hide()
$("#right-side").css("width", "300px") $("#right-side").css("width", "300px")
$("#left-side").css("width", "100%") $("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1; var width = localStorage.getItem("postbox-width");
if (!width) { if (width) {
width = width.replace("px", "") * 1
} else {
width = 300 width = 300
} }
$("#post-box").css("width", width + "px") $("#post-box").css("width", width + "px")
@@ -149,8 +157,10 @@ input.addEventListener("focus", function () {
$("#right-side").show() $("#right-side").show()
$("#right-side").css("width", "200px") $("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)") $("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200; var width = localStorage.getItem("postbox-width");
if (!width) { if (width) {
width = width.replace("px", "") * 1 + 200
} else {
width = 600 width = 600
} }
$("#post-box").css("width", width + "px") $("#post-box").css("width", width + "px")
@@ -172,8 +182,10 @@ input.addEventListener("focus", function () {
$("#right-side").show() $("#right-side").show()
$("#right-side").css("width", "200px") $("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)") $("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1 + 200; var width = localStorage.getItem("postbox-width");
if (!width) { if (width) {
width = width.replace("px", "") * 1 + 200
} else {
width = 600 width = 600
} }
$("#post-box").css("width", width + "px") $("#post-box").css("width", width + "px")
@@ -185,8 +197,10 @@ input.addEventListener("focus", function () {
$("#right-side").hide() $("#right-side").hide()
$("#right-side").css("width", "300px") $("#right-side").css("width", "300px")
$("#left-side").css("width", "100%") $("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1; var width = localStorage.getItem("postbox-width");
if (!width) { if (width) {
width = width.replace("px", "") * 1
} else {
width = 300 width = 300
} }
$("#post-box").css("width", width + "px") $("#post-box").css("width", width + "px")

View File

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

View File

@@ -4,8 +4,10 @@ function hide() {
$("#right-side").hide() $("#right-side").hide()
$("#right-side").css("width", "300px") $("#right-side").css("width", "300px")
$("#left-side").css("width", "100%") $("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width").replace("px", "") * 1; var width = localStorage.getItem("postbox-width");
if (!width) { if(width){
width = width.replace("px", "") * 1
} else {
width = 300 width = 300
} }
$("#post-box").css("width", width) $("#post-box").css("width", width)
@@ -45,11 +47,7 @@ function show() {
} }
$('#post-box').css("left", left + "px") $('#post-box').css("left", left + "px")
$('#post-box').css("top", top + "px") $('#post-box').css("top", top + "px")
var height = localStorage.getItem("postbox-height");
var width = localStorage.getItem("postbox-width"); var width = localStorage.getItem("postbox-width");
if (height) {
$('#post-box').css("height", height + "px")
}
if (width) { if (width) {
$('#post-box').css("width", width + "px") $('#post-box').css("width", width + "px")
} else { } else {
@@ -83,7 +81,7 @@ $(function () {
minHeight: 150, minHeight: 150,
minWidth: 100, minWidth: 100,
stop: function (event, ui) { stop: function (event, ui) {
localStorage.setItem("postbox-height", ui.size.height); $("#textarea").blur()
localStorage.setItem("postbox-width", ui.size.width); localStorage.setItem("postbox-width", ui.size.width);
} }
}); });

View File

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

View File

@@ -168,8 +168,8 @@
<div id="preview" class="mize"></div> <div id="preview" class="mize"></div>
<span class=" sml mize"><span data-trans="reply">@@replyMode@@</span>: <span class=" sml mize"><span data-trans="reply">@@replyMode@@</span>:
<span id="rec">@@no@@</span>/<span data-trans="file">@@temp@@</span>: <span id="rec">@@no@@</span>/<span data-trans="file">@@temp@@</span>:
<span id="mec">@@nothing@@</span>/<span data-trans="vis">@@vis@@</span>: <span id="mec">@@nothing@@</span>/@@poll@@:<span id="pollsta">@@no@@</span>
<span id="vis">public</span> <span id="vis" class="hide">public</span>
</span> </span>
<br> <br>
<input type="text" id="cw-text" placeholder="@@cwtext@@" class="mize" style="margin:0"> <input type="text" id="cw-text" placeholder="@@cwtext@@" class="mize" style="margin:0">
@@ -231,9 +231,9 @@
</div> </div>
</div> </div>
<div id="right-side"> <div id="right-side">
<div id="suggest"></div> <div id="suggest" class="right-side-content"></div>
<!--絵文字ピッカー--> <!--絵文字ピッカー-->
<div id="emoji" class="hide"> <div id="emoji" class="hide right-side-content">
<span class="gray sml">@@emojiWarn@@ <span class="gray sml">@@emojiWarn@@
<a onclick="emojiGet('true')" class="pointer">@@refreshEmoji@@</a> <a onclick="emojiGet('true')" class="pointer">@@refreshEmoji@@</a>
<br> <br>
@@ -288,12 +288,8 @@
</div> </div>
</div> </div>
<!--Poll UI--> <!--Poll UI-->
<div id="poll" class="hide"> <div id="poll" class="hide right-side-content">
<select id="poll-sel" onchange="pollProviderCk()"> <div id="mastodon-poll" class="poll-provider">
<option value="nothing">@@pollDdisabled@@</option>
<option value="mastodon-poll">Mastodon(2.8~)</option>
</select>
<div id="mastodon-poll" class="poll-provider hide">
<input type="text" class="mastodon-choice" placeholder="@@choice@@1"> <input type="text" class="mastodon-choice" placeholder="@@choice@@1">
<input type="text" class="mastodon-choice" placeholder="@@choice@@2"> <input type="text" class="mastodon-choice" placeholder="@@choice@@2">
<input type="text" class="mastodon-choice" placeholder="@@choice@@3"> <input type="text" class="mastodon-choice" placeholder="@@choice@@3">
@@ -679,11 +675,16 @@
<a href="https://thedesk.top" target="_blank">HP</a><br> <a href="https://thedesk.top" target="_blank">HP</a><br>
<a href="https://github.com/cutls/TheDesk" target="_blank">GitHub</a><br> <a href="https://github.com/cutls/TheDesk" target="_blank">GitHub</a><br>
<br> <br>
<div id="release-Usamin_18-9-0" class="release-do" style="display:none; "> <div id="release-Usamin_18-9-2" class="release-do" style="display:none; ">
<a href="https://code.cutls.com/thedesk-log/" target="_blank">開発の経緯</a><br> <a href="https://code.cutls.com/thedesk-log/" target="_blank">開発の経緯</a><br>
<a href="https://ja.mstdn.wiki/TheDesk" target="_blank">機能一覧</a><br> <a href="https://ja.mstdn.wiki/TheDesk" target="_blank">機能一覧</a><br>
Pixiv Fanboxでは支援者様限定で様々なTheDeskに関する記事をご覧いただけます。最低月一更新。<br> Pixiv Fanboxでは支援者様限定で様々なTheDeskに関する記事をご覧いただけます。最低月一更新。<br>
困ったときは、<a href="https://docs.thedesk.top">TheDesk Docs</a>をご覧ください。 困ったときは、<a href="https://docs.thedesk.top">TheDesk Docs</a>をご覧ください。
<h5>Release Note Usamin (18.9.2)</h5>
・トゥートボックスが閉じない、消えない不具合を修正。
<h5>Release Note Usamin (18.9.1)</h5>
・トゥートボックスのリサイズを横だけにした<br>
・アンケートが上手く作成できない不具合を修正。
<h5>Release Note Usamin (18.9.0)</h5> <h5>Release Note Usamin (18.9.0)</h5>
・設定エクスポートファイルが変更された<br> ・設定エクスポートファイルが変更された<br>
 .thedeskconfigv2: 17.2.0~18.8.3<br>  .thedeskconfigv2: 17.2.0~18.8.3<br>

View File

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