#307 #317 margin between timelines

This commit is contained in:
cutls 2020-09-04 23:43:04 +09:00
parent 2d249f6f19
commit bec4444388
6 changed files with 29 additions and 6 deletions

View File

@ -1591,9 +1591,14 @@ function mastodonBaseStreaming(acct_id) {
filterUpdate(acct_id) filterUpdate(acct_id)
} else if (~typeA.indexOf('announcement')) { } else if (~typeA.indexOf('announcement')) {
announ(acct_id, tlid) announ(acct_id, tlid)
} else if (type == 'notification') { } else if (typeA == 'notification') {
const obj = JSON.parse(JSON.parse(mess.data).payload)
let template = '' let template = ''
localStorage.setItem('lastnotf_' + acct_id, obj.id) localStorage.setItem('lastnotf_' + acct_id, obj.id)
let popup = localStorage.getItem('popup')
if (!popup) {
popup = 0
}
if (obj.type != 'follow' && obj.type != 'follow_request') { if (obj.type != 'follow' && obj.type != 'follow_request') {
template = parse([obj], 'notf', acct_id, 'notf', popup) template = parse([obj], 'notf', acct_id, 'notf', popup)
} else if (obj.type == 'follow_request') { } else if (obj.type == 'follow_request') {

View File

@ -162,19 +162,21 @@ function parseColumn(target, dontclose) {
} else { } else {
localStorage.removeItem('hasNotfC_' + acct.domain) localStorage.removeItem('hasNotfC_' + acct.domain)
} }
var css = ''
var width = localStorage.getItem('width') var width = localStorage.getItem('width')
if (width) { if (width) {
var css = ' min-width:' + width + 'px;' css = ' min-width:' + width + 'px;'
} }
var maxWidth = localStorage.getItem('max-width') var maxWidth = localStorage.getItem('max-width')
if (maxWidth) { if (maxWidth) {
css = css +'max-width:' + maxWidth + 'px;' css = css +'max-width:' + maxWidth + 'px;'
} }
if (acct.width) { var margin = localStorage.getItem('margin')
var css = ' min-width:' + acct.width + 'px;max-width:' + acct.width + 'px;' if (margin) {
css = css +'margin-right:' + margin + 'px;'
} }
if (!css) { if (acct.width) {
var css = '' css = css + ' min-width:' + acct.width + 'px !important;max-width:' + acct.width + 'px !important;'
} }
if (acct.type == 'webview') { if (acct.type == 'webview') {
if (localStorage.getItem('fixwidth')) { if (localStorage.getItem('fixwidth')) {

View File

@ -28,6 +28,7 @@
"widthwarn": "Scroll bar will be shown when your window size is more than ammounts of columns.", "widthwarn": "Scroll bar will be shown when your window size is more than ammounts of columns.",
"fixwidth": "Minimum width of TweetDeck browser", "fixwidth": "Minimum width of TweetDeck browser",
"fixwidthwarn": "", "fixwidthwarn": "",
"margin": "Margin between timelines",
"above": "above", "above": "above",
"font": "Font", "font": "Font",
"fontwarn": "Select your favorite font to 'Select'(On Linux, it may not work.)", "fontwarn": "Select your favorite font to 'Select'(On Linux, it may not work.)",

View File

@ -27,6 +27,7 @@
"widthwarn": "画面全体の横幅÷カラム数で計算してそれ超してもうたら横スクロール入るで。", "widthwarn": "画面全体の横幅÷カラム数で計算してそれ超してもうたら横スクロール入るで。",
"fixwidth": "TweetDeckの限定の最低横幅", "fixwidth": "TweetDeckの限定の最低横幅",
"fixwidthwarn": "", "fixwidthwarn": "",
"margin": "TL間のマージン",
"above": "以上", "above": "以上",
"font": "フォント", "font": "フォント",
"fontwarn": "「選択」を押してフォントを選んでな。(Linuxでは動かんかもしれん。)", "fontwarn": "「選択」を押してフォントを選んでな。(Linuxでは動かんかもしれん。)",

View File

@ -28,6 +28,7 @@
"widthwarn": "画面全体の横幅÷カラム数がこの値を超えた時、横スクロールとなります。", "widthwarn": "画面全体の横幅÷カラム数がこの値を超えた時、横スクロールとなります。",
"fixwidth": "TweetDeckの限定の最低横幅", "fixwidth": "TweetDeckの限定の最低横幅",
"fixwidthwarn": "", "fixwidthwarn": "",
"margin": "TL間のマージン",
"above": "以上", "above": "以上",
"font": "フォント", "font": "フォント",
"fontwarn": "「選択」を押してフォントを選んでください。(Linuxでは動かない場合があります。)", "fontwarn": "「選択」を押してフォントを選んでください。(Linuxでは動かない場合があります。)",

View File

@ -83,6 +83,19 @@ var envConstruction = [
desc: '@@widthwarn@@' desc: '@@widthwarn@@'
} }
}, },
{
id: 'margin',
storage: 'margin',
checkbox: false,
doubleText: false,
setValue: 0,
width: 50,
text: {
head: '@@margin@@',
desc: '',
after: 'px'
}
},
{ {
id: 'fixwidth', id: 'fixwidth',
storage: 'fixwidth', storage: 'fixwidth',