TheDesk Mio (ver.1 beta)
This commit is contained in:
parent
7caed2d119
commit
e4414f6051
|
@ -6,18 +6,18 @@
|
|||
background-color: white;
|
||||
border: thin solid gray;
|
||||
z-index: 500;
|
||||
width: 350px;
|
||||
min-width:350px;
|
||||
width: 300px;
|
||||
min-width:300px;
|
||||
max-width:100%;
|
||||
padding: 5px;
|
||||
}
|
||||
.cancel {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
font-size: 0.5rem;
|
||||
color: gray;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
right: 0px;
|
||||
}
|
||||
.more-show {
|
||||
display: none;
|
||||
|
|
|
@ -19,10 +19,11 @@
|
|||
flex-wrap:wrap;
|
||||
}
|
||||
#sidebar-top{
|
||||
height:70vh;
|
||||
height:calc(100vh - 100px);
|
||||
display:flex;
|
||||
flex-wrap:wrap;
|
||||
align-content:center;
|
||||
align-content:flex-start;
|
||||
overflow-y:scroll;
|
||||
}
|
||||
#sidebar-btm{
|
||||
height:9em;
|
||||
|
@ -50,7 +51,7 @@
|
|||
font-size:12px;
|
||||
vertical-align: 0.6rem;
|
||||
}
|
||||
#sidebar #side-dead{
|
||||
#sidebar .side-dead{
|
||||
height:30px;
|
||||
}
|
||||
|
||||
|
@ -81,7 +82,7 @@ iframe {
|
|||
}
|
||||
.user{
|
||||
cursor:text;
|
||||
font-size:1.2em;
|
||||
font-size:1.2rem;
|
||||
}
|
||||
.emojione,.emoji-img{
|
||||
width: 20px;
|
||||
|
@ -106,7 +107,7 @@ iframe {
|
|||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 43px 2fr 1fr;
|
||||
grid-template-areas: 'notice notice notice' 'icon display_name acct' 'icon toot toot' 'icon additional additional' 'actions actions date_via';
|
||||
grid-template-areas: 'notice notice notice' 'icon display_name acct' 'icon toot toot' 'vis additional additional' 'actions actions actions';
|
||||
}
|
||||
|
||||
.area-notice {
|
||||
|
@ -161,6 +162,11 @@ grid-area: toot;
|
|||
margin:2px;
|
||||
grid-area: actions;
|
||||
}
|
||||
.area-vis {
|
||||
margin:2px;
|
||||
font-size:0.5rem !important;
|
||||
grid-area: vis;
|
||||
}
|
||||
|
||||
.action i{
|
||||
font-size:1rem;
|
||||
|
@ -199,6 +205,7 @@ font-size:1rem;
|
|||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
height:calc(0.8em + 8px);
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
|
@ -307,6 +314,9 @@ p:not(:last-child){
|
|||
color: black;
|
||||
cursor: text;
|
||||
}
|
||||
.type-b{
|
||||
display:none;
|
||||
}
|
||||
|
||||
/*black theme*/
|
||||
.blacktheme .notf-box,.blacktheme .modal-footer,.blacktheme #sidebar {
|
||||
|
|
172
app/index.html
172
app/index.html
|
@ -26,9 +26,9 @@
|
|||
<script type="text/javascript" src="./js/ui/jquery-ui.min.js"></script>
|
||||
<script>
|
||||
//必ずアプデ時のremove instance消して!
|
||||
var ver="Mizuki (ver.7)";
|
||||
var ver="Mio (ver.1 beta)";
|
||||
//betaを入れるとバージョンチェックしない
|
||||
//var ver="beta";
|
||||
var ver="beta";
|
||||
var acct_id=0;
|
||||
var tlid=0;
|
||||
verck(ver);
|
||||
|
@ -134,6 +134,7 @@ var tlid=0;
|
|||
<!--サイドバー-->
|
||||
<div id="sidebar">
|
||||
<div id="sidebar-top">
|
||||
<div class="side-dead"></div>
|
||||
<div class="big-menu" id="add-tgl">
|
||||
<a onclick="addToggle()" class="nex waves-effect" data-trans-i="add">
|
||||
<i class="material-icons nex big-icon" title="カラム追加" data-trans-title="column_add">add</i>
|
||||
|
@ -155,7 +156,7 @@ var tlid=0;
|
|||
<br>
|
||||
<span class="side-label" data-trans="sort">カラム一覧</span>
|
||||
</div>
|
||||
<div id="side-dead">
|
||||
<div class="side-dead">
|
||||
</div>
|
||||
<div class="small-menu" id="src-tgl">
|
||||
<a onclick="srcToggle()" class="nex waves-effect">
|
||||
|
@ -217,58 +218,25 @@ var tlid=0;
|
|||
</div>
|
||||
<div id="post-box" class="z-depth-3">
|
||||
<!--トゥートボックス-->
|
||||
|
||||
<div class="row" style="margin-bottom:0;">
|
||||
</span>
|
||||
<div class="" style="float:left;">
|
||||
<a onclick="profShow()" style="vertical-align:-2.5rem;" class="pointer mize">
|
||||
<img src="./img/missing.svg" id="acct-sel-prof" title="選択中のプロフィール表示(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)">
|
||||
<select id="post-acct-sel" class="acct-sel" onchange="mdCheck()"></select>
|
||||
</div>
|
||||
<span class="cancel">
|
||||
<i class="material-icons waves-effect" onclick="hide()" title="このボックスを閉じる(X)" data-trans-title="post_box_close">cancel</i>
|
||||
<i class="material-icons waves-effect mini-btn" onclick="mini()" title="このボックスを最小化" data-trans-title="post_box_mini">expand_more</i>
|
||||
</span>
|
||||
<br>
|
||||
<a id="clear" class="setting nex waves-effect">
|
||||
<i class="material-icons nex mize" title="トゥートボックスのクリア(Ctrl+Shit+C)" data-trans-title="post_box_clear">clear</i>
|
||||
</a>
|
||||
<a onclick="zoomBox()" class="setting nex waves-effect">
|
||||
<i class="material-icons nex mize" title="ボックスの拡大・縮小(E)" data-trans-title="post_box_zoom">zoom_out_map</i>
|
||||
</a>
|
||||
<a onclick="Rtoggle()" class="setting nex mize waves-effect" id="radio-btn">
|
||||
<i class="material-icons nex" title="Spotify NowPlaying/Radio(Select/Pause)">play_circle_outline</i>
|
||||
</a>
|
||||
<div id="waveform">
|
||||
</div>
|
||||
<span id="radio-sta" class="radio"></span>
|
||||
<div id="radio-view" class="hide radio mize">
|
||||
<a onclick="nowplaying('spotify')" class="pointer" title="Ctrl+Shift+N"><i class="fa fa-spotify"></i>NowPlaying</a>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('https://listen.moe/stream','Listen.moe')" data-name="Listen.moe">Listen.moe</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://itori.animenfo.com:443/;','AnimeNfo Radio')" data-name="AnimeNfo Radio">AnimeNfo Radio</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://hyades.shoutca.st:8043/stream','LoFi hip hop Radio')" data-name="LoFi hip hop Radio">LoFi hip hop Radio</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://89.16.185.174:8004/stream','Linn Classical')" data-name="Linn Classical">Linn Classical</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://89.16.185.174:8000/stream','Linn Jazz')" data-name="Linn Jazz">Linn Jazz</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://edge-ads-01-cr.sharp-stream.com/jazzfmmobile.aac','Jazz FM')" data-name="Jazz FM">Jazz FM</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://91.121.59.45:10024/stream','canal-jazz.eu')" data-name="canal-jazz.eu">canal-jazz.eu</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Ryourself()">Others</span>
|
||||
</div>
|
||||
<div id="radio-input" class="hide radio mize">
|
||||
<input type="url" id="radio-url" placeholder="URL" style="width:100px">
|
||||
<button class="btn waves-effect" onclick="Rinput()">Play</button>
|
||||
<button class="btn waves-effect" onclick="Rselect()">Presets</button>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom:0;">
|
||||
<span class="sml gray mize" data-trans="post_box_dd">画面内どこでもドラッグ・アンド・ドロップできます。</span>
|
||||
<span class="mize">
|
||||
<br>アカウント選択
|
||||
</span>
|
||||
<br>
|
||||
</span>
|
||||
<div class="input-field mize" style="float:left; width:calc(100% - 24px)">
|
||||
<select id="post-acct-sel" class="acct-sel" onchange="mdCheck()"></select>
|
||||
</div>
|
||||
<div class="mize" style="float:left;">
|
||||
<a onclick="profShow()" style="vertical-align:-2.5rem;" class="pointer">
|
||||
<img src="./img/missing.svg" id="acct-sel-prof" title="選択中のプロフィール表示(Ctrl+Shift+P)" data-trans-title="post_box_prof" width="24px">
|
||||
</a>
|
||||
</div>
|
||||
<!--Markdown-->
|
||||
<div class="row" style="margin-bottom:0">
|
||||
<div class="markdown mize">
|
||||
<div class="col s12 more-show">
|
||||
<div class="col s12">
|
||||
<i class="material-icons pointer setting waves-effect" onclick="tagsel('b')" title="太字(Ctrl+B)テキストボックス内を選択してから押すと囲みます。">format_bold</i>
|
||||
<i class="material-icons pointer setting waves-effect" onclick="tagsel('i')" title="斜字(Ctrl+I)テキストボックス内を選択してから押すと囲みます。">format_italic</i>
|
||||
<i class="material-icons pointer setting waves-effect" onclick="tagsel('u')" title="下線(Ctrl+U)テキストボックス内を選択してから押すと囲みます。">format_underlined</i>
|
||||
|
@ -310,6 +278,7 @@ var tlid=0;
|
|||
</span>
|
||||
</div>
|
||||
<div class="input-field col s12" id="toot-field" style="margin-top: 0;">
|
||||
|
||||
<textarea id="textarea" class="materialize-textarea unmize" style="margin-bottom:0;" data-length="500"></textarea>
|
||||
<label for="textarea" data-trans="toot">トゥート</label>
|
||||
<br>
|
||||
|
@ -319,36 +288,33 @@ var tlid=0;
|
|||
<span class="sml gray pointer more-show anti-markdown hide mize">
|
||||
<a onclick="mdToggle()">Markdownエディタを表示</a>
|
||||
</span>
|
||||
|
||||
<br>
|
||||
<span id="suggest"></span>
|
||||
</div>
|
||||
<div class="col s12 mize" style="margin-top: 0; display:flex; justify-content: space-between">
|
||||
<i class="waves-effect gray material-icons" id="nsfw" title="画像に制限を付与" onclick="nsfw()">visibility_off</i>
|
||||
<i class="waves-effect gray material-icons purple-text dropdown-button" data-activates='dropdown1' id="vis-icon">public</i>
|
||||
<a class="waves-effect gray" id="cw" onclick="cw()" title="コンテンツワーニング(トゥートを表示する前にメッセージで隠す)">CW</a>
|
||||
<span><span id="imgup"></span><span id="imgsel"><i class="waves-effect material-icons gray" onclick="fileselect()" title="ファイルを選択">photo_library</i></span></span>
|
||||
<i class="waves-effect gray material-icons" onclick="adobe()" title="Adobeフォトエディタ">format_shapes</i>
|
||||
<i class="waves-effect gray material-icons" onclick="emoji()" title="絵文字を挿入">tag_faces</i>
|
||||
<a onclick="nowplaying('spotify')" class="pointer waves-effect gray" title="Spotify Now Playing(アカウント連携が必要です)Ctrl+Shift+N"><i class="fa fa-spotify" style="font-size:24px;"></i></a>
|
||||
<i class="material-icons nex gray waves-effect" title="トゥートボックスのクリア(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i>
|
||||
</div>
|
||||
<div class="col s11 mize" style="margin-bottom:5px; padding:0;">
|
||||
|
||||
<span id="preview" class="mize"></span>
|
||||
<span class=" sml mize"><span data-trans="reply">返信モード</span>:
|
||||
<span id="rec">いいえ</span>/<span data-trans="file">添付</span>:
|
||||
<span id="mec">なし</span>/<span data-trans="vis">公開範囲</span>:
|
||||
<span id="vis">public</span>/<span data-trans="nsfw">画像制限</span>:
|
||||
<span id="nsc">なし</span>
|
||||
<span id="vis">public</span>
|
||||
</span>
|
||||
<br>
|
||||
<input type="text" id="cw-text" placeholder="警告文" class="mize">
|
||||
</div>
|
||||
<div class="col s1 mize" style="padding:0;">
|
||||
<span id="imgup"></span>
|
||||
<span id="imgsel"><i class="material-icons pointer" onclick="fileselect()" title="ファイルを選択">photo_library</i><span id="imgup"></span>
|
||||
</div>
|
||||
<div class="col s3 mize">
|
||||
<button class="btn waves-effect blue darken-3" style="width:100%; padding:0; margin-top:0;" id="cw" onclick="cw()" title="コンテンツワーニング(トゥートを表示する前にメッセージで隠す)(青:OFF)">CW</button>
|
||||
</div>
|
||||
<div class="col s3 mize">
|
||||
<button class="dropdown-button btn waves-effect purple " style="width:100%; padding:0; margin-top:0;" data-activates='dropdown1' id="vis-icon">
|
||||
<i class="material-icons">public</i>
|
||||
</button>
|
||||
<!-- 公開範囲 Dropdown Structure -->
|
||||
<ul id='dropdown1' class='dropdown-content'>
|
||||
<li>公開範囲指定</li>
|
||||
<li style="font-size: 16px; display: block; line-height: 22px; padding: 14px 16px;">公開範囲指定</li>
|
||||
<li>
|
||||
<a onclick="vis('public')">公開(Public)</a>
|
||||
</li>
|
||||
|
@ -365,11 +331,15 @@ var tlid=0;
|
|||
<a onclick="vis('direct')" class="disabled direct">ダイレクト(Direct)</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!--hidden area-->
|
||||
<input type="hidden" id="reply">
|
||||
<input type="hidden" id="media">
|
||||
<!--END hidden area-->
|
||||
</div>
|
||||
<div id="toot-btn-field">
|
||||
<button class="btn waves-effect indigo unmize" style="width:calc(100% - 10px); padding:0; margin-top:10px;" onclick="post()" id="toot-post-btn">トゥート</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s3 mize">
|
||||
<button class="btn waves-effect red darken-3" style="width:100%; padding:0; margin-top:0;" onclick="emoji()" title="絵文字">
|
||||
<i class="material-icons">tag_faces</i>
|
||||
</button>
|
||||
<!--絵文字ピッカー-->
|
||||
<div id="emoji" class="hide shared z-depth-4">
|
||||
<span class="gray sml">インスタンスによって実装が異なります。
|
||||
|
@ -426,23 +396,6 @@ var tlid=0;
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s3 mize">
|
||||
<button class="btn waves-effect blue darken-3" style="width:100%; padding:0; margin-top:0;" onclick="nsfw()" id="nsfw" title="画像に制限を付与(青:OFF)">
|
||||
<i class="material-icons">photo</i>
|
||||
<i class="material-icons" id="nsi">lock_open</i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!--hidden area-->
|
||||
<input type="hidden" id="reply">
|
||||
<input type="hidden" id="media">
|
||||
<!--END hidden area-->
|
||||
<div class="col s12" id="toot-btn-field">
|
||||
<button class="btn waves-effect indigo unmize" style="width:100%; padding:0; margin-top:10px;" onclick="post()" id="toot-post-btn">トゥート</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal Structure Tootdata-->
|
||||
<div id="tootmodal" class="modal modal-fixed-footer">
|
||||
<div class="modal-content">
|
||||
|
@ -454,13 +407,6 @@ var tlid=0;
|
|||
<div class="collapsible-body toot-reset" id="toot-reply">
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons">arrow_downward</i>これよりあとの会話
|
||||
</div>
|
||||
<div class="collapsible-body toot-reset" id="toot-after">
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header" id="activator">
|
||||
<i class="material-icons">more_horiz</i>対象のトゥート
|
||||
|
@ -470,11 +416,25 @@ var tlid=0;
|
|||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons">arrow_downward</i>これより前のLocal TL
|
||||
<i class="material-icons">arrow_downward</i>これよりあとの会話
|
||||
</div>
|
||||
<div class="collapsible-body toot-reset" id="toot-after">
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons">people_outline</i>これより前のLocal TL(エアリプソース確認)
|
||||
</div>
|
||||
<div class="collapsible-body toot-reset" id="toot-before">
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons">person_outline</i>これより前のユーザーTL(BTソース確認)
|
||||
</div>
|
||||
<div class="collapsible-body toot-reset" id="user-before">
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons">star</i>このトゥートをお気に入りに登録した人
|
||||
|
@ -745,7 +705,6 @@ var tlid=0;
|
|||
<script type="text/javascript" src="./js/ui/img.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/theme.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/pip.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/radio.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/sort.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/spotify.js"></script>
|
||||
<script type="text/javascript" src="./js/post/post.js"></script>
|
||||
|
@ -763,3 +722,30 @@ var tlid=0;
|
|||
<script type="text/javascript" src="./js/emoji/emojipack.js"></script>
|
||||
<script type="text/javascript" src="./js/emoji/default-emoji.js"></script>
|
||||
<script type="text/javascript" src="./js/platform/end.js"></script>
|
||||
<!--
|
||||
<script type="text/javascript" src="https://dme0ih8comzn4.cloudfront.net/imaging/v2/editor.js"></script>
|
||||
<script type="text/javascript">
|
||||
//Adobeエディターのセットアップ関数
|
||||
function set_adbe_image(){
|
||||
//<body>内の画像要素を取得
|
||||
var image = document.getElementById('imgmodal');
|
||||
//画像編集エディタを利用するための準備
|
||||
var Editor = new Aviary.Feather({
|
||||
apiKey: 'ffee425017ab44b18ce95dab98a5cdc1',
|
||||
language: 'ja',
|
||||
onSave: function(imageID, newURL) {
|
||||
console.log(newURL);
|
||||
},
|
||||
});
|
||||
//画像要素をクリックしたら、「編集エディタ」を表示
|
||||
image.addEventListener('click', function () {
|
||||
Editor.launch({
|
||||
//<img>内のidとsrcを取得
|
||||
image: image.id,
|
||||
url: image.src
|
||||
});
|
||||
});
|
||||
}
|
||||
//エディター動作割り当てる
|
||||
set_adbe_image();
|
||||
</script>-->
|
|
@ -9,7 +9,7 @@ var idata={
|
|||
"kirishima.cloud":"instance",
|
||||
"kirishima.cloud_name":"アスタルテ",
|
||||
"kirishima.cloud_letters":"6229",
|
||||
"kirishima.cloud_bbcode":"enabled",
|
||||
"kirishima.cloud_bbcode":"disabled",
|
||||
"kirishima.cloud_markdown":"disabled",
|
||||
"minohdon.jp":"instance",
|
||||
"minohdon.jp_name":"箕面丼",
|
||||
|
@ -30,7 +30,7 @@ var idata={
|
|||
"dev.kirishima.cloud_name":"アスタルテ(Dev)",
|
||||
"dev.kirishima.cloud_letters":"6229",
|
||||
"dev.kirishima.cloud_bbcode":"enabled",
|
||||
"dev.kirishima.cloud_markdown":"disabled",
|
||||
"dev.kirishima.cloud_markdown":"enabled",
|
||||
"mstdn.y-zu.org":"instance",
|
||||
"mstdn.y-zu.org_name":"Yづドン!(502 BadGateway)",
|
||||
"mstdn.y-zu.org_letters":"500",
|
||||
|
@ -393,6 +393,11 @@ function multi() {
|
|||
}else{
|
||||
$("#textarea").attr("data-length", 500)
|
||||
}
|
||||
if(domain=="knzk.me" || domain=="mstdn.y-zu.org"){
|
||||
$("#type-sel").append('<option value="dm" data-trans="dm" id="direct-add">ダイレクトメッセージ</option>');
|
||||
}else{
|
||||
$("#direct-add").remove();
|
||||
}
|
||||
var profimg=localStorage.getItem("prof_"+key);
|
||||
var domain=localStorage.getItem("domain_"+key);
|
||||
if(!profimg){
|
||||
|
|
|
@ -196,3 +196,11 @@ element.addEventListener("paste", function(e){
|
|||
|
||||
// 画像以外がペーストされたときのために、元に戻しておく
|
||||
});
|
||||
//Adobeフォトエディタ
|
||||
function adobe(){
|
||||
var agree = localStorage.getItem("adobeagree");
|
||||
ipc.send('adobe', agree);
|
||||
}
|
||||
ipc.on('adobeagree', function (event, arg) {
|
||||
localStorage.setItem("adobeagree",arg);
|
||||
});
|
|
@ -71,8 +71,7 @@ function clear() {
|
|||
} else {
|
||||
$("#cw-text").val("");
|
||||
}
|
||||
$("#cw").addClass("blue");
|
||||
$("#cw").removeClass("yellow");
|
||||
$("#cw").removeClass("yellow-text");
|
||||
$("#cw").removeClass("cw-avail");
|
||||
$("#rec").text("いいえ");
|
||||
$("#mec").text("なし");
|
||||
|
@ -86,9 +85,8 @@ function clear() {
|
|||
vis(vist);
|
||||
}
|
||||
}
|
||||
$("#nsfw").addClass("blue");
|
||||
$("#nsfw").removeClass("yellow");
|
||||
$("#nsi").html("lock_open");
|
||||
$("#nsfw").removeClass("yellow-text");
|
||||
$("#nsfw").html("visibility_off");
|
||||
$("#nsfw").removeClass("nsfw-avail");
|
||||
$("#nsc").text("なし");
|
||||
$("#drag").css("background-color", "#e0e0e0");
|
||||
|
|
|
@ -2,42 +2,38 @@
|
|||
//画像保護
|
||||
function nsfw(){
|
||||
if($("#nsfw").hasClass("nsfw-avail")){
|
||||
$("#nsfw").addClass("blue");
|
||||
$("#nsfw").removeClass("yellow");
|
||||
$("#nsi").html("lock_open");
|
||||
$("#nsfw").removeClass("yellow-text");
|
||||
$("#nsfw").html("visibility_off");
|
||||
$("#nsfw").removeClass("nsfw-avail");
|
||||
$("#nsc").text("なし");
|
||||
}else{
|
||||
$("#nsfw").removeClass("blue");
|
||||
$("#nsfw").addClass("yellow");
|
||||
$("#nsi").html("lock_outline");
|
||||
$("#nsfw").addClass("yellow-text");
|
||||
$("#nsfw").html("visibility");
|
||||
$("#nsfw").addClass("nsfw-avail");
|
||||
$("#nsc").text("あり");
|
||||
}
|
||||
}
|
||||
|
||||
//投稿公開範囲
|
||||
function vis(set){
|
||||
$("#vis").text(set);
|
||||
$("#vis-icon").removeClass("red");
|
||||
$("#vis-icon").removeClass("orange");
|
||||
$("#vis-icon").removeClass("blue");
|
||||
$("#vis-icon").removeClass("purple");
|
||||
$("#vis-icon").removeClass("red-text");
|
||||
$("#vis-icon").removeClass("orange-text");
|
||||
$("#vis-icon").removeClass("blue-text");
|
||||
$("#vis-icon").removeClass("purple-text");
|
||||
if(set=="public"){
|
||||
$("#vis-icon i").text("public");
|
||||
$("#vis-icon").addClass("purple");
|
||||
$("#vis-icon").text("public");
|
||||
$("#vis-icon").addClass("purple-text");
|
||||
}else if(set=="unlisted"){
|
||||
$("#vis-icon i").text("lock_open");
|
||||
$("#vis-icon").addClass("blue");
|
||||
$("#vis-icon").text("lock_open");
|
||||
$("#vis-icon").addClass("blue-text");
|
||||
}else if(set=="private"){
|
||||
$("#vis-icon i").text("lock");
|
||||
$("#vis-icon").addClass("orange");
|
||||
$("#vis-icon").text("lock");
|
||||
$("#vis-icon").addClass("orange-text");
|
||||
}else if(set=="direct"){
|
||||
$("#vis-icon i").text("mail");
|
||||
$("#vis-icon").addClass("red");
|
||||
$("#vis-icon").text("mail");
|
||||
$("#vis-icon").addClass("red-text");
|
||||
}else if(set=="limited"){
|
||||
$("#vis-icon i").text("group");
|
||||
$("#vis-icon").addClass("teal");
|
||||
$("#vis-icon").text("group");
|
||||
$("#vis-icon").addClass("teal-text");
|
||||
}
|
||||
var vis=localStorage.getItem("vis");
|
||||
if(vis=="memory"){
|
||||
|
@ -67,13 +63,11 @@ function cw(){
|
|||
if($("#cw").hasClass("cw-avail")){
|
||||
$("#cw-text").val();
|
||||
$("#cw-text").hide();
|
||||
$("#cw").addClass("blue");
|
||||
$("#cw").removeClass("yellow");
|
||||
$("#cw").removeClass("yellow-text");
|
||||
$("#cw").removeClass("cw-avail");
|
||||
}else{
|
||||
$("#cw-text").show();
|
||||
$("#cw").removeClass("blue");
|
||||
$("#cw").addClass("yellow");
|
||||
$("#cw").addClass("yellow-text");
|
||||
$("#cw").addClass("cw-avail");
|
||||
var cwt=localStorage.getItem("cw-text");
|
||||
if(cwt){
|
||||
|
|
|
@ -365,3 +365,22 @@ function staEx(mode){
|
|||
});
|
||||
return;
|
||||
}
|
||||
function toggleAction(id,tlid,acct_id){
|
||||
if(tlid=="notf"){
|
||||
var tlide="[data-notf="+acct_id+"]";
|
||||
}else{
|
||||
var tlide="[tlid="+tlid+"]";
|
||||
}
|
||||
if(!$(tlide+" [toot-id="+id+"]").hasClass("ext-mode")){
|
||||
$(tlide+" [toot-id="+id+"] .type-a").hide();
|
||||
$(tlide+" [toot-id="+id+"] .type-b").show();
|
||||
$(tlide+" [toot-id="+id+"]").addClass("ext-mode")
|
||||
$(tlide+" [toot-id="+id+"] .act-icon").text("expand_less");
|
||||
}else{
|
||||
$(tlide+" [toot-id="+id+"] .type-b").hide();
|
||||
$(tlide+" [toot-id="+id+"] .type-a").show();
|
||||
$(tlide+" [toot-id="+id+"]").removeClass("ext-mode")
|
||||
$(tlide+" [toot-id="+id+"] .act-icon").text("expand_more");
|
||||
}
|
||||
|
||||
}
|
|
@ -172,3 +172,37 @@ function cardCheck(tlid) {
|
|||
$("#sta-card-" + tlid).css("color",'red');
|
||||
}
|
||||
}
|
||||
|
||||
function mov(id,tlid){
|
||||
if(tlid=="notf"){
|
||||
var tlide="[data-notf="+acct_id+"]";
|
||||
}else{
|
||||
var tlide="[tlid="+tlid+"]";
|
||||
}
|
||||
var mouseover=localStorage.getItem("mouseover");
|
||||
if(!mouseover){
|
||||
mouseover="";
|
||||
}else if(mouseover=="yes"){
|
||||
mouseover="hide";
|
||||
}else if(mouseover=="no"){
|
||||
mouseover="";
|
||||
}
|
||||
if(mouseover=="hide"){
|
||||
$(tlide+" [toot-id="+id+"] .area-actions").removeClass("hide")
|
||||
}
|
||||
}
|
||||
|
||||
function resetmv(){
|
||||
var mouseover=localStorage.getItem("mouseover");
|
||||
if(!mouseover){
|
||||
mouseover="";
|
||||
}else if(mouseover=="yes"){
|
||||
mouseover="hide";
|
||||
}else if(mouseover=="no"){
|
||||
mouseover="";
|
||||
}
|
||||
if(mouseover=="hide"){
|
||||
$(".area-actions").addClass("hide");
|
||||
}
|
||||
|
||||
}
|
|
@ -37,10 +37,12 @@ function details(id, acct_id, tlid) {
|
|||
replyTL(json.in_reply_to_id, acct_id);
|
||||
}
|
||||
context(id, acct_id);
|
||||
beforeToot(id, acct_id);
|
||||
userToot(id, acct_id, json.account.id);
|
||||
faved(id, acct_id);
|
||||
rted(id, acct_id);
|
||||
if(!$("#activator").hasClass("active")){
|
||||
$('#det-col').collapsible('open', 2);
|
||||
$('#det-col').collapsible('open', 1);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -63,7 +65,7 @@ function replyTL(id, acct_id) {
|
|||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
var templete = parse([json]);
|
||||
var templete = parse([json], '', acct_id);
|
||||
$("#toot-reply").prepend(templete);
|
||||
jQuery("time.timeago").timeago();
|
||||
if (json.in_reply_to_id) {
|
||||
|
@ -89,9 +91,9 @@ function context(id, acct_id) {
|
|||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
var templete = parse(json.descendants);
|
||||
var templete = parse(json.descendants, '', acct_id);
|
||||
$("#toot-after").html(templete);
|
||||
beforeToot(id, acct_id);
|
||||
|
||||
jQuery("time.timeago").timeago();
|
||||
});
|
||||
}
|
||||
|
@ -114,11 +116,33 @@ function beforeToot(id, acct_id) {
|
|||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
var templete = parse(json);
|
||||
var templete = parse(json, '', acct_id);
|
||||
$("#toot-before").html(templete);
|
||||
jQuery("time.timeago").timeago();
|
||||
});
|
||||
}
|
||||
//前のユーザーのトゥート
|
||||
function userToot(id, acct_id, user) {
|
||||
var domain = localStorage.getItem("domain_" + acct_id);
|
||||
var at = localStorage.getItem(domain + "_at");
|
||||
var start = "https://" + domain + "/api/v1/accounts/" + user + "/statuses?max_id=" + id;
|
||||
fetch(start, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + at
|
||||
},
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).catch(function(error) {
|
||||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
var templete = parse(json, '', acct_id);
|
||||
$("#user-before").html(templete);
|
||||
jQuery("time.timeago").timeago();
|
||||
});
|
||||
}
|
||||
|
||||
//ふぁぼ一覧
|
||||
function faved(id, acct_id) {
|
||||
|
|
|
@ -28,8 +28,8 @@ function notf(acct_id, tlid, sys) {
|
|||
Object.keys(json).forEach(function(key) {
|
||||
var obj = json[key];
|
||||
if(lastnotf==obj.id && key>0 && native=="yes"){
|
||||
var ct=key+1;
|
||||
if(key==14){
|
||||
var ct=key;
|
||||
if(key>14){
|
||||
ct="15+";
|
||||
}
|
||||
var electron = require("electron");
|
||||
|
@ -37,9 +37,9 @@ function notf(acct_id, tlid, sys) {
|
|||
ipc.send('native-notf', ['TheDesk:'+domain,ct+"件の新しい通知",localStorage.getItem("prof_"+acct_id)]);
|
||||
}
|
||||
if(obj.type!="follow"){
|
||||
templete = templete+parse([obj], 'notf', acct_id, tlid, -1);
|
||||
templete = templete+parse([obj], 'notf', acct_id, 'notf', -1);
|
||||
}else{
|
||||
templete = templete+userparse([obj.account], 'notf', acct_id, tlid, -1);
|
||||
templete = templete+userparse([obj.account], 'notf', acct_id, 'notf', -1);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -80,9 +80,9 @@ function notf(acct_id, tlid, sys) {
|
|||
var templete="";
|
||||
localStorage.setItem("lastnotf_" + acct_id,obj.id);
|
||||
if(obj.type!="follow"){
|
||||
templete = parse([obj], 'notf', acct_id, tlid, popup);
|
||||
templete = parse([obj], 'notf', acct_id, 'notf', popup);
|
||||
}else{
|
||||
templete = userparse([obj], 'notf', acct_id, tlid, popup);
|
||||
templete = userparse([obj], 'notf', acct_id, 'notf', popup);
|
||||
}
|
||||
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
|
||||
$("div[data-notf=" + acct_id +"]").prepend(templete);
|
||||
|
|
|
@ -1,6 +1,20 @@
|
|||
//オブジェクトパーサー(トゥート)
|
||||
function parse(obj, mix, acct_id, tlid, popup) {
|
||||
var templete = '';
|
||||
var actb = localStorage.getItem("action_btns");
|
||||
var actb='re,rt,fav,qt,del,pin';
|
||||
if(actb){
|
||||
var actb = actb.split(',');
|
||||
var disp={};
|
||||
for(var k=0;k<actb.length;k++){
|
||||
if(k<4){
|
||||
var tp="type-a";
|
||||
}else{
|
||||
var tp="type-b";
|
||||
}
|
||||
disp[actb[k]]=tp;
|
||||
}
|
||||
}
|
||||
var datetype = localStorage.getItem("datetype");
|
||||
var nsfwtype = localStorage.getItem("nsfw");
|
||||
var sent = localStorage.getItem("sentence");
|
||||
|
@ -83,12 +97,26 @@ function parse(obj, mix, acct_id, tlid, popup) {
|
|||
if(!wordmute){
|
||||
var wordmute=[];
|
||||
}
|
||||
//via通知
|
||||
var viashow=localStorage.getItem("viashow");
|
||||
if(!viashow){
|
||||
viashow="hide";
|
||||
}
|
||||
//認証なしTL
|
||||
if(mix=="noauth"){
|
||||
var noauth="hide";
|
||||
}else{
|
||||
var noauth="";
|
||||
}
|
||||
//マウスオーバーのみ
|
||||
var mouseover=localStorage.getItem("mouseover");
|
||||
if(!mouseover){
|
||||
mouseover="";
|
||||
}else if(mouseover=="yes"){
|
||||
mouseover="hide";
|
||||
}else if(mouseover=="no"){
|
||||
mouseover="";
|
||||
}
|
||||
var local = [];
|
||||
var times=[];
|
||||
Object.keys(obj).forEach(function(key) {
|
||||
|
@ -327,25 +355,27 @@ function parse(obj, mix, acct_id, tlid, popup) {
|
|||
var visen = toot.visibility;
|
||||
if (visen == "public") {
|
||||
var vis =
|
||||
'<i class="text-darken-3 material-icons gray sml vis-data pointer" title="公開(クリックして本文コピー)" data-vis="public" onclick="staCopy(\''+id+'\')">public</i>';
|
||||
'<i class="text-darken-3 material-icons gray sml vis-data pointer" title="公開(クリックして本文コピー)" data-vis="public" onclick="staCopy(\''+id+'\')" style="font-size:1rem;">public</i>';
|
||||
var can_rt = "";
|
||||
} else if (visen == "unlisted") {
|
||||
var vis =
|
||||
'<i class="text-darken-3 material-icons blue-text vis-data pointer" title="未収載(クリックして本文コピー)" data-vis="unlisted" onclick="staCopy(\''+id+'\')">lock_open</i>';
|
||||
'<i class="text-darken-3 material-icons blue-text vis-data pointer" title="未収載(クリックして本文コピー)" data-vis="unlisted" onclick="staCopy(\''+id+'\')" style="font-size:1rem;">lock_open</i>';
|
||||
var can_rt = "";
|
||||
} else if (visen == "private") {
|
||||
var vis =
|
||||
'<i class="text-darken-3 material-icons orange-text vis-data pointer" title="非公開(クリックして本文コピー)" data-vis="private" onclick="staCopy(\''+id+'\')">lock</i>';
|
||||
'<i class="text-darken-3 material-icons orange-text vis-data pointer" title="非公開(クリックして本文コピー)" data-vis="private" onclick="staCopy(\''+id+'\')" style="font-size:1rem;">lock</i>';
|
||||
var can_rt = "hide";
|
||||
} else if (visen == "direct") {
|
||||
var vis =
|
||||
'<i class="text-darken-3 material-icons red-text vis-data pointer" title="ダイレクト(クリックして本文コピー)" data-vis="direct" onclick="staCopy(\''+id+'\')">mail</i>';
|
||||
'<i class="text-darken-3 material-icons red-text vis-data pointer" title="ダイレクト(クリックして本文コピー)" data-vis="direct" onclick="staCopy(\''+id+'\')" style="font-size:1rem;">mail</i>';
|
||||
var can_rt = "hide";
|
||||
}
|
||||
if (toot.account.acct == localStorage.getItem("user_" + acct_id)) {
|
||||
var if_mine = "";
|
||||
var mine_via="type-b";
|
||||
} else {
|
||||
var if_mine = "hide";
|
||||
var mine_via="";
|
||||
}
|
||||
if (toot.favourited) {
|
||||
var if_fav = " yellow-text";
|
||||
|
@ -407,7 +437,7 @@ function parse(obj, mix, acct_id, tlid, popup) {
|
|||
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' +
|
||||
boostback + ' ' + fav_app + ' ' + rt_app + ' ' + pin_app +
|
||||
' ' + hasmedia + '" toot-id="' + id + '" unixtime="' + date(obj[
|
||||
key].created_at, 'unix') + '" '+if_notf+'>' +
|
||||
key].created_at, 'unix') + '" '+if_notf+' onmouseover="mov(\'' + toot.id + '\',\''+tlid+'\')" onmouseout="resetmv()">' +
|
||||
'<div class="area-notice"><span class="gray sharesta">' + notice + home +
|
||||
'</span></div>' +
|
||||
'<div class="area-icon"><a onclick="udg(\'' + toot.account.id +
|
||||
|
@ -422,7 +452,8 @@ function parse(obj, mix, acct_id, tlid, popup) {
|
|||
'<div class="area-acct"><div><span class="cbadge pointer waves-effect" onclick="tootUriCopy(\'' +
|
||||
toot.url + '\');" title="' + date(toot.created_at, 'absolute') +
|
||||
'(クリックでトゥートURLをコピー)"><i class="fa fa-clock-o"></i>' +
|
||||
date(toot.created_at, datetype) + '</span></div></div>' +
|
||||
date(toot.created_at, datetype) + '</span><span style="padding:0;">' +
|
||||
vis + '</span></div></div>' +
|
||||
'<div class="area-toot"><span class="toot ' + spoiler + '">' + content +
|
||||
'</span><span class="' +
|
||||
api_spoil + ' cw_text_' + toot.id + '">' + spoil + spoiler_show +
|
||||
|
@ -431,38 +462,38 @@ function parse(obj, mix, acct_id, tlid, popup) {
|
|||
'</div><div class="area-additional"><span class="additional">' + analyze +
|
||||
'</span>' +
|
||||
'' + mentions + tags + '</div>' +
|
||||
'<div class="area-actions '+noauth+'" style="padding:0; margin:0; top:-20px; display:flex; justify-content:space-around; max-width:100%; ">' +
|
||||
'<div class="action"><span style="padding:0">' +
|
||||
vis + '</span></div><div class="action"><a onclick="re(\'' + toot.id +
|
||||
'<div class="area-vis"></div>'+
|
||||
'<div class="area-actions '+noauth+' '+mouseover+'" style="padding:0; margin:0; top:-20px; display:flex; justify-content:space-around; max-width:100%; ">' +
|
||||
'<div class="action '+disp["re"]+'"><a onclick="re(\'' + toot.id +
|
||||
'\',\'' + toot.account.acct + '\',' +
|
||||
acct_id + ',\''+visen+
|
||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートに返信"><i class="fa fa-share"></i></a></div>' +
|
||||
'<div class="action '+can_rt+'"><a onclick="rt(\'' + toot.id + '\',' + acct_id +
|
||||
'<div class="action '+can_rt+' '+disp["rt"]+'"><a onclick="rt(\'' + toot.id + '\',' + acct_id +
|
||||
',\'' + tlid +
|
||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートをブースト"><i class="text-darken-3 fa fa-retweet ' +
|
||||
if_rt + ' rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
|
||||
'</span></a></div>' +
|
||||
'<div class="action '+can_rt+'"><a onclick="qt(\'' + toot.id + '\',' + acct_id +
|
||||
'<div class="action '+can_rt+' '+disp["qt"]+'"><a onclick="qt(\'' + toot.id + '\',' + acct_id +
|
||||
',\'' + toot.account.acct +'\',\''+toot.url+
|
||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートを引用"><i class="text-darken-3 fa fa-quote-right"></i></a></div>' +
|
||||
'<div class="action"><a onclick="fav(\'' + toot.id + '\',' + acct_id +
|
||||
'<div class="action '+disp["fav"]+'"><a onclick="fav(\'' + toot.id + '\',' + acct_id +
|
||||
',\'' + tlid +
|
||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートをお気に入り登録"><i class="fa text-darken-3 fa-star' +
|
||||
if_fav + ' fav_' + toot.id + '"></i><span class="fav_ct">' + toot.favourites_count +
|
||||
'</a></span></div>' +
|
||||
'<div class="' + if_mine + ' action"><a onclick="del(\'' + toot.id + '\',' +
|
||||
'<div class="' + if_mine + ' action '+disp["del"]+'"><a onclick="del(\'' + toot.id + '\',' +
|
||||
acct_id +
|
||||
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートを削除"><i class="fa fa-trash-o"></i></a></div>' +
|
||||
'<div class="' + if_mine + ' action pin"><a onclick="pin(\'' + toot.id + '\',' +
|
||||
'<div class="' + if_mine + ' action pin '+disp["pin"]+'"><a onclick="pin(\'' + toot.id + '\',' +
|
||||
acct_id +
|
||||
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートをピン留め"><i class="fa fa-map-pin pin_' + toot.id + ' '+if_pin+'"></i></a></div>' +trans+
|
||||
'<div class="action ' + if_mine + '"><a onclick="toggleAction(\'' + toot.id + '\',\''+tlid+'\',\''+acct_id+'\')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="text-darken-3 material-icons act-icon">expand_more</i></a></div>' +
|
||||
'<div class="action"><a onclick="details(\'' + toot.id + '\',' + acct_id +
|
||||
','+tlid+')" class="waves-effect waves-dark btn-flat details" style="padding:0"><i class="text-darken-3 material-icons">more_vert</i></a></div>' +
|
||||
'</div><div class="area-date_via">' +
|
||||
'<div><span class="cbadge waves-effect" onclick="client(\''+$.strip_tags(via)+'\')" title="via ' + $.strip_tags(via) + '">via ' +
|
||||
',\''+tlid+'\')" class="waves-effect waves-dark btn-flat details" style="padding:0"><i class="text-darken-3 material-icons">more_vert</i></a></div>' +
|
||||
'<span class="cbadge waves-effect '+viashow+' '+mine_via+'" onclick="client(\''+$.strip_tags(via)+'\')" title="via ' + $.strip_tags(via) + '">via ' +
|
||||
via +
|
||||
'</span></div></div></div>' +
|
||||
'</div>' + divider;
|
||||
'</span></div></div>' +
|
||||
'</div></div>' + divider;
|
||||
});
|
||||
if (mix == "mix") {
|
||||
return [templete, local, times]
|
||||
|
|
|
@ -131,6 +131,9 @@ function reload(type, cc, acct_id, tlid, data) {
|
|||
} else if (type=="list"){
|
||||
var start = "wss://" + domain +
|
||||
"/api/v1/streaming/?stream=list&list=" + data +"&access_token=" + at;
|
||||
} else if (type=="dm"){
|
||||
var start = "wss://" + domain +
|
||||
"/api/v1/streaming/?stream=direct&access_token=" + at;
|
||||
}
|
||||
console.log(start);
|
||||
var wsid = websocket.length;
|
||||
|
@ -321,6 +324,8 @@ function cap(type, data, acct_id) {
|
|||
}
|
||||
} else if (type == "noauth") {
|
||||
var response= "Glance TL"
|
||||
} else if (type == "dm") {
|
||||
var response= "DM"
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
@ -335,9 +340,10 @@ function com(type, data) {
|
|||
return "public?"
|
||||
} else if (type == "tag") {
|
||||
return "tag/" + data + "?"
|
||||
}
|
||||
if (type == "list") {
|
||||
}else if (type == "list") {
|
||||
return "list/" + data + "?"
|
||||
}else if (type="dm") {
|
||||
return "direct?"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,8 +359,9 @@ function icon(type) {
|
|||
return "search"
|
||||
} else if (type == "list") {
|
||||
return "view_headline"
|
||||
}
|
||||
if (type == "list") {
|
||||
}else if (type == "list") {
|
||||
return "subject"
|
||||
}else if (type == "dm") {
|
||||
return "mail"
|
||||
}
|
||||
}
|
|
@ -170,6 +170,7 @@ function addColumn() {
|
|||
}
|
||||
function addselCk(){
|
||||
var acct = $("#add-acct-sel").val();
|
||||
var domain=localStorage.getItem("domain_" + acct);
|
||||
if(acct=="noauth"){
|
||||
$("#auth").addClass("hide");
|
||||
$("#noauth").removeClass("hide");
|
||||
|
@ -177,6 +178,13 @@ function addselCk(){
|
|||
$("#auth").removeClass("hide");
|
||||
$("#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').material_select('update');
|
||||
}else{
|
||||
$("#direct-add").remove();
|
||||
$('#type-sel').material_select('update');
|
||||
}
|
||||
}
|
||||
//カラム削除
|
||||
function removeColumn(tlid) {
|
||||
|
|
|
@ -3,7 +3,7 @@ function pip(id){
|
|||
$("#pip").removeClass("hide");
|
||||
}
|
||||
function endPip(){
|
||||
$("#pip-content").html();
|
||||
$("#pip-content").html("");
|
||||
$("#pip").addClass("hide");
|
||||
}
|
||||
|
||||
|
|
|
@ -35,3 +35,22 @@ function Rinput(){
|
|||
var url=$("#radio-url").val();
|
||||
Rplay(url,url)
|
||||
}
|
||||
/*
|
||||
<span id="radio-sta" class="radio"></span>
|
||||
<div id="radio-view" class="hide radio mize">
|
||||
<a onclick="nowplaying('spotify')" class="pointer" title="Ctrl+Shift+N"><i class="fa fa-spotify"></i>NowPlaying</a>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('https://listen.moe/stream','Listen.moe')" data-name="Listen.moe">Listen.moe</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://itori.animenfo.com:443/;','AnimeNfo Radio')" data-name="AnimeNfo Radio">AnimeNfo Radio</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://hyades.shoutca.st:8043/stream','LoFi hip hop Radio')" data-name="LoFi hip hop Radio">LoFi hip hop Radio</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://89.16.185.174:8004/stream','Linn Classical')" data-name="Linn Classical">Linn Classical</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://89.16.185.174:8000/stream','Linn Jazz')" data-name="Linn Jazz">Linn Jazz</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://edge-ads-01-cr.sharp-stream.com/jazzfmmobile.aac','Jazz FM')" data-name="Jazz FM">Jazz FM</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Rplay('http://91.121.59.45:10024/stream','canal-jazz.eu')" data-name="canal-jazz.eu">canal-jazz.eu</span>
|
||||
<span class="cbadge pointer waves-effect" onclick="Ryourself()">Others</span>
|
||||
</div>
|
||||
<div id="radio-input" class="hide radio mize">
|
||||
<input type="url" id="radio-url" placeholder="URL" style="width:100px">
|
||||
<button class="btn waves-effect" onclick="Rinput()">Play</button>
|
||||
<button class="btn waves-effect" onclick="Rselect()">Presets</button>
|
||||
</div>
|
||||
*/
|
|
@ -126,6 +126,21 @@ function settings() {
|
|||
Materialize.toast("引用形式を" + qtt + "に設定しました。", 3000);
|
||||
}
|
||||
localStorage.setItem("quote", qtd);
|
||||
|
||||
var viad = $("[name=via]:checked").val();
|
||||
var viat = $("[for=via_"+viad+"]").text();
|
||||
if (viad != localStorage.getItem("viashow")) {
|
||||
Materialize.toast("via表示を" + viat + "に設定しました。", 3000);
|
||||
}
|
||||
localStorage.setItem("viashow", viad);
|
||||
|
||||
var movd = $("[name=mov]:checked").val();
|
||||
var movt = $("[for=mov_"+movd+"]").text();
|
||||
if (movd != localStorage.getItem("mouseover")) {
|
||||
Materialize.toast("マウスオーバー・ヒディングを" + movt + "に設定しました。", 3000);
|
||||
}
|
||||
localStorage.setItem("mouseover", movd);
|
||||
|
||||
}
|
||||
|
||||
//読み込み時の設定ロード
|
||||
|
@ -247,6 +262,18 @@ function load() {
|
|||
var qt = "simple";
|
||||
}
|
||||
$("#q_" + qt).prop("checked", true);
|
||||
|
||||
var viat = localStorage.getItem("viashow");
|
||||
if (!viat) {
|
||||
var viat = "hide";
|
||||
}
|
||||
$("#via_" + viat).prop("checked", true);
|
||||
|
||||
var movt = localStorage.getItem("mouseover");
|
||||
if (!movt) {
|
||||
var movt = "no";
|
||||
}
|
||||
$("#mov_" + movt).prop("checked", true);
|
||||
}
|
||||
//最初に読む
|
||||
load();
|
||||
|
|
|
@ -97,17 +97,21 @@ function udg(user, acct_id) {
|
|||
$("#his-follower").text(json.followers_count);
|
||||
$("#his-since").text(crat(json.created_at));
|
||||
if(json.fields){
|
||||
var note=json.note+'My Fields<br><table class="responsive-table">'
|
||||
if(json.fields.length>0){
|
||||
var note=json.note+'My Fields<br><table style="vertical-align: baseline; text-align:center; padding:0;">'
|
||||
for(var i=0;i<json.fields.length;i++){
|
||||
var fname=json.fields[i].name;
|
||||
var fval=json.fields[i].value;
|
||||
note=note+'<tr><td>'+fname+'</td><td>'+fval+'</td></tr>';
|
||||
note=note+'<tr style="height:1.5rem; padding:0;"><td style="height:1.5rem; padding:0; background-color:#757575; text-align:center; ">'+fname+'</td><td style="height:1.5rem; padding:0; padding-left:5px;">'+fval+'</td></tr>';
|
||||
}
|
||||
note=note+'</table>'
|
||||
$("#his-des").html(note);
|
||||
}else{
|
||||
$("#his-des").html(json.note);
|
||||
}
|
||||
}else{
|
||||
$("#his-des").html(json.note);
|
||||
}
|
||||
$('#his-data').css('background-size', 'cover');
|
||||
localStorage.setItem("history" , user);
|
||||
//自分の時
|
||||
|
|
28
app/main.js
28
app/main.js
|
@ -26,7 +26,6 @@ const BrowserWindow = electron.BrowserWindow;
|
|||
const {
|
||||
download
|
||||
} = require('electron-dl');
|
||||
const openAboutWindow = require('about-window').default;
|
||||
const join = require('path').join;
|
||||
// メインウィンドウはGCされないようにグローバル宣言
|
||||
let mainWindow;
|
||||
|
@ -395,6 +394,33 @@ ipc.on('nano', function (e, x, y) {
|
|||
window.setPosition(0, 0);
|
||||
return "true"
|
||||
})
|
||||
ipc.on('adobe', (e, arg) => {
|
||||
if(!arg){
|
||||
const options = {
|
||||
type: 'info',
|
||||
title: 'Adobeフォトエディタ',
|
||||
message: "「許可」または「永続的に許可」をクリックするとTheDeskとAdobeで情報を共有します。",
|
||||
buttons: ['拒否', '許可','永続的に許可']
|
||||
}
|
||||
dialog.showMessageBox(options, function(index) {
|
||||
if(index==2){
|
||||
mainWindow.webContents.send('adobeagree', "true");
|
||||
}
|
||||
if(index>0){
|
||||
adobeWindow();
|
||||
}
|
||||
})
|
||||
}else{
|
||||
adobeWindow();
|
||||
}
|
||||
});
|
||||
function adobeWindow(){
|
||||
var window = new BrowserWindow({
|
||||
width: 1000,
|
||||
height: 750
|
||||
});
|
||||
window.loadURL('file://' + __dirname + '/adobe.html');
|
||||
}
|
||||
|
||||
|
||||
app.setAsDefaultProtocolClient('thedesk')
|
5
app/node_modules/about-window/.npmignore
generated
vendored
5
app/node_modules/about-window/.npmignore
generated
vendored
|
@ -1,5 +0,0 @@
|
|||
/typings
|
||||
/.git
|
||||
/example
|
||||
npm-debug.log
|
||||
node_modules
|
3
app/node_modules/about-window/.stylelintrc.json
generated
vendored
3
app/node_modules/about-window/.stylelintrc.json
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"extends": "stylelint-config-standard"
|
||||
}
|
19
app/node_modules/about-window/LICENSE.txt
generated
vendored
19
app/node_modules/about-window/LICENSE.txt
generated
vendored
|
@ -1,19 +0,0 @@
|
|||
Copyright (c) 2015 rhysd
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
|
||||
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
100
app/node_modules/about-window/README.md
generated
vendored
100
app/node_modules/about-window/README.md
generated
vendored
|
@ -1,100 +0,0 @@
|
|||
'About This App' Window for [Electron](https://github.com/atom/electron) Apps
|
||||
=============================================================================
|
||||
[![npm version](https://badge.fury.io/js/about-window.svg)](https://www.npmjs.com/package/about-window)
|
||||
|
||||
[This package](https://www.npmjs.com/package/about-window) provides 'About This App' window for [Electron](https://github.com/atom/electron) applications.
|
||||
|
||||
- [x] Create 'About This App' window from given parameters
|
||||
- [x] Icon path
|
||||
- [x] Copy right
|
||||
- [x] App name and Versions
|
||||
- [x] Description
|
||||
- [x] Gather package information from package.json
|
||||
- [x] Automatically detect package.json
|
||||
- [x] Adjust window size to its contents automatically
|
||||
- [x] CSS customizability
|
||||
|
||||
You can install this module via [npm](https://www.npmjs.com/).
|
||||
|
||||
```sh
|
||||
$ npm install about-window
|
||||
```
|
||||
|
||||
Only one function is exported as default. Please see [TypeScript type definition](index.d.ts).
|
||||
The function can be called from both main process and renderer process.
|
||||
|
||||
```typescript
|
||||
export default function openAboutWindow(info: {
|
||||
icon_path: string;
|
||||
package_json_dir?: string;
|
||||
bug_report_url?: string;
|
||||
copyright?: string;
|
||||
homepage?: string;
|
||||
description?: string;
|
||||
license?: string;
|
||||
css_path?: string;
|
||||
adjust_window_size?: boolean;
|
||||
win_options?: BrowserWindowOptions;
|
||||
}): BrowserWindow
|
||||
```
|
||||
|
||||
Only `icon_path` property is required, others are optional.
|
||||
I recommend to specify as below to extract information from package.json as much as possible.
|
||||
Path to package.json is also automatically detected if possible.
|
||||
|
||||
```typescript
|
||||
openAboutWindow({
|
||||
icon_path: 'path/to/icon.png'
|
||||
});
|
||||
```
|
||||
|
||||
You can check [an example app](example) to know how to use this package.
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/rhysd/about-window.git
|
||||
$ cd about-window/example
|
||||
$ npm install
|
||||
$ npm start
|
||||
|
||||
# Or for debug
|
||||
$ npm run debug
|
||||
```
|
||||
|
||||
### Parameter's properties of `openAboutWindow()`
|
||||
|
||||
| Name | Description | Type |
|
||||
|------|-------------|------|
|
||||
| `icon_path` | Path to icon file of the application. The path is passed to `src` property of `<img>` element. **Required** | string |
|
||||
| `package_json_dir` | Path to directory which contains package.json. If not specified, it will try to detect a path to package.json. If also failed, it gives up and show less information in 'About This App' window. **Optional** | string |
|
||||
| `bug_report_url` | URL to bug report page. If not specified, 'bugs' entry in package.json is used. **Optional** | string |
|
||||
| `copyright` | Copyright notice shown in window. If not specified, it is replaced with license description generated by 'license' entry of package.json. **Optional** | string |
|
||||
| `homepage` | URL of application's web page. If not specified, 'homepage' entry of package.json is used instead. **Optional** | string |
|
||||
| `description` | Description of the application. If not specified, 'description' entry of package.json is used instead. **Optional** | string |
|
||||
| `license` | License of the application. If not specified, 'license' entry of package.json is used instead. This property is used when `copyright` is not specified. **Optional** | string |
|
||||
| `win_options` | Options of 'About This App' window. It is merged into default options. **Optional** | [BrowserWindow options object](https://github.com/atom/electron/blob/master/docs/api/browser-window.md#new-browserwindowoptions) |
|
||||
| `css_path` | Path to user-defined CSS file. It will be inserted to DOM of the window. **Optional** | string |
|
||||
| `adjust_window_size` | Adjust the window size to its content not to show scroll bar. **Optional** | boolean |
|
||||
| `open_devtools` | For debug purpose, Chrome DevTools will start when the window is opened **Optional** | boolean |
|
||||
| `use_inner_html` | If `true`, set the value with `.innerHTML` on copyright, license and description Default is `false` **Optional** | boolean |
|
||||
|
||||
**Note:** If you set `use_inner_html` to `true`, please ensure that contents don't contain any untrusted external input
|
||||
in order to avoid XSS. Be careful.
|
||||
|
||||
## Screen Shots
|
||||
|
||||
### Linux
|
||||
|
||||
![Linux screenshot](https://raw.githubusercontent.com/rhysd/ss/master/about-window/about-window-linux.png)
|
||||
|
||||
### OS X
|
||||
|
||||
![OS X screenshot](https://raw.githubusercontent.com/rhysd/ss/master/about-window/about-window-os-x.png)
|
||||
|
||||
### Windows
|
||||
|
||||
![Windows screenshot](https://raw.githubusercontent.com/rhysd/ss/master/about-window/about-window-windows.jpg)
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](/LICENSE.txt).
|
||||
|
27
app/node_modules/about-window/about.html
generated
vendored
27
app/node_modules/about-window/about.html
generated
vendored
|
@ -1,27 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
<title>About This App</title>
|
||||
<link rel="stylesheet" href="./styles/ui.css">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="logo">
|
||||
<img id="app-icon" alt="App icon" height="200">
|
||||
</div>
|
||||
<h2 class="title"></h2>
|
||||
<span class="description"></span>
|
||||
<div class="copyright"></div>
|
||||
<table class="versions"></table>
|
||||
<footer class="footer">
|
||||
<div class="link bug-report-link"></div>
|
||||
</footer>
|
||||
|
||||
<!-- https://github.com/electron/electron/issues/2863 -->
|
||||
<script>var exports = exports || {};</script>
|
||||
|
||||
<script src="./src/renderer.js"></script>
|
||||
</body>
|
||||
</html>
|
18
app/node_modules/about-window/index.d.ts
generated
vendored
18
app/node_modules/about-window/index.d.ts
generated
vendored
|
@ -1,18 +0,0 @@
|
|||
/// <reference types="electron" />
|
||||
|
||||
export interface AboutWindowInfo {
|
||||
icon_path: string;
|
||||
package_json_dir?: string;
|
||||
bug_report_url?: string;
|
||||
copyright?: string;
|
||||
homepage?: string;
|
||||
description?: string;
|
||||
license?: string;
|
||||
win_options?: Electron.BrowserWindowConstructorOptions;
|
||||
css_path?: string;
|
||||
adjust_window_size?: boolean;
|
||||
open_devtools?: boolean;
|
||||
use_inner_html?: boolean;
|
||||
}
|
||||
|
||||
export default function openAboutWindow(into: AboutWindowInfo): Electron.BrowserWindow;
|
105
app/node_modules/about-window/package.json
generated
vendored
105
app/node_modules/about-window/package.json
generated
vendored
|
@ -1,105 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "about-window",
|
||||
"scope": null,
|
||||
"escapedName": "about-window",
|
||||
"name": "about-window",
|
||||
"rawSpec": "",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk"
|
||||
]
|
||||
],
|
||||
"_from": "about-window@latest",
|
||||
"_id": "about-window@1.8.0",
|
||||
"_inCache": true,
|
||||
"_location": "/about-window",
|
||||
"_nodeVersion": "6.10.3",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/about-window-1.8.0.tgz_1506494385445_0.4268775100354105"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "rhysd",
|
||||
"email": "lin90162@yahoo.co.jp"
|
||||
},
|
||||
"_npmVersion": "3.10.10",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "about-window",
|
||||
"scope": null,
|
||||
"escapedName": "about-window",
|
||||
"name": "about-window",
|
||||
"rawSpec": "",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/about-window/-/about-window-1.8.0.tgz",
|
||||
"_shasum": "3e183cfaef4342e1fea6c442f4e43f682e9da580",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "about-window",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk",
|
||||
"author": {
|
||||
"name": "rhysd",
|
||||
"email": "lin90162@yahoo.co.jp"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/rhysd/electron-about-window/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "'About App' window for Electron application",
|
||||
"devDependencies": {
|
||||
"@types/node": "^8.0.24",
|
||||
"electron": "^1.7.5",
|
||||
"stylelint": "^8.0.0",
|
||||
"stylelint-config-standard": "^17.0.0",
|
||||
"tslint": "^5.6.0",
|
||||
"typescript": "^2.4.2"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "3e183cfaef4342e1fea6c442f4e43f682e9da580",
|
||||
"tarball": "https://registry.npmjs.org/about-window/-/about-window-1.8.0.tgz"
|
||||
},
|
||||
"gitHead": "c2dac96372fcde38f2f842c00a34f024d0bdf4c1",
|
||||
"homepage": "https://github.com/rhysd/electron-about-window#readme",
|
||||
"keywords": [
|
||||
"Electron",
|
||||
"electron-component",
|
||||
"about",
|
||||
"window"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "src/index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "rhysd",
|
||||
"email": "lin90162@yahoo.co.jp"
|
||||
}
|
||||
],
|
||||
"name": "about-window",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/rhysd/electron-about-window.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p src/",
|
||||
"debug": "electron ./example",
|
||||
"dep": "npm install",
|
||||
"example": "NODE_ENV=production electron ./example",
|
||||
"lint": "npm run tslint && npm run stylelint",
|
||||
"preversion": "npm run lint && npm run build",
|
||||
"start": "npm run dep && npm run build && npm run example",
|
||||
"stylelint": "stylelint styles/*.css",
|
||||
"tslint": "tslint -p ./src --type-check"
|
||||
},
|
||||
"version": "1.8.0"
|
||||
}
|
115
app/node_modules/about-window/src/index.js
generated
vendored
115
app/node_modules/about-window/src/index.js
generated
vendored
|
@ -1,115 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const electron_1 = require("electron");
|
||||
const fs_1 = require("fs");
|
||||
const path = require("path");
|
||||
let window = null;
|
||||
function loadPackageJson(pkg_path) {
|
||||
try {
|
||||
return require(pkg_path);
|
||||
}
|
||||
catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
function detectPackageJson(specified_dir) {
|
||||
if (specified_dir) {
|
||||
const pkg = loadPackageJson(path.join(specified_dir, 'package.json'));
|
||||
if (pkg !== null) {
|
||||
return pkg;
|
||||
}
|
||||
else {
|
||||
console.warn('about-window: package.json is not found in specified directory path: ' + specified_dir);
|
||||
}
|
||||
}
|
||||
const app_name = electron_1.app.getName();
|
||||
for (const mod_path of module.paths) {
|
||||
if (!path.isAbsolute(mod_path)) {
|
||||
continue;
|
||||
}
|
||||
const p = path.join(mod_path, '..', 'package.json');
|
||||
try {
|
||||
const stats = fs_1.statSync(p);
|
||||
if (stats.isFile()) {
|
||||
const pkg = loadPackageJson(p);
|
||||
if (pkg !== null && pkg.productName === app_name) {
|
||||
return pkg;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function injectInfoFromPackageJson(info) {
|
||||
const pkg = detectPackageJson(info.package_json_dir);
|
||||
if (pkg === null) {
|
||||
return info;
|
||||
}
|
||||
if (!info.description) {
|
||||
info.description = pkg.description;
|
||||
}
|
||||
if (!info.license && pkg.license) {
|
||||
const l = pkg.license;
|
||||
info.license = typeof l === 'string' ? l : l.type;
|
||||
}
|
||||
if (!info.homepage) {
|
||||
info.homepage = pkg.homepage;
|
||||
}
|
||||
if (!info.bug_report_url && typeof (pkg.bugs) === 'object') {
|
||||
info.bug_report_url = pkg.bugs.url;
|
||||
}
|
||||
if (info.use_inner_html === undefined) {
|
||||
info.use_inner_html = false;
|
||||
}
|
||||
return info;
|
||||
}
|
||||
function openAboutWindow(info) {
|
||||
if (window !== null) {
|
||||
window.focus();
|
||||
return window;
|
||||
}
|
||||
const index_html = 'file://' + path.join(__dirname, '..', 'about.html');
|
||||
const options = Object.assign({
|
||||
width: 400,
|
||||
height: 400,
|
||||
useContentSize: true,
|
||||
titleBarStyle: 'hidden-inset',
|
||||
show: !info.adjust_window_size,
|
||||
icon: info.icon_path,
|
||||
}, info.win_options || {});
|
||||
window = new (electron_1.BrowserWindow || electron_1.remote.BrowserWindow)(options);
|
||||
window.once('closed', () => {
|
||||
window = null;
|
||||
});
|
||||
window.loadURL(index_html);
|
||||
window.webContents.on('will-navigate', (e, url) => {
|
||||
e.preventDefault();
|
||||
electron_1.shell.openExternal(url);
|
||||
});
|
||||
window.webContents.on('new-window', (e, url) => {
|
||||
e.preventDefault();
|
||||
electron_1.shell.openExternal(url);
|
||||
});
|
||||
window.webContents.once('dom-ready', () => {
|
||||
delete info.win_options;
|
||||
window.webContents.send('about-window:info', info);
|
||||
if (info.open_devtools) {
|
||||
if (process.versions.electron >= '1.4') {
|
||||
window.webContents.openDevTools({ mode: 'detach' });
|
||||
}
|
||||
else {
|
||||
window.webContents.openDevTools();
|
||||
}
|
||||
}
|
||||
});
|
||||
window.once('ready-to-show', () => {
|
||||
window.show();
|
||||
});
|
||||
window.setMenu(null);
|
||||
info = injectInfoFromPackageJson(info);
|
||||
return window;
|
||||
}
|
||||
exports.default = openAboutWindow;
|
||||
//# sourceMappingURL=index.js.map
|
1
app/node_modules/about-window/src/index.js.map
generated
vendored
1
app/node_modules/about-window/src/index.js.map
generated
vendored
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"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"}
|
134
app/node_modules/about-window/src/index.ts
generated
vendored
134
app/node_modules/about-window/src/index.ts
generated
vendored
|
@ -1,134 +0,0 @@
|
|||
import {app, BrowserWindow, remote, shell} from 'electron';
|
||||
import {statSync} from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
let window: Electron.BrowserWindow = null;
|
||||
|
||||
function loadPackageJson(pkg_path: string): PackageJson {
|
||||
try {
|
||||
return require(pkg_path);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function detectPackageJson(specified_dir: string) {
|
||||
if (specified_dir) {
|
||||
const pkg = loadPackageJson(path.join(specified_dir, 'package.json'));
|
||||
if (pkg !== null) {
|
||||
return pkg;
|
||||
} else {
|
||||
console.warn('about-window: package.json is not found in specified directory path: ' + specified_dir);
|
||||
}
|
||||
}
|
||||
|
||||
const app_name = app.getName();
|
||||
|
||||
for (const mod_path of (module as any).paths) {
|
||||
if (!path.isAbsolute(mod_path)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const p = path.join(mod_path, '..', 'package.json');
|
||||
try {
|
||||
const stats = statSync(p);
|
||||
if (stats.isFile()) {
|
||||
const pkg = loadPackageJson(p);
|
||||
if (pkg !== null && pkg.productName === app_name) {
|
||||
return pkg;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// File not found. Ignored.
|
||||
}
|
||||
}
|
||||
|
||||
// Note: Not found.
|
||||
return null;
|
||||
}
|
||||
|
||||
function injectInfoFromPackageJson(info: AboutWindowInfo) {
|
||||
const pkg = detectPackageJson(info.package_json_dir);
|
||||
if (pkg === null) {
|
||||
// Note: Give up.
|
||||
return info;
|
||||
}
|
||||
|
||||
if (!info.description) {
|
||||
info.description = pkg.description;
|
||||
}
|
||||
if (!info.license && pkg.license) {
|
||||
const l = pkg.license;
|
||||
info.license = typeof l === 'string' ? l : l.type;
|
||||
}
|
||||
if (!info.homepage) {
|
||||
info.homepage = pkg.homepage;
|
||||
}
|
||||
if (!info.bug_report_url && typeof (pkg.bugs) === 'object') {
|
||||
info.bug_report_url = pkg.bugs.url;
|
||||
}
|
||||
if (info.use_inner_html === undefined) {
|
||||
info.use_inner_html = false;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
export default function openAboutWindow(info: AboutWindowInfo) {
|
||||
if (window !== null) {
|
||||
window.focus();
|
||||
return window;
|
||||
}
|
||||
|
||||
const index_html = 'file://' + path.join(__dirname, '..', 'about.html');
|
||||
|
||||
const options = Object.assign(
|
||||
{
|
||||
width: 400,
|
||||
height: 400,
|
||||
useContentSize: true,
|
||||
titleBarStyle: 'hidden-inset',
|
||||
show: !info.adjust_window_size,
|
||||
icon: info.icon_path,
|
||||
},
|
||||
info.win_options || {},
|
||||
);
|
||||
|
||||
window = new (BrowserWindow || remote.BrowserWindow)(options);
|
||||
|
||||
window.once('closed', () => {
|
||||
window = null;
|
||||
});
|
||||
window.loadURL(index_html);
|
||||
|
||||
window.webContents.on('will-navigate', (e, url) => {
|
||||
e.preventDefault();
|
||||
shell.openExternal(url);
|
||||
});
|
||||
window.webContents.on('new-window', (e, url) => {
|
||||
e.preventDefault();
|
||||
shell.openExternal(url);
|
||||
});
|
||||
|
||||
window.webContents.once('dom-ready', () => {
|
||||
delete info.win_options;
|
||||
window.webContents.send('about-window:info', info);
|
||||
if (info.open_devtools) {
|
||||
if (process.versions.electron >= '1.4') {
|
||||
window.webContents.openDevTools({mode: 'detach'});
|
||||
} else {
|
||||
window.webContents.openDevTools();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
window.once('ready-to-show', () => {
|
||||
window.show();
|
||||
});
|
||||
|
||||
window.setMenu(null);
|
||||
|
||||
info = injectInfoFromPackageJson(info);
|
||||
|
||||
return window;
|
||||
}
|
37
app/node_modules/about-window/src/lib.d.ts
generated
vendored
37
app/node_modules/about-window/src/lib.d.ts
generated
vendored
|
@ -1,37 +0,0 @@
|
|||
/// <reference types="electron" />
|
||||
|
||||
interface LicenseEntry {
|
||||
type: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
interface PackageJson {
|
||||
productName?: string;
|
||||
description?: string;
|
||||
homepage?: string;
|
||||
license?: string | LicenseEntry;
|
||||
bugs?: {
|
||||
url: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface AboutWindowInfo {
|
||||
icon_path: string;
|
||||
copyright?: string;
|
||||
homepage?: string;
|
||||
description?: string;
|
||||
package_json_dir?: string;
|
||||
license?: string;
|
||||
bug_report_url?: string;
|
||||
css_path?: string;
|
||||
adjust_window_size?: boolean;
|
||||
win_options?: Electron.BrowserWindowConstructorOptions;
|
||||
open_devtools?: boolean;
|
||||
use_inner_html?: boolean;
|
||||
}
|
||||
|
||||
declare namespace NodeJS {
|
||||
interface ProcessVersions {
|
||||
[name: string]: string;
|
||||
}
|
||||
}
|
65
app/node_modules/about-window/src/renderer.js
generated
vendored
65
app/node_modules/about-window/src/renderer.js
generated
vendored
|
@ -1,65 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const electron_1 = require("electron");
|
||||
electron_1.ipcRenderer.on('about-window:info', (_, info) => {
|
||||
const app_name = electron_1.remote.app.getName();
|
||||
const open_home = () => electron_1.shell.openExternal(info.homepage);
|
||||
const content = info.use_inner_html ? 'innerHTML' : 'innerText';
|
||||
document.title = `About ${app_name}`;
|
||||
const title_elem = document.querySelector('.title');
|
||||
title_elem.innerText = `${app_name} ${electron_1.remote.app.getVersion()}`;
|
||||
title_elem.addEventListener('click', open_home);
|
||||
if (info.homepage) {
|
||||
document
|
||||
.querySelector('.logo')
|
||||
.addEventListener('click', open_home);
|
||||
}
|
||||
const copyright_elem = document.querySelector('.copyright');
|
||||
if (info.copyright) {
|
||||
copyright_elem[content] = info.copyright;
|
||||
}
|
||||
else if (info.license) {
|
||||
copyright_elem[content] = `Distributed under ${info.license} license.`;
|
||||
}
|
||||
const icon_elem = document.getElementById('app-icon');
|
||||
icon_elem.src = info.icon_path;
|
||||
if (info.description) {
|
||||
const desc_elem = document.querySelector('.description');
|
||||
desc_elem[content] = info.description;
|
||||
}
|
||||
if (info.bug_report_url) {
|
||||
const bug_report = document.querySelector('.bug-report-link');
|
||||
bug_report.innerText = 'found bug?';
|
||||
bug_report.addEventListener('click', e => {
|
||||
e.preventDefault();
|
||||
electron_1.shell.openExternal(info.bug_report_url);
|
||||
});
|
||||
}
|
||||
if (info.css_path) {
|
||||
const link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.href = info.css_path;
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
if (info.adjust_window_size) {
|
||||
const height = document.body.scrollHeight;
|
||||
const width = document.body.scrollWidth;
|
||||
const win = electron_1.remote.getCurrentWindow();
|
||||
if (height > 0 && width > 0) {
|
||||
win.setContentSize(width, height + 40);
|
||||
}
|
||||
}
|
||||
});
|
||||
const versions = document.querySelector('.versions');
|
||||
const vs = process.versions;
|
||||
for (const name of ['electron', 'chrome', 'node', 'v8']) {
|
||||
const tr = document.createElement('tr');
|
||||
const name_td = document.createElement('td');
|
||||
name_td.innerText = name;
|
||||
tr.appendChild(name_td);
|
||||
const version_td = document.createElement('td');
|
||||
version_td.innerText = ' : ' + vs[name];
|
||||
tr.appendChild(version_td);
|
||||
versions.appendChild(tr);
|
||||
}
|
||||
//# sourceMappingURL=renderer.js.map
|
1
app/node_modules/about-window/src/renderer.js.map
generated
vendored
1
app/node_modules/about-window/src/renderer.js.map
generated
vendored
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["renderer.ts"],"names":[],"mappings":"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"}
|
73
app/node_modules/about-window/src/renderer.ts
generated
vendored
73
app/node_modules/about-window/src/renderer.ts
generated
vendored
|
@ -1,73 +0,0 @@
|
|||
import {ipcRenderer, remote, shell} from 'electron';
|
||||
|
||||
ipcRenderer.on('about-window:info', (_: any, info: AboutWindowInfo) => {
|
||||
const app_name = remote.app.getName();
|
||||
const open_home = () => shell.openExternal(info.homepage);
|
||||
const content = info.use_inner_html ? 'innerHTML' : 'innerText';
|
||||
document.title = `About ${app_name}`;
|
||||
|
||||
const title_elem = document.querySelector('.title') as HTMLHeadingElement;
|
||||
title_elem.innerText = `${app_name} ${remote.app.getVersion()}`;
|
||||
title_elem.addEventListener('click', open_home);
|
||||
|
||||
if (info.homepage) {
|
||||
document
|
||||
.querySelector('.logo')
|
||||
.addEventListener('click', open_home);
|
||||
}
|
||||
|
||||
const copyright_elem = document.querySelector('.copyright') as any;
|
||||
if (info.copyright) {
|
||||
copyright_elem[content] = info.copyright;
|
||||
} else if (info.license) {
|
||||
copyright_elem[content] = `Distributed under ${info.license} license.`;
|
||||
}
|
||||
|
||||
const icon_elem = document.getElementById('app-icon') as HTMLImageElement;
|
||||
icon_elem.src = info.icon_path;
|
||||
|
||||
if (info.description) {
|
||||
const desc_elem = document.querySelector('.description') as any;
|
||||
desc_elem[content] = info.description;
|
||||
}
|
||||
|
||||
if (info.bug_report_url) {
|
||||
const bug_report = document.querySelector('.bug-report-link') as HTMLDivElement;
|
||||
bug_report.innerText = 'found bug?';
|
||||
bug_report.addEventListener('click', e => {
|
||||
e.preventDefault();
|
||||
shell.openExternal(info.bug_report_url);
|
||||
});
|
||||
}
|
||||
|
||||
if (info.css_path) {
|
||||
const link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.href = info.css_path;
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
|
||||
if (info.adjust_window_size) {
|
||||
const height = document.body.scrollHeight;
|
||||
const width = document.body.scrollWidth;
|
||||
const win = remote.getCurrentWindow();
|
||||
if (height > 0 && width > 0) {
|
||||
// Note:
|
||||
// Add 30px(= about 2em) to add padding in window
|
||||
win.setContentSize(width, height + 40);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const versions = document.querySelector('.versions');
|
||||
const vs = process.versions;
|
||||
for (const name of ['electron', 'chrome', 'node', 'v8']) {
|
||||
const tr = document.createElement('tr');
|
||||
const name_td = document.createElement('td');
|
||||
name_td.innerText = name;
|
||||
tr.appendChild(name_td);
|
||||
const version_td = document.createElement('td');
|
||||
version_td.innerText = ' : ' + vs[name];
|
||||
tr.appendChild(version_td);
|
||||
versions.appendChild(tr);
|
||||
}
|
20
app/node_modules/about-window/src/tsconfig.json
generated
vendored
20
app/node_modules/about-window/src/tsconfig.json
generated
vendored
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"removeComments": true,
|
||||
"preserveConstEnums": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noEmitOnError": true,
|
||||
"strictNullChecks": false,
|
||||
"target": "es2015",
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts"
|
||||
]
|
||||
}
|
64
app/node_modules/about-window/styles/ui.css
generated
vendored
64
app/node_modules/about-window/styles/ui.css
generated
vendored
|
@ -1,64 +0,0 @@
|
|||
body,
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #333;
|
||||
background-color: #eee;
|
||||
font-size: 12px;
|
||||
font-family: 'Helvetica', 'Arial', 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'MS Pゴシック', 'MS PGothic', sans-serif;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 200px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.title,
|
||||
.copyright,
|
||||
.description {
|
||||
margin: 0.2em;
|
||||
}
|
||||
|
||||
.title {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-bottom: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.versions {
|
||||
border-collapse: collapse;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.copyright,
|
||||
.versions {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.link {
|
||||
cursor: pointer;
|
||||
color: #80a0c2;
|
||||
}
|
||||
|
||||
.bug-report-link {
|
||||
-webkit-app-region: no-drag;
|
||||
position: absolute;
|
||||
right: 0.5em;
|
||||
bottom: 0.5em;
|
||||
}
|
127
app/node_modules/about-window/tslint.json
generated
vendored
127
app/node_modules/about-window/tslint.json
generated
vendored
|
@ -1,127 +0,0 @@
|
|||
{
|
||||
"extends": ["tslint:recommended"],
|
||||
"rules": {
|
||||
"align": [
|
||||
true,
|
||||
"parameters",
|
||||
"statements"
|
||||
],
|
||||
"ban": false,
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
true,
|
||||
"check-space"
|
||||
],
|
||||
"curly": true,
|
||||
"eofline": true,
|
||||
"forin": false,
|
||||
"indent": [
|
||||
true,
|
||||
"spaces"
|
||||
],
|
||||
"interface-name": false,
|
||||
"jsdoc-format": true,
|
||||
"label-position": true,
|
||||
"max-line-length": false,
|
||||
"member-access": false,
|
||||
"member-ordering": [
|
||||
true,
|
||||
"public-before-private",
|
||||
"static-before-instance",
|
||||
"variables-before-functions"
|
||||
],
|
||||
"no-any": false,
|
||||
"no-arg": true,
|
||||
"no-bitwise": false,
|
||||
"no-conditional-assignment": true,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-construct": true,
|
||||
"no-constructor-vars": false,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-empty": true,
|
||||
"no-eval": true,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": true,
|
||||
"no-require-imports": false,
|
||||
"no-shadowed-variable": true,
|
||||
"no-string-literal": true,
|
||||
"no-switch-case-fall-through": false,
|
||||
"no-trailing-whitespace": true,
|
||||
"no-unused-expression": true,
|
||||
"no-unsafe-finally": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-keyword": true,
|
||||
"no-var-requires": true,
|
||||
"object-literal-sort-keys": false,
|
||||
"object-literal-key-quotes": [
|
||||
true,
|
||||
"as-needed"
|
||||
],
|
||||
"one-line": [
|
||||
true,
|
||||
"check-open-brace",
|
||||
"check-catch",
|
||||
"check-else",
|
||||
"check-whitespace"
|
||||
],
|
||||
"quotemark": [
|
||||
true,
|
||||
"single",
|
||||
"avoid-escape",
|
||||
"jsx-double"
|
||||
],
|
||||
"radix": true,
|
||||
"semicolon": true,
|
||||
"switch-default": true,
|
||||
"trailing-comma": [
|
||||
true,
|
||||
{
|
||||
"multiline": "always",
|
||||
"singleline": "never"
|
||||
}
|
||||
],
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"typedef": [
|
||||
false
|
||||
],
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}
|
||||
],
|
||||
"use-strict": false,
|
||||
"variable-name": [
|
||||
false,
|
||||
"check-format",
|
||||
"allow-leading-underscore",
|
||||
"ban-keywords"
|
||||
],
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
],
|
||||
"no-namespace": false,
|
||||
"arrow-parens": false
|
||||
}
|
||||
}
|
42
app/node_modules/electron-dl/index.js
generated
vendored
42
app/node_modules/electron-dl/index.js
generated
vendored
|
@ -18,7 +18,7 @@ function getFilenameFromMime(name, mime) {
|
|||
return `${name}.${exts[0].ext}`;
|
||||
}
|
||||
|
||||
function registerListener(session, opts = {}, cb = () => {}) {
|
||||
function registerListener(session, options, cb = () => {}) {
|
||||
const downloadItems = new Set();
|
||||
let receivedBytes = 0;
|
||||
let completedBytes = 0;
|
||||
|
@ -26,6 +26,10 @@ function registerListener(session, opts = {}, cb = () => {}) {
|
|||
const activeDownloadItems = () => downloadItems.size;
|
||||
const progressDownloadItems = () => receivedBytes / totalBytes;
|
||||
|
||||
options = Object.assign({
|
||||
showBadge: true
|
||||
}, options);
|
||||
|
||||
const listener = (e, item, webContents) => {
|
||||
downloadItems.add(item);
|
||||
totalBytes += item.getTotalBytes();
|
||||
|
@ -36,10 +40,10 @@ function registerListener(session, opts = {}, cb = () => {}) {
|
|||
}
|
||||
const win = electron.BrowserWindow.fromWebContents(hostWebContents);
|
||||
|
||||
const dir = opts.directory || app.getPath('downloads');
|
||||
const dir = options.directory || app.getPath('downloads');
|
||||
let filePath;
|
||||
if (opts.filename) {
|
||||
filePath = path.join(dir, opts.filename);
|
||||
if (options.filename) {
|
||||
filePath = path.join(dir, options.filename);
|
||||
} else {
|
||||
const filename = item.getFilename();
|
||||
const name = path.extname(filename) ? filename : getFilenameFromMime(filename, item.getMimeType());
|
||||
|
@ -47,10 +51,10 @@ function registerListener(session, opts = {}, cb = () => {}) {
|
|||
filePath = unusedFilename.sync(path.join(dir, name));
|
||||
}
|
||||
|
||||
const errorMessage = opts.errorMessage || 'The download of {filename} was interrupted';
|
||||
const errorTitle = opts.errorTitle || 'Download Error';
|
||||
const errorMessage = options.errorMessage || 'The download of {filename} was interrupted';
|
||||
const errorTitle = options.errorTitle || 'Download Error';
|
||||
|
||||
if (!opts.saveAs) {
|
||||
if (!options.saveAs) {
|
||||
item.setSavePath(filePath);
|
||||
}
|
||||
|
||||
|
@ -60,7 +64,7 @@ function registerListener(session, opts = {}, cb = () => {}) {
|
|||
return receivedBytes;
|
||||
}, completedBytes);
|
||||
|
||||
if (['darwin', 'linux'].includes(process.platform)) {
|
||||
if (options.showBadge && ['darwin', 'linux'].includes(process.platform)) {
|
||||
app.setBadgeCount(activeDownloadItems());
|
||||
}
|
||||
|
||||
|
@ -68,8 +72,8 @@ function registerListener(session, opts = {}, cb = () => {}) {
|
|||
win.setProgressBar(progressDownloadItems());
|
||||
}
|
||||
|
||||
if (typeof opts.onProgress === 'function') {
|
||||
opts.onProgress(progressDownloadItems());
|
||||
if (typeof options.onProgress === 'function') {
|
||||
options.onProgress(progressDownloadItems());
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -77,7 +81,7 @@ function registerListener(session, opts = {}, cb = () => {}) {
|
|||
completedBytes += item.getTotalBytes();
|
||||
downloadItems.delete(item);
|
||||
|
||||
if (['darwin', 'linux'].includes(process.platform)) {
|
||||
if (options.showBadge && ['darwin', 'linux'].includes(process.platform)) {
|
||||
app.setBadgeCount(activeDownloadItems());
|
||||
}
|
||||
|
||||
|
@ -97,11 +101,11 @@ function registerListener(session, opts = {}, cb = () => {}) {
|
|||
app.dock.downloadFinished(filePath);
|
||||
}
|
||||
|
||||
if (opts.openFolderWhenDone) {
|
||||
shell.showItemInFolder(filePath);
|
||||
if (options.openFolderWhenDone) {
|
||||
shell.showItemInFolder(path.join(dir, item.getFilename()));
|
||||
}
|
||||
|
||||
if (opts.unregisterWhenDone) {
|
||||
if (options.unregisterWhenDone) {
|
||||
session.removeListener('will-download', listener);
|
||||
}
|
||||
|
||||
|
@ -113,16 +117,16 @@ function registerListener(session, opts = {}, cb = () => {}) {
|
|||
session.on('will-download', listener);
|
||||
}
|
||||
|
||||
module.exports = (opts = {}) => {
|
||||
module.exports = (options = {}) => {
|
||||
app.on('session-created', session => {
|
||||
registerListener(session, opts);
|
||||
registerListener(session, options);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.download = (win, url, opts) => new Promise((resolve, reject) => {
|
||||
opts = Object.assign({}, opts, {unregisterWhenDone: true});
|
||||
module.exports.download = (win, url, options) => new Promise((resolve, reject) => {
|
||||
options = Object.assign({}, options, {unregisterWhenDone: true});
|
||||
|
||||
registerListener(win.webContents.session, opts, (err, item) => {
|
||||
registerListener(win.webContents.session, options, (err, item) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
|
|
78
app/node_modules/electron-dl/package.json
generated
vendored
78
app/node_modules/electron-dl/package.json
generated
vendored
|
@ -1,50 +1,28 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "electron-dl",
|
||||
"scope": null,
|
||||
"escapedName": "electron-dl",
|
||||
"name": "electron-dl",
|
||||
"rawSpec": "",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk"
|
||||
]
|
||||
],
|
||||
"_from": "electron-dl@latest",
|
||||
"_id": "electron-dl@1.10.0",
|
||||
"_inCache": true,
|
||||
"_from": "electron-dl@1.11.0",
|
||||
"_id": "electron-dl@1.11.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-iL9qHzzWOuL9bus+UT+P72SwrDQcFTV6QHqcbhwgqjCC9/K5jhdRzG0dIMB3TzYlk6rmApanPqh9DvWykwIH1Q==",
|
||||
"_location": "/electron-dl",
|
||||
"_nodeVersion": "4.8.3",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/electron-dl-1.10.0.tgz_1502139802256_0.5021310658194125"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.15.11",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "electron-dl",
|
||||
"scope": null,
|
||||
"escapedName": "electron-dl",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "electron-dl@1.11.0",
|
||||
"name": "electron-dl",
|
||||
"rawSpec": "",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
"escapedName": "electron-dl",
|
||||
"rawSpec": "1.11.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.11.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER"
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-1.10.0.tgz",
|
||||
"_shasum": "f94416064056fc6f2a86ae498614c93526890af9",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "electron-dl",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk",
|
||||
"_resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-1.11.0.tgz",
|
||||
"_shasum": "112851f3857bb1a556b5c736af06040bd40df850",
|
||||
"_spec": "electron-dl@1.11.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\app",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
|
@ -53,15 +31,17 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/electron-dl/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"ext-name": "^5.0.0",
|
||||
"pupa": "^1.0.0",
|
||||
"unused-filename": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Simplified file downloads for your Electron app",
|
||||
"devDependencies": {
|
||||
"ava": "^0.21.0",
|
||||
"cp-file": "^4.2.0",
|
||||
"ava": "^0.25.0",
|
||||
"cp-file": "^5.0.0",
|
||||
"electron": "^1.3.3",
|
||||
"minimist": "^1.2.0",
|
||||
"node-static": "^0.7.9",
|
||||
|
@ -70,15 +50,9 @@
|
|||
"uuid": "^3.1.0",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "f94416064056fc6f2a86ae498614c93526890af9",
|
||||
"tarball": "https://registry.npmjs.org/electron-dl/-/electron-dl-1.10.0.tgz"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "b47d7e9ee5e8c89b08ed86e9e395aa052e39f4bf",
|
||||
"homepage": "https://github.com/sindresorhus/electron-dl#readme",
|
||||
"keywords": [
|
||||
"electron",
|
||||
|
@ -89,15 +63,7 @@
|
|||
"progress"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "electron-dl",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/electron-dl.git"
|
||||
|
@ -106,7 +72,7 @@
|
|||
"start": "electron run.js",
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.10.0",
|
||||
"version": "1.11.0",
|
||||
"xo": {
|
||||
"envs": [
|
||||
"node",
|
||||
|
|
16
app/node_modules/electron-dl/readme.md
generated
vendored
16
app/node_modules/electron-dl/readme.md
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
# electron-dl [![Build Status](https://travis-ci.org/sindresorhus/electron-dl.svg?branch=master)](https://travis-ci.org/sindresorhus/electron-dl)
|
||||
|
||||
> Simplified file downloads for your [Electron](http://electron.atom.io) app
|
||||
> Simplified file downloads for your [Electron](https://electronjs.org) app
|
||||
|
||||
|
||||
## Why?
|
||||
|
@ -56,9 +56,11 @@ ipcMain.on('download-btn', (e, args) => {
|
|||
|
||||
## API
|
||||
|
||||
It can only be used in the [main](https://electronjs.org/docs/glossary/#main-process) process.
|
||||
|
||||
### electronDl([options])
|
||||
|
||||
### electronDl.download(window, url, [options]): Promise<[DownloadItem](https://github.com/electron/electron/blob/master/docs/api/download-item.md)>
|
||||
### electronDl.download(window, url, [options]): Promise<[DownloadItem](https://electronjs.org/docs/api/download-item)>
|
||||
|
||||
### window
|
||||
|
||||
|
@ -86,14 +88,14 @@ Note: Only use this option when strictly necessary. Downloading directly without
|
|||
#### directory
|
||||
|
||||
Type: `string`<br>
|
||||
Default: [User's downloads directory](http://electron.atom.io/docs/api/app/#appgetpathname)
|
||||
Default: [User's downloads directory](https://electronjs.org/docs/api/app/#appgetpathname)
|
||||
|
||||
Directory to save the file in.
|
||||
|
||||
#### filename
|
||||
|
||||
Type: `string`<br>
|
||||
Default: [`downloadItem.getFilename()`](https://electron.atom.io/docs/api/download-item/#downloaditemgetfilename)
|
||||
Default: [`downloadItem.getFilename()`](https://electronjs.org/docs/api/download-item/#downloaditemgetfilename)
|
||||
|
||||
Name of the saved file.
|
||||
|
||||
|
@ -126,6 +128,12 @@ Default: `false`
|
|||
|
||||
Reveal the downloaded file in the system file manager, and if possible, select the file.
|
||||
|
||||
#### showBadge
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
Shows the file count badge on macOS/Linux dock icons when download is in progress.
|
||||
|
||||
## Development
|
||||
|
||||
|
|
8
app/node_modules/mime-db/HISTORY.md
generated
vendored
8
app/node_modules/mime-db/HISTORY.md
generated
vendored
|
@ -1,3 +1,11 @@
|
|||
1.33.0 / 2018-02-15
|
||||
===================
|
||||
|
||||
* Add extensions from IANA for `message/*` types
|
||||
* Add new upstream MIME types
|
||||
* Fix some incorrect OOXML types
|
||||
* Remove `application/font-woff2`
|
||||
|
||||
1.32.0 / 2017-11-29
|
||||
===================
|
||||
|
||||
|
|
85
app/node_modules/mime-db/db.json
generated
vendored
85
app/node_modules/mime-db/db.json
generated
vendored
|
@ -369,6 +369,9 @@
|
|||
"application/fdt+xml": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/fhir+xml": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/fido.trusted-apps+json": {
|
||||
"compressible": true
|
||||
},
|
||||
|
@ -387,10 +390,6 @@
|
|||
"compressible": false,
|
||||
"extensions": ["woff"]
|
||||
},
|
||||
"application/font-woff2": {
|
||||
"compressible": false,
|
||||
"extensions": ["woff2"]
|
||||
},
|
||||
"application/framework-attributes+xml": {
|
||||
"source": "iana"
|
||||
},
|
||||
|
@ -779,6 +778,9 @@
|
|||
"application/nlsml+xml": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/node": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/nss": {
|
||||
"source": "iana"
|
||||
},
|
||||
|
@ -883,6 +885,9 @@
|
|||
"source": "iana",
|
||||
"extensions": ["p8"]
|
||||
},
|
||||
"application/pkcs8-encrypted": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/pkix-attr-cert": {
|
||||
"source": "iana",
|
||||
"extensions": ["ac"]
|
||||
|
@ -1247,6 +1252,9 @@
|
|||
"source": "iana",
|
||||
"extensions": ["tsd"]
|
||||
},
|
||||
"application/tnauthlist": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/trig": {
|
||||
"source": "iana"
|
||||
},
|
||||
|
@ -1433,6 +1441,10 @@
|
|||
"source": "iana",
|
||||
"extensions": ["azs"]
|
||||
},
|
||||
"application/vnd.amadeus+json": {
|
||||
"source": "iana",
|
||||
"compressible": true
|
||||
},
|
||||
"application/vnd.amazon.ebook": {
|
||||
"source": "apache",
|
||||
"extensions": ["azw"]
|
||||
|
@ -1537,6 +1549,10 @@
|
|||
"application/vnd.bbf.usp.msg": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.bbf.usp.msg+json": {
|
||||
"source": "iana",
|
||||
"compressible": true
|
||||
},
|
||||
"application/vnd.bekitzur-stech+json": {
|
||||
"source": "iana",
|
||||
"compressible": true
|
||||
|
@ -1640,9 +1656,15 @@
|
|||
"application/vnd.collabio.xodocuments.presentation": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.collabio.xodocuments.presentation-template": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.collabio.xodocuments.spreadsheet": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.collabio.xodocuments.spreadsheet-template": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.collection+json": {
|
||||
"source": "iana",
|
||||
"compressible": true
|
||||
|
@ -1658,6 +1680,9 @@
|
|||
"application/vnd.comicbook+zip": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.comicbook-rar": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.commerce-battelle": {
|
||||
"source": "iana"
|
||||
},
|
||||
|
@ -3452,9 +3477,6 @@
|
|||
"application/vnd.openxmlformats-officedocument.extended-properties+xml": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.presentationml-template": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
|
||||
"source": "iana"
|
||||
},
|
||||
|
@ -3511,7 +3533,7 @@
|
|||
"source": "iana"
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.template": {
|
||||
"source": "apache",
|
||||
"source": "iana",
|
||||
"extensions": ["potx"]
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
|
||||
|
@ -3520,9 +3542,6 @@
|
|||
"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml-template": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
|
||||
"source": "iana"
|
||||
},
|
||||
|
@ -3583,7 +3602,7 @@
|
|||
"source": "iana"
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
|
||||
"source": "apache",
|
||||
"source": "iana",
|
||||
"extensions": ["xltx"]
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
|
||||
|
@ -3607,9 +3626,6 @@
|
|||
"application/vnd.openxmlformats-officedocument.vmldrawing": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml-template": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
|
||||
"source": "iana"
|
||||
},
|
||||
|
@ -3646,7 +3662,7 @@
|
|||
"source": "iana"
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
|
||||
"source": "apache",
|
||||
"source": "iana",
|
||||
"extensions": ["dotx"]
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
|
||||
|
@ -3874,6 +3890,10 @@
|
|||
"application/vnd.renlearn.rlprint": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.restful+json": {
|
||||
"source": "iana",
|
||||
"compressible": true
|
||||
},
|
||||
"application/vnd.rig.cryptonote": {
|
||||
"source": "iana",
|
||||
"extensions": ["cryptonote"]
|
||||
|
@ -4021,6 +4041,9 @@
|
|||
"source": "iana",
|
||||
"extensions": ["sfs"]
|
||||
},
|
||||
"application/vnd.sqlite3": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.sss-cod": {
|
||||
"source": "iana"
|
||||
},
|
||||
|
@ -4446,6 +4469,9 @@
|
|||
"source": "iana",
|
||||
"extensions": ["cmp"]
|
||||
},
|
||||
"application/vnd.youtube.yt": {
|
||||
"source": "iana"
|
||||
},
|
||||
"application/vnd.zul": {
|
||||
"source": "iana",
|
||||
"extensions": ["zir","zirz"]
|
||||
|
@ -4458,6 +4484,10 @@
|
|||
"source": "iana",
|
||||
"extensions": ["vxml"]
|
||||
},
|
||||
"application/voucher-cms+json": {
|
||||
"source": "iana",
|
||||
"compressible": true
|
||||
},
|
||||
"application/vq-rtcpxr": {
|
||||
"source": "iana"
|
||||
},
|
||||
|
@ -5784,6 +5814,9 @@
|
|||
"source": "iana",
|
||||
"extensions": ["woff2"]
|
||||
},
|
||||
"image/aces": {
|
||||
"source": "iana"
|
||||
},
|
||||
"image/apng": {
|
||||
"compressible": false,
|
||||
"extensions": ["apng"]
|
||||
|
@ -6089,7 +6122,10 @@
|
|||
"source": "iana"
|
||||
},
|
||||
"message/disposition-notification": {
|
||||
"source": "iana"
|
||||
"source": "iana",
|
||||
"extensions": [
|
||||
"disposition-notification"
|
||||
]
|
||||
},
|
||||
"message/external-body": {
|
||||
"source": "iana"
|
||||
|
@ -6098,16 +6134,20 @@
|
|||
"source": "iana"
|
||||
},
|
||||
"message/global": {
|
||||
"source": "iana"
|
||||
"source": "iana",
|
||||
"extensions": ["u8msg"]
|
||||
},
|
||||
"message/global-delivery-status": {
|
||||
"source": "iana"
|
||||
"source": "iana",
|
||||
"extensions": ["u8dsn"]
|
||||
},
|
||||
"message/global-disposition-notification": {
|
||||
"source": "iana"
|
||||
"source": "iana",
|
||||
"extensions": ["u8mdn"]
|
||||
},
|
||||
"message/global-headers": {
|
||||
"source": "iana"
|
||||
"source": "iana",
|
||||
"extensions": ["u8hdr"]
|
||||
},
|
||||
"message/http": {
|
||||
"source": "iana",
|
||||
|
@ -6145,7 +6185,8 @@
|
|||
"source": "iana"
|
||||
},
|
||||
"message/vnd.wfa.wsc": {
|
||||
"source": "iana"
|
||||
"source": "iana",
|
||||
"extensions": ["wsc"]
|
||||
},
|
||||
"model/3mf": {
|
||||
"source": "iana"
|
||||
|
|
73
app/node_modules/mime-db/package.json
generated
vendored
73
app/node_modules/mime-db/package.json
generated
vendored
|
@ -1,53 +1,31 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "mime-db@^1.28.0",
|
||||
"scope": null,
|
||||
"escapedName": "mime-db",
|
||||
"name": "mime-db",
|
||||
"rawSpec": "^1.28.0",
|
||||
"spec": ">=1.28.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\ext-list"
|
||||
]
|
||||
],
|
||||
"_from": "mime-db@>=1.28.0 <2.0.0",
|
||||
"_id": "mime-db@1.32.0",
|
||||
"_inCache": true,
|
||||
"_from": "mime-db@^1.28.0",
|
||||
"_id": "mime-db@1.33.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==",
|
||||
"_location": "/mime-db",
|
||||
"_nodeVersion": "6.12.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/mime-db-1.32.0.tgz_1511989647467_0.298956407699734"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "dougwilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
},
|
||||
"_npmVersion": "5.5.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "mime-db@^1.28.0",
|
||||
"scope": null,
|
||||
"escapedName": "mime-db",
|
||||
"name": "mime-db",
|
||||
"escapedName": "mime-db",
|
||||
"rawSpec": "^1.28.0",
|
||||
"spec": ">=1.28.0 <2.0.0",
|
||||
"type": "range"
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.28.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ext-list"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.32.0.tgz",
|
||||
"_shasum": "485b3848b01a3cda5f968b4882c0771e58e09414",
|
||||
"_shrinkwrap": null,
|
||||
"_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
|
||||
"_shasum": "a3492050a5cb9b63450541e39d9788d2272783db",
|
||||
"_spec": "mime-db@^1.28.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\ext-list",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\app\\node_modules\\ext-list",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jshttp/mime-db/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Douglas Christopher Wilson",
|
||||
|
@ -64,7 +42,7 @@
|
|||
"url": "http://github.com/broofa"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Media Type Database",
|
||||
"devDependencies": {
|
||||
"bluebird": "3.5.1",
|
||||
|
@ -79,16 +57,10 @@
|
|||
"eslint-plugin-standard": "3.0.1",
|
||||
"gnode": "0.1.2",
|
||||
"mocha": "1.21.5",
|
||||
"nyc": "11.3.0",
|
||||
"nyc": "11.4.1",
|
||||
"raw-body": "2.3.2",
|
||||
"stream-to-array": "2.3.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-+ZWo/xZN40Tt6S+HyakUxnSOgff+JEdaneLWIm0Z6LmpCn5DMcZntLyUY5c/rTDog28LhXLKOUZKoTxTCAdBVw==",
|
||||
"shasum": "485b3848b01a3cda5f968b4882c0771e58e09414",
|
||||
"tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.32.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
},
|
||||
|
@ -99,7 +71,6 @@
|
|||
"db.json",
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "555f55537d688a6ba935253d8d36bf270a4a0ffa",
|
||||
"homepage": "https://github.com/jshttp/mime-db#readme",
|
||||
"keywords": [
|
||||
"mime",
|
||||
|
@ -111,19 +82,7 @@
|
|||
"charsets"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "dougwilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
},
|
||||
{
|
||||
"name": "jongleberry",
|
||||
"email": "jonathanrichardong@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "mime-db",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jshttp/mime-db.git"
|
||||
|
@ -137,5 +96,5 @@
|
|||
"test-travis": "nyc --reporter=text npm test",
|
||||
"update": "npm run fetch && npm run build"
|
||||
},
|
||||
"version": "1.32.0"
|
||||
"version": "1.33.0"
|
||||
}
|
||||
|
|
21
app/package-lock.json
generated
21
app/package-lock.json
generated
|
@ -1,14 +1,9 @@
|
|||
{
|
||||
"name": "TheDesk",
|
||||
"version": "14.5.0",
|
||||
"version": "14.7.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"about-window": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/about-window/-/about-window-1.8.0.tgz",
|
||||
"integrity": "sha1-Phg8+u9DQuH+psRC9OQ/aC6dpYA="
|
||||
},
|
||||
"ajv": {
|
||||
"version": "5.5.2",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
|
||||
|
@ -146,9 +141,9 @@
|
|||
}
|
||||
},
|
||||
"electron-dl": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-1.10.0.tgz",
|
||||
"integrity": "sha1-+UQWBkBW/G8qhq5JhhTJNSaJCvk=",
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-1.11.0.tgz",
|
||||
"integrity": "sha512-iL9qHzzWOuL9bus+UT+P72SwrDQcFTV6QHqcbhwgqjCC9/K5jhdRzG0dIMB3TzYlk6rmApanPqh9DvWykwIH1Q==",
|
||||
"requires": {
|
||||
"ext-name": "5.0.0",
|
||||
"pupa": "1.0.0",
|
||||
|
@ -170,7 +165,7 @@
|
|||
"resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz",
|
||||
"integrity": "sha1-C5jmTtgvWs8PKTG6v2khLvUt3Tc=",
|
||||
"requires": {
|
||||
"mime-db": "1.32.0"
|
||||
"mime-db": "1.33.0"
|
||||
}
|
||||
},
|
||||
"ext-name": {
|
||||
|
@ -402,9 +397,9 @@
|
|||
"integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE="
|
||||
},
|
||||
"mime-db": {
|
||||
"version": "1.32.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.32.0.tgz",
|
||||
"integrity": "sha1-SFs4SLAaPNpflotIgsB3HljglBQ="
|
||||
"version": "1.33.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
|
||||
"integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ=="
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "2.1.18",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "TheDesk",
|
||||
"version": "14.7.0",
|
||||
"version": "15.0.0",
|
||||
"description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
@ -10,8 +10,7 @@
|
|||
"author": "Cutls P",
|
||||
"license": "TheDesk LICENSE",
|
||||
"dependencies": {
|
||||
"about-window": "1.8.0",
|
||||
"electron-dl": "1.10.0",
|
||||
"electron-dl": "^1.11.0",
|
||||
"jimp": "^0.2.28",
|
||||
"node-notifier": "5.2.1"
|
||||
}
|
||||
|
|
|
@ -103,6 +103,19 @@
|
|||
<input class="with-gap" onchange="settings()" name="tag" type="radio" id="t_local" value="local" />
|
||||
<label for="t_local">検索対象のインスタンスのみ</label>
|
||||
<br>
|
||||
<h5>viaを表示する</h5>
|
||||
<input class="with-gap" onchange="settings()" name="via" type="radio" id="via_yes" value="yes" />
|
||||
<label for="via_yes">はい</label>
|
||||
<input class="with-gap" onchange="settings()" name="via" type="radio" id="via_hide" value="hide" />
|
||||
<label for="via_hide">いいえ</label>
|
||||
<br>
|
||||
<h5>マウスオーバーするまでアクションメニューを非表示</h5>
|
||||
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>
|
||||
<br>
|
||||
<h5>指定行数以上を折りたたむ</h5>5文字以下のトゥートは折りたたみません。また、折りたたみ時は改行が描画されません。
|
||||
<br>
|
||||
<input type="text" style="width:50px" id="sentence">行以上または
|
||||
|
@ -194,7 +207,7 @@
|
|||
<i class="fa fa-spotify"></i>SpotifyとNowPlayingの設定
|
||||
</div>
|
||||
<div class="collapsible-body">
|
||||
<i class="material-icons nex" title="Radio(Select/Pause)">play_circle_outline</i>ボタンで表示されるメニューから簡単にNowPlayingができます。<br>
|
||||
<i class="fa fa-spotify" style="font-size:24px;"></i>ボタンから簡単にNowPlayingができます。<br>
|
||||
<h5>アカウントの連携</h5>
|
||||
APIの性質上,thedesk.topへアクセスします。<br>
|
||||
<div id="spotify-code-show" class="hide"><input type="text" id="spotify-code"><button onclick="spotifyAuth()" class="btn waves-effect" style="width:100px;">設定</button></div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user