Emojis increasing
This commit is contained in:
parent
07ad76f125
commit
5ef3305ef2
|
@ -43,16 +43,15 @@
|
|||
}
|
||||
#emoji {
|
||||
position: fixed;
|
||||
bottom: 120px;
|
||||
right: 20px;
|
||||
bottom: 40px;
|
||||
width: 300px;
|
||||
height: 440px;
|
||||
height: 380px;
|
||||
z-index: 502;
|
||||
padding: 5px;
|
||||
}
|
||||
#emoji-list {
|
||||
width: 100%;
|
||||
height: calc(100% - 190px);
|
||||
height: calc(100% - 130px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
#preview-field {
|
||||
|
|
|
@ -40,7 +40,7 @@ function defaultEmoji(target){
|
|||
var emojis="";
|
||||
Object.keys(json).forEach(function(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);
|
||||
$("#now-emoji").text(lang_defaultemojis_text.replace("{{cat}}" ,defaultemojiname[target]));
|
||||
|
@ -52,14 +52,10 @@ function customEmoji(){
|
|||
emojiList('home')
|
||||
}
|
||||
function defEmoji(target){
|
||||
if(target=="thinking_face"){
|
||||
target="thinking";
|
||||
}
|
||||
//var emoji=emojione.shortnameToUnicode(":"+target+":");
|
||||
var emojiraw = emojisc.emojis.filter(function(item, index){
|
||||
if (item.shortname == ':'+target+":") return true;
|
||||
var emojiraw = newpack.filter(function(item, index){
|
||||
if (item.short_name == target) return true;
|
||||
});
|
||||
var emoji=emojiraw[0].emoji;
|
||||
emoji=twemoji.convert.fromCodePoint(emojiraw[0].unified);
|
||||
var now = $("#textarea").val();
|
||||
var selin = localStorage.getItem("cursor");
|
||||
var now = $("#textarea").val();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12,6 +12,11 @@ function emoji() {
|
|||
}
|
||||
localStorage.setItem("cursor", selin);
|
||||
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")
|
||||
if (!localStorage.getItem("emoji_" + acct_id)) {
|
||||
var html =
|
||||
|
@ -143,42 +148,3 @@ function brInsert(code) {
|
|||
$("#textarea").val(now + code);
|
||||
$("#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);
|
|
@ -45,6 +45,7 @@ function vis(set){
|
|||
var acct_id = $("#post-acct-sel").val();
|
||||
localStorage.setItem("vis-memory-"+acct_id,set);
|
||||
}
|
||||
$('.dropdown-button').dropdown('close');
|
||||
}
|
||||
function loadVis(){
|
||||
var vist = localStorage.getItem("vis");
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
//左下のメッセージ
|
||||
var todcTrigger=null;
|
||||
function todo(mes){
|
||||
clearInterval(todcTrigger);
|
||||
$('#message').text(mes);
|
||||
$('#message').fadeIn();
|
||||
todcTrigger=setTimeout(todc, 4000);
|
||||
}
|
||||
function todc(){
|
||||
$('#message').fadeOut();
|
||||
|
@ -24,7 +27,7 @@ function tips(mode){
|
|||
clearInterval(spotStart);
|
||||
if(mode=="ver"){
|
||||
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")
|
||||
}else if(mode=="clock"){
|
||||
tipsToggle()
|
||||
|
|
2
app/package-lock.json
generated
2
app/package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "thedesk",
|
||||
"version": "16.0.13",
|
||||
"version": "16.1.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
"win": {
|
||||
"icon": "thedesk.ico",
|
||||
"target": [
|
||||
"nsis","portable"
|
||||
"nsis",
|
||||
"portable"
|
||||
]
|
||||
},
|
||||
"linux": {
|
||||
|
|
|
@ -126,7 +126,7 @@ var lang="en";
|
|||
<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>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -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>
|
||||
<br>
|
||||
</span>
|
||||
<input type="text" id="emoji-suggest" placeholder="Custom emojis Search">
|
||||
<div id="emoji-list" class="" style="">
|
||||
</div>
|
||||
<div class="emoji-control center">
|
||||
|
|
|
@ -126,7 +126,7 @@ var lang="ja";
|
|||
<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>
|
||||
<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>
|
||||
<i class="material-icons nex gray waves-effect" title="トゥートボックスのクリア(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i>
|
||||
</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>
|
||||
<br>
|
||||
</span>
|
||||
<input type="text" id="emoji-suggest" placeholder="カスタム絵文字 検索">
|
||||
<div id="emoji-list" class="" style="">
|
||||
</div>
|
||||
<div class="emoji-control center">
|
||||
|
|
|
@ -126,7 +126,7 @@ var lang="{{lang}}";
|
|||
<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>
|
||||
<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>
|
||||
<i class="material-icons nex gray waves-effect" title="{{clearToot}}(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i>
|
||||
</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>
|
||||
<br>
|
||||
</span>
|
||||
<input type="text" id="emoji-suggest" placeholder="{{customEmoji}} {{search}}">
|
||||
<div id="emoji-list" class="" style="">
|
||||
</div>
|
||||
<div class="emoji-control center">
|
||||
|
|
Loading…
Reference in New Issue
Block a user