From a058659778f51df711bb298f1f34a4d3bd64b6c3 Mon Sep 17 00:00:00 2001 From: Cutls Date: Sat, 16 Mar 2019 03:10:46 +0900 Subject: [PATCH 1/3] Fix reload --- app/language.js | 2 +- app/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/language.js b/app/language.js index 060a196e..4ed5df0d 100644 --- a/app/language.js +++ b/app/language.js @@ -1,5 +1,5 @@ // Create the Application's main menu -function templete(lang){ +function templete(lang,mainWindow){ const electron = require("electron"); const app = electron.app; const BrowserWindow = electron.BrowserWindow; diff --git a/app/main.js b/app/main.js index fa9d3a5d..27190d29 100644 --- a/app/main.js +++ b/app/main.js @@ -137,7 +137,7 @@ function createWindow() { var platform=process.platform; var bit=process.arch; if(platform=="darwin"){ - Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang))); + Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang,mainWindow))); } } // Electronの初期化完了後に実行 From 63821f2c4561d52edae81422d8c415dc22fb0bdb Mon Sep 17 00:00:00 2001 From: Cutls Date: Sat, 16 Mar 2019 03:13:42 +0900 Subject: [PATCH 2/3] reverse some menu items --- app/view/en/index.html | 12 +++++++----- app/view/ja/index.html | 12 +++++++----- app/view/make/index.sample.html | 6 +++--- app/view/make/language/index.en.json | 2 +- app/view/make/language/index.ja.json | 2 +- app/view/ps/index.html | 12 +++++++----- 6 files changed, 26 insertions(+), 20 deletions(-) diff --git a/app/view/en/index.html b/app/view/en/index.html index d0746116..a359bb38 100644 --- a/app/view/en/index.html +++ b/app/view/en/index.html @@ -581,12 +581,14 @@ var tlid=0; HP
GitHub

- - - refreshSuper Reload + + infoAbout TheDesk  |  swap_horizToot button layout reverse diff --git a/app/view/ja/index.html b/app/view/ja/index.html index a5dd7aa0..d2cde038 100644 --- a/app/view/ja/index.html +++ b/app/view/ja/index.html @@ -581,12 +581,14 @@ var tlid=0; HP
GitHub

- - - refreshスーパーリロード + + infoこのソフトについて  |  swap_horizトゥートボタンの左右入れ替え diff --git a/app/view/make/index.sample.html b/app/view/make/index.sample.html index c42b56af..385c1955 100644 --- a/app/view/make/index.sample.html +++ b/app/view/make/index.sample.html @@ -644,7 +644,7 @@ var tlid=0;
view_headline{{list}}
filter_list{{filter}}
help_outline{{help}}
-
info{{about}}
+
refresh{{f5}}
@@ -766,8 +766,8 @@ var tlid=0;
-
- refresh{{f5}} + + info{{about}}  |  swap_horiz{{reverse}} diff --git a/app/view/make/language/index.en.json b/app/view/make/language/index.en.json index 472bbbc5..12e5cdb8 100644 --- a/app/view/make/language/index.en.json +++ b/app/view/make/language/index.en.json @@ -148,7 +148,7 @@ "filter":"Filter", "setting":"Preferences", "reverse":"Toot button layout reverse", - "f5":"Super Reload", + "f5":"Reload TL", "nanoDes":"The smallest Mastodon,", "verTips":"Version", "clockTips":"Clock", diff --git a/app/view/make/language/index.ja.json b/app/view/make/language/index.ja.json index 9470743f..1839852d 100644 --- a/app/view/make/language/index.ja.json +++ b/app/view/make/language/index.ja.json @@ -148,7 +148,7 @@ "filter":"フィルター", "setting":"設定", "reverse":"トゥートボタンの左右入れ替え", - "f5":"スーパーリロード", + "f5":"TL再読込", "nanoDes":"最小のマストドン。", "verTips":"バージョン", "clockTips":"時計", diff --git a/app/view/ps/index.html b/app/view/ps/index.html index d23ac515..06577b39 100644 --- a/app/view/ps/index.html +++ b/app/view/ps/index.html @@ -581,12 +581,14 @@ var tlid=0; HP
GitHub

- - - refreshcrwdns518:0crwdne518:0 + + info{{about}}  |  swap_horizcrwdns517:0crwdne517:0 From c245f2c5e6f948aca65392f840c39c48c5ab3b56 Mon Sep 17 00:00:00 2001 From: Cutls Date: Sat, 16 Mar 2019 14:05:04 +0900 Subject: [PATCH 3/3] TheDesk Usamin (18.0.2) --- app/js/common/version.js | 7 ++- app/js/ui/img.js | 76 ++++++++++--------------------- app/js/ui/settings.js | 12 +++++ app/package.json | 2 +- app/view/en/index.html | 15 ++++-- app/view/en/setting.html | 2 +- app/view/en/setting.vue.js | 2 +- app/view/ja/index.html | 15 ++++-- app/view/ja/setting.html | 2 +- app/view/ja/setting.vue.js | 2 +- app/view/make/index.sample.html | 13 ++++-- app/view/make/setting.sample.html | 2 +- app/view/make/setting.sample.js | 2 +- app/view/ps/index.html | 15 ++++-- app/view/ps/setting.html | 2 +- app/view/ps/setting.vue.js | 2 +- 16 files changed, 89 insertions(+), 82 deletions(-) diff --git a/app/js/common/version.js b/app/js/common/version.js index 409a4411..317b89f1 100644 --- a/app/js/common/version.js +++ b/app/js/common/version.js @@ -14,7 +14,12 @@ function verck(ver) { verp=verp.replace( ')', ''); verp=verp.replace( ' ', '_'); console.log(verp); - $("#release-"+verp).show(); + if(lang.language=="ja"){ + $("#release-"+verp).show(); + }else{ + $("#release-en").show(); + } + }); } var electron = require("electron"); diff --git a/app/js/ui/img.js b/app/js/ui/img.js index 88d0e8f2..0145e5f4 100644 --- a/app/js/ui/img.js +++ b/app/js/ui/img.js @@ -135,61 +135,31 @@ function imgCont(type) { var height = element.naturalHeight; var windowH = $(window).height(); var windowW = $(window).width(); - //小さい画像 - if(width<(windowW - 50) && height<(windowH-1000)){ - $("#imgmodal").css('height',height+"px"); - $("#imgmodal").css('width',width+"px"); - $("#imagewrap").css('height',height+"px"); - $("#imagemodal").css('height',height+100+"px"); - $("#imagewrap").css('width',width+"px"); - $("#imagemodal").css('width',width+"px"); - $("#imagemodal").css('margin-top',(windowH /2) - (height / 2) +"px"); - }else{ - $("#imagemodal").css('margin-top',0); - var aspect = width/height; - if (aspect < 2.8 && aspect > 0.3){ - //moderate - if(windowW > windowH){ - //画面が横長(縦幅基準) - $("#imgmodal").css('height',windowH/1.2-70+"px"); - var imgW = (windowH/1.2-70)/height*width; - $("#imgmodal").css('width',imgW+"px"); - $("#imagewrap").css('height',windowH/1.2-60+"px"); - $("#imagemodal").css('height',windowH/1.2+"px"); - $("#imagewrap").css('width',imgW+50+"px"); - $("#imagemodal").css('width',imgW+50+"px"); - }else{ - //画面が縦長・正方形(横幅基準) - $("#imgmodal").css('width',windowW/1.2-30+"px"); - var imgH = (windowW/1.2-30)/width*height; - $("#imgmodal").css('height',imgH+"px"); - $("#imagewrap").css('width',windowW/1.2+"px"); - $("#imagemodal").css('width',windowW/1.2+"px"); - $("#imagewrap").css('height',imgH+60+"px"); - $("#imagemodal").css('height',imgH+120+"px"); - } + $("#imagemodal").css("bottom","0") + $("#imagemodal img").css("width","auto") + if(heightwindowW*0.8){ + $("#imagemodal").css("width","80vw") + $("#imagemodal img").css("width","100%") + var heightS=windowW*0.8/width*height; + $("#imagemodal").css("height",heightS+60+"px") }else{ - //極端な画像 - if(height > width){ - //縦長 - $("#imgmodal").css('height',windowH-60+"px"); - var imgW = (windowH-50)/height*width; - $("#imgmodal").css('width',imgW+"px"); - $("#imagewrap").css('height',windowH-50+"px"); - $("#imagemodal").css('height',windowH+"px"); - $("#imagewrap").css('width',imgW+50+"px"); - $("#imagemodal").css('width',imgW+50+"px"); - }else{ - //横長・正方形 - $("#imgmodal").css('width',windowW-30+"px"); - var imgH = (windowW-50)/width*height; - $("#imgmodal").css('height',imgH+"px"); - $("#imagewrap").css('width',windowW+"px"); - $("#imagemodal").css('width',windowW+"px"); - $("#imagewrap").css('height',imgH+60+"px"); - $("#imagemodal").css('height',imgH+120+"px"); - } + $("#imagemodal").css("width",width+"px") } + }else{ + console.log("long") + $("#imagemodal img").css("width","auto") + var widthS=windowH/height*width; + if(widthS