Emojis increasing

This commit is contained in:
cutls 2018-09-14 01:25:43 +09:00
parent 07ad76f125
commit 5ef3305ef2
11 changed files with 29 additions and 1875 deletions

View File

@ -43,16 +43,15 @@
} }
#emoji { #emoji {
position: fixed; position: fixed;
bottom: 120px; bottom: 40px;
right: 20px;
width: 300px; width: 300px;
height: 440px; height: 380px;
z-index: 502; z-index: 502;
padding: 5px; padding: 5px;
} }
#emoji-list { #emoji-list {
width: 100%; width: 100%;
height: calc(100% - 190px); height: calc(100% - 130px);
overflow-y: scroll; overflow-y: scroll;
} }
#preview-field { #preview-field {

View File

@ -40,7 +40,7 @@ function defaultEmoji(target){
var emojis=""; var emojis="";
Object.keys(json).forEach(function(key) { Object.keys(json).forEach(function(key) {
var emoji = json[key]; var emoji = json[key];
emojis = emojis + '<a onclick="defEmoji(\''+emoji["shortcode"]+'\')" class="pointer"><span style="width: 20px; height: 20px; display: inline-block; background-image: url(\'./img/sheet.png\'); background-size: 4900%; background-position: '+emoji["css"]+';"></span></a>'; emojis = emojis + '<a onclick="defEmoji(\''+emoji["shortcode"]+'\')" class="pointer"><span style="width: 20px; height: 20px; display: inline-block; background-image: url(\'../../img/sheet.png\'); background-size: 4900%; background-position: '+emoji["css"]+';"></span></a>';
}); });
$("#emoji-list").html(emojis); $("#emoji-list").html(emojis);
$("#now-emoji").text(lang_defaultemojis_text.replace("{{cat}}" ,defaultemojiname[target])); $("#now-emoji").text(lang_defaultemojis_text.replace("{{cat}}" ,defaultemojiname[target]));
@ -52,14 +52,10 @@ function customEmoji(){
emojiList('home') emojiList('home')
} }
function defEmoji(target){ function defEmoji(target){
if(target=="thinking_face"){ var emojiraw = newpack.filter(function(item, index){
target="thinking"; if (item.short_name == target) return true;
} });
//var emoji=emojione.shortnameToUnicode(":"+target+":"); emoji=twemoji.convert.fromCodePoint(emojiraw[0].unified);
var emojiraw = emojisc.emojis.filter(function(item, index){
if (item.shortname == ':'+target+":") return true;
});
var emoji=emojiraw[0].emoji;
var now = $("#textarea").val(); var now = $("#textarea").val();
var selin = localStorage.getItem("cursor"); var selin = localStorage.getItem("cursor");
var now = $("#textarea").val(); var now = $("#textarea").val();
@ -77,7 +73,7 @@ function defEmoji(target){
if(!selin){ if(!selin){
selin=0; selin=0;
} }
localStorage.setItem("cursor", selin); localStorage.setItem("cursor", selin);
} }
function faicon(){ function faicon(){
var json=faicons; var json=faicons;

File diff suppressed because one or more lines are too long

View File

@ -12,6 +12,11 @@ function emoji() {
} }
localStorage.setItem("cursor", selin); localStorage.setItem("cursor", selin);
if ($("#emoji").hasClass("hide")) { if ($("#emoji").hasClass("hide")) {
if($("#bottom").hasClass("reverse")){
$('#emoji').css("left",$('#post-box').offset().left-295+"px");
}else{
$('#emoji').css("left",$('#post-box').offset().left+295+"px");
}
$("#emoji").removeClass("hide") $("#emoji").removeClass("hide")
if (!localStorage.getItem("emoji_" + acct_id)) { if (!localStorage.getItem("emoji_" + acct_id)) {
var html = var html =
@ -143,42 +148,3 @@ function brInsert(code) {
$("#textarea").val(now + code); $("#textarea").val(now + code);
$("#textarea").focus(); $("#textarea").focus();
} }
//入力時に絵文字をサジェスト
var etimer = null;
var einput = document.getElementById("emoji-suggest");
var prev_val = einput.value;
var oldSuggest;
var suggest;
einput.addEventListener("focus", function() {
$(".emoji-control").addClass("hide");
$("#suggest").html("");
window.clearInterval(etimer);
etimer = window.setInterval(function() {
var new_val = einput.value;
var html="";
if (prev_val != new_val && new_val.length > 3) {
var obj = JSON.parse(localStorage.getItem("emoji_" + acct_id));
var num = obj.length;
for (i = 0; i < num; i++) {
var emoji = obj[i];
if ( ~emoji.shortcode.indexOf(new_val)) {
//strにhogeを含む場合の処理
if (emoji) {
html = html + '<a onclick="emojiInsert(\':' + emoji.shortcode +
': \')" class="pointer"><img src="' + emoji.url + '" width="20"></a>';
}
}
}
$("#emoji-list").html(html+'<br><a onclick="customEmoji()" class="pointer waves-effect">リセット</a>');
};
oldSuggest = suggest;
prev_value = new_val;
}, 1000);
}, false);
einput.addEventListener("blur", function() {
window.clearInterval(etimer);
}, false);

View File

@ -45,6 +45,7 @@ function vis(set){
var acct_id = $("#post-acct-sel").val(); var acct_id = $("#post-acct-sel").val();
localStorage.setItem("vis-memory-"+acct_id,set); localStorage.setItem("vis-memory-"+acct_id,set);
} }
$('.dropdown-button').dropdown('close');
} }
function loadVis(){ function loadVis(){
var vist = localStorage.getItem("vis"); var vist = localStorage.getItem("vis");

View File

@ -1,7 +1,10 @@
//左下のメッセージ //左下のメッセージ
var todcTrigger=null;
function todo(mes){ function todo(mes){
clearInterval(todcTrigger);
$('#message').text(mes); $('#message').text(mes);
$('#message').fadeIn(); $('#message').fadeIn();
todcTrigger=setTimeout(todc, 4000);
} }
function todc(){ function todc(){
$('#message').fadeOut(); $('#message').fadeOut();
@ -24,7 +27,7 @@ function tips(mode){
clearInterval(spotStart); clearInterval(spotStart);
if(mode=="ver"){ if(mode=="ver"){
tipsToggle() tipsToggle()
$("#tips-text").html('<img src="../../img/desk.png" width="20"><span style="font-size:20px">TheDesk</span> '+localStorage.getItem("ver")+'[<i class="material-icons" style="font-size:1.2rem;top: 3px;position: relative;">supervisor_account</i><span id="persons">1+</span>]') $("#tips-text").html('<img src="../../img/desk.png" width="20" onclick="todo(\'!TheDesk! It\\\'s a nice client!\')"><span style="font-size:20px">TheDesk</span> '+localStorage.getItem("ver")+'[<i class="material-icons" style="font-size:1.2rem;top: 3px;position: relative;">supervisor_account</i><span id="persons">1+</span>]')
localStorage.setItem("tips","ver") localStorage.setItem("tips","ver")
}else if(mode=="clock"){ }else if(mode=="clock"){
tipsToggle() tipsToggle()

2
app/package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "thedesk", "name": "thedesk",
"version": "16.0.13", "version": "16.1.2",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -44,7 +44,8 @@
"win": { "win": {
"icon": "thedesk.ico", "icon": "thedesk.ico",
"target": [ "target": [
"nsis","portable" "nsis",
"portable"
] ]
}, },
"linux": { "linux": {
@ -55,9 +56,9 @@
], ],
"category": "Network" "category": "Network"
}, },
"electronDownload":{ "electronDownload": {
"version":"2.0.7" "version": "2.0.7"
}, },
"electronVersion":"2.0.7" "electronVersion": "2.0.7"
} }
} }

View File

@ -126,7 +126,7 @@ var lang="en";
<a class="waves-effect gray" id="cw" onclick="cw()" title="Hide text behind warning">CW</a> <a class="waves-effect gray" id="cw" onclick="cw()" title="Hide text behind warning">CW</a>
<span><span id="imgup"></span><span id="imgsel"><i class="waves-effect material-icons gray" onclick="fileselect()" title="Attach..">photo_library</i></span></span> <span><span id="imgup"></span><span id="imgsel"><i class="waves-effect material-icons gray" onclick="fileselect()" title="Attach..">photo_library</i></span></span>
<i class="waves-effect gray material-icons" onclick="adobe()" title="Adobe Photo Editor">format_shapes</i> <i class="waves-effect gray material-icons" onclick="adobe()" title="Adobe Photo Editor">format_shapes</i>
<i class="waves-effect gray material-icons" onclick="emoji()" title="Emojis">tag_faces</i> <i class="waves-effect gray material-icons" onclick="emoji()" id="emojibtn" title="Emojis">tag_faces</i>
<a class="pointer waves-effect gray" id="npbtn" title="NowPlaying[Click to insert info of Spotify(account link is required.)/control+click to insert that of iTunes(macOS)]"><i class="material-icons" style="font-size:24px;">music_note</i></a> <a class="pointer waves-effect gray" id="npbtn" title="NowPlaying[Click to insert info of Spotify(account link is required.)/control+click to insert that of iTunes(macOS)]"><i class="material-icons" style="font-size:24px;">music_note</i></a>
<i class="material-icons nex gray waves-effect" title="Clear toot box(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i> <i class="material-icons nex gray waves-effect" title="Clear toot box(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i>
</div> </div>
@ -180,7 +180,6 @@ var lang="en";
<i class="material-icons waves-effect" onclick="emoji()" title="Close this box" data-trans-title="post_box_close">cancel</i> <i class="material-icons waves-effect" onclick="emoji()" title="Close this box" data-trans-title="post_box_close">cancel</i>
<br> <br>
</span> </span>
<input type="text" id="emoji-suggest" placeholder="Custom emojis Search">
<div id="emoji-list" class="" style=""> <div id="emoji-list" class="" style="">
</div> </div>
<div class="emoji-control center"> <div class="emoji-control center">

View File

@ -126,7 +126,7 @@ var lang="ja";
<a class="waves-effect gray" id="cw" onclick="cw()" title="コンテンツワーニング(トゥートを表示する前にメッセージで隠す)">CW</a> <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> <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="adobe()" title="Adobeフォトエディタ">format_shapes</i>
<i class="waves-effect gray material-icons" onclick="emoji()" title="絵文字を挿入">tag_faces</i> <i class="waves-effect gray material-icons" onclick="emoji()" id="emojibtn" title="絵文字を挿入">tag_faces</i>
<a class="pointer waves-effect gray" id="npbtn" title="NowPlaying[クリックでSpotify(アカウント連携が必要です)/control+クリックでiTunes(macOSが必要です)]"><i class="material-icons" style="font-size:24px;">music_note</i></a> <a class="pointer waves-effect gray" id="npbtn" title="NowPlaying[クリックでSpotify(アカウント連携が必要です)/control+クリックでiTunes(macOSが必要です)]"><i class="material-icons" style="font-size:24px;">music_note</i></a>
<i class="material-icons nex gray waves-effect" title="トゥートボックスのクリア(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i> <i class="material-icons nex gray waves-effect" title="トゥートボックスのクリア(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i>
</div> </div>
@ -180,7 +180,6 @@ var lang="ja";
<i class="material-icons waves-effect" onclick="emoji()" title="このボックスを閉じる" data-trans-title="post_box_close">cancel</i> <i class="material-icons waves-effect" onclick="emoji()" title="このボックスを閉じる" data-trans-title="post_box_close">cancel</i>
<br> <br>
</span> </span>
<input type="text" id="emoji-suggest" placeholder="カスタム絵文字 検索">
<div id="emoji-list" class="" style=""> <div id="emoji-list" class="" style="">
</div> </div>
<div class="emoji-control center"> <div class="emoji-control center">

View File

@ -126,7 +126,7 @@ var lang="{{lang}}";
<a class="waves-effect gray" id="cw" onclick="cw()" title="{{cwDes}}">CW</a> <a class="waves-effect gray" id="cw" onclick="cw()" title="{{cwDes}}">CW</a>
<span><span id="imgup"></span><span id="imgsel"><i class="waves-effect material-icons gray" onclick="fileselect()" title="{{selfile}}">photo_library</i></span></span> <span><span id="imgup"></span><span id="imgsel"><i class="waves-effect material-icons gray" onclick="fileselect()" title="{{selfile}}">photo_library</i></span></span>
<i class="waves-effect gray material-icons" onclick="adobe()" title="{{adobephoto}}">format_shapes</i> <i class="waves-effect gray material-icons" onclick="adobe()" title="{{adobephoto}}">format_shapes</i>
<i class="waves-effect gray material-icons" onclick="emoji()" title="{{insertEmoji}}">tag_faces</i> <i class="waves-effect gray material-icons" onclick="emoji()" id="emojibtn" title="{{insertEmoji}}">tag_faces</i>
<a class="pointer waves-effect gray" id="npbtn" title="{{NowPlayingDes}}"><i class="material-icons" style="font-size:24px;">music_note</i></a> <a class="pointer waves-effect gray" id="npbtn" title="{{NowPlayingDes}}"><i class="material-icons" style="font-size:24px;">music_note</i></a>
<i class="material-icons nex gray waves-effect" title="{{clearToot}}(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i> <i class="material-icons nex gray waves-effect" title="{{clearToot}}(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i>
</div> </div>
@ -180,7 +180,6 @@ var lang="{{lang}}";
<i class="material-icons waves-effect" onclick="emoji()" title="{{closeThisBox}}" data-trans-title="post_box_close">cancel</i> <i class="material-icons waves-effect" onclick="emoji()" title="{{closeThisBox}}" data-trans-title="post_box_close">cancel</i>
<br> <br>
</span> </span>
<input type="text" id="emoji-suggest" placeholder="{{customEmoji}} {{search}}">
<div id="emoji-list" class="" style=""> <div id="emoji-list" class="" style="">
</div> </div>
<div class="emoji-control center"> <div class="emoji-control center">