From 5d0b5e9c94fb02a3377347423fba9a07cf14504a Mon Sep 17 00:00:00 2001 From: Cutls Date: Thu, 21 Mar 2019 05:49:59 +0900 Subject: [PATCH] Fix(lock when posting artwork) --- app/css/post.css | 9 +++++++++ app/js/post/img.js | 21 +++++++++++++++++++-- app/js/ui/spotify.js | 7 +++++-- app/view/en/index.html | 22 ++++++---------------- app/view/ja/index.html | 22 ++++++---------------- app/view/make/index.sample.html | 2 +- app/view/ps/index.html | 22 ++++++---------------- 7 files changed, 52 insertions(+), 53 deletions(-) diff --git a/app/css/post.css b/app/css/post.css index 9190f245..ed1635da 100644 --- a/app/css/post.css +++ b/app/css/post.css @@ -68,6 +68,15 @@ #preview-field { display: none; } +.preview-img{ + width:50px; + max-height:100px; +} +.pi-wrap{ + display:inline-block; + width:50px; + max-height:100px; +} #default-emoji a{ color:white; margin-right:2px; diff --git a/app/js/post/img.js b/app/js/post/img.js index 0dcd41d2..847a471c 100644 --- a/app/js/post/img.js +++ b/app/js/post/img.js @@ -131,7 +131,7 @@ function media(b64, type, no) { console.log(json); var img = localStorage.getItem("img"); if (json.type.indexOf("image")!=-1) { - var html = ''; + var html = '
'; $('#preview').append(html); } else { $('#preview').append(lang.lang_postimg_previewdis); @@ -156,6 +156,7 @@ function media(b64, type, no) { Materialize.toast(lang.lang_postimg_aftupload, 1000); $("#imgup").text(""); $("#imgsel").show(); + uploadnow=false; localStorage.removeItem("image"); } } @@ -222,4 +223,20 @@ function adobe(){ } ipc.on('adobeagree', function (event, arg) { localStorage.setItem("adobeagree",arg); - }); \ No newline at end of file + }); +function deleteImage(key){ + console.log(key); + if(!confirm("Delete it?")){ + return false; + } + var media = $("#media").val(); + var arr=media.split(","); + for(var i=0;i