From 2d249f6f199f568be53d95c9761d4af586df8fc7 Mon Sep 17 00:00:00 2001 From: cutls Date: Thu, 3 Sep 2020 23:17:01 +0900 Subject: [PATCH] max/min width of column --- app/css/tl.css | 5 ++++- app/js/ui/layout.js | 10 ++++++++- app/view/make/language/en/setting.json | 4 ++-- app/view/make/language/ja-KS/setting.json | 4 ++-- app/view/make/language/ja/setting.json | 4 ++-- app/view/make/setting.sample.js | 27 ++++++++++++++++------- 6 files changed, 38 insertions(+), 16 deletions(-) diff --git a/app/css/tl.css b/app/css/tl.css index 8989b196..ff0b237d 100644 --- a/app/css/tl.css +++ b/app/css/tl.css @@ -157,7 +157,8 @@ iframe, } .box { overflow: hidden; - min-width: 23rem; + min-width: 300px; + max-width: 600px; flex: 1; border-top: none; display: flex; @@ -223,6 +224,8 @@ iframe, .area-toot .emoji, .area-toot .emoji-img { width: 1.538rem; + height: 1.538rem; + object-fit: cover; vertical-align: middle; margin: -1px 0; } diff --git a/app/js/ui/layout.js b/app/js/ui/layout.js index 8bb64dc0..110656d9 100644 --- a/app/js/ui/layout.js +++ b/app/js/ui/layout.js @@ -76,8 +76,12 @@ function parseColumn(target, dontclose) { var obj = [ { domain: 0, - type: 'local', + type: 'home', }, + { + domain: 0, + type: 'local', + } ] var json = JSON.stringify(obj) localStorage.setItem('column', json) @@ -162,6 +166,10 @@ function parseColumn(target, dontclose) { if (width) { var css = ' min-width:' + width + 'px;' } + var maxWidth = localStorage.getItem('max-width') + if (maxWidth) { + css = css +'max-width:' + maxWidth + 'px;' + } if (acct.width) { var css = ' min-width:' + acct.width + 'px;max-width:' + acct.width + 'px;' } diff --git a/app/view/make/language/en/setting.json b/app/view/make/language/en/setting.json index 1205dc33..96355d8a 100644 --- a/app/view/make/language/en/setting.json +++ b/app/view/make/language/en/setting.json @@ -24,8 +24,8 @@ "nativenotf": "Native notification", "nnwarn": "This does not work on Windows Portable ver.", "nntest": "Notification test", - "minwidth": "Minimum width of columns", - "minwidthwarn": "Scroll bar will be shown when your window size is more than ammounts of columns.", + "width": "Width of columns", + "widthwarn": "Scroll bar will be shown when your window size is more than ammounts of columns.", "fixwidth": "Minimum width of TweetDeck browser", "fixwidthwarn": "", "above": "above", diff --git a/app/view/make/language/ja-KS/setting.json b/app/view/make/language/ja-KS/setting.json index 30e07783..9ecf6f25 100644 --- a/app/view/make/language/ja-KS/setting.json +++ b/app/view/make/language/ja-KS/setting.json @@ -23,8 +23,8 @@ "nativenotf": "ネイティブ通知設定", "nnwarn": "Portableバージョンでは表示できんかも知れん。", "nntest": "通知テスト", - "minwidth": "マルチカラムの最低横幅", - "minwidthwarn": "画面全体の横幅÷コラム数で計算してそれ超してもうたら横スクロール入るで。", + "width": "カラムの横幅", + "widthwarn": "画面全体の横幅÷カラム数で計算してそれ超してもうたら横スクロール入るで。", "fixwidth": "TweetDeckの限定の最低横幅", "fixwidthwarn": "", "above": "以上", diff --git a/app/view/make/language/ja/setting.json b/app/view/make/language/ja/setting.json index ed4dda21..8c770d1b 100644 --- a/app/view/make/language/ja/setting.json +++ b/app/view/make/language/ja/setting.json @@ -24,8 +24,8 @@ "nativenotf": "ネイティブ通知設定", "nnwarn": "Portableバージョンでは表示できません。", "nntest": "通知テスト", - "minwidth": "マルチカラムの最低横幅", - "minwidthwarn": "画面全体の横幅÷コラム数がこの値を超えた時、横スクロールとなります。", + "width": "カラムの横幅", + "widthwarn": "画面全体の横幅÷カラム数がこの値を超えた時、横スクロールとなります。", "fixwidth": "TweetDeckの限定の最低横幅", "fixwidthwarn": "", "above": "以上", diff --git a/app/view/make/setting.sample.js b/app/view/make/setting.sample.js index c544d649..97f4ba53 100644 --- a/app/view/make/setting.sample.js +++ b/app/view/make/setting.sample.js @@ -60,16 +60,27 @@ var envConstruction = [ } }, { - id: 'width', - storage: 'width', checkbox: false, - doubleText: false, - width: 50, - setValue: 300, + doubleText: true, + data: [ + { + id: 'width', + storage: 'width', + width: 50, + setValue: 300, + text: { after: 'px ~ ' } + }, + { + id: 'maxWidth', + storage: 'max-width', + width: 50, + setValue: 600, + text: { after: 'px' } + } + ], text: { - head: '@@minwidth@@', - desc: '@@minwidthwarn@@', - after: 'px @@above@@' + head: '@@width@@', + desc: '@@widthwarn@@' } }, {