diff --git a/app/build/appx/Square150x150Logo.png b/app/build/appx/Square150x150Logo.png index 7615a923..db2245c2 100644 Binary files a/app/build/appx/Square150x150Logo.png and b/app/build/appx/Square150x150Logo.png differ diff --git a/app/build/appx/Square44x44Logo.png b/app/build/appx/Square44x44Logo.png index 418feb75..fe2f66e1 100644 Binary files a/app/build/appx/Square44x44Logo.png and b/app/build/appx/Square44x44Logo.png differ diff --git a/app/build/appx/StoreLogo.png b/app/build/appx/StoreLogo.png index 5d548758..a431cc37 100644 Binary files a/app/build/appx/StoreLogo.png and b/app/build/appx/StoreLogo.png differ diff --git a/app/build/thedesk.ico b/app/build/thedesk.ico index ced540c0..d4c57cad 100644 Binary files a/app/build/thedesk.ico and b/app/build/thedesk.ico differ diff --git a/app/css/master.css b/app/css/master.css index e96f2104..759ae103 100644 --- a/app/css/master.css +++ b/app/css/master.css @@ -563,7 +563,7 @@ textarea { font-family: 'Open Sans'; font-style: normal; font-weight: 300; - src: local('Open Sans Light'), local('OpenSans-Light'), url('./fonts/OpenSans-Light.ttf') format('truetype'); + src: local('Open Sans Light'), local('OpenSans-Light'), url('../fonts/OpenSans-Light.ttf') format('truetype'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { diff --git a/app/img/icons/icon-128x128.png b/app/img/icons/icon-128x128.png index fdcb5bda..ad6ce53e 100644 Binary files a/app/img/icons/icon-128x128.png and b/app/img/icons/icon-128x128.png differ diff --git a/app/img/icons/icon-144x144.png b/app/img/icons/icon-144x144.png index 3b665b01..cfbf5659 100644 Binary files a/app/img/icons/icon-144x144.png and b/app/img/icons/icon-144x144.png differ diff --git a/app/img/icons/icon-152x152.png b/app/img/icons/icon-152x152.png index 3d08d91e..d722f45e 100644 Binary files a/app/img/icons/icon-152x152.png and b/app/img/icons/icon-152x152.png differ diff --git a/app/img/icons/icon-192x192.png b/app/img/icons/icon-192x192.png index d98f2d9b..f0bb3ab1 100644 Binary files a/app/img/icons/icon-192x192.png and b/app/img/icons/icon-192x192.png differ diff --git a/app/img/icons/icon-384x384.png b/app/img/icons/icon-384x384.png index a96ca2b2..17a4401d 100644 Binary files a/app/img/icons/icon-384x384.png and b/app/img/icons/icon-384x384.png differ diff --git a/app/img/icons/icon-512x512.png b/app/img/icons/icon-512x512.png index 8ba2187c..d2d6224d 100644 Binary files a/app/img/icons/icon-512x512.png and b/app/img/icons/icon-512x512.png differ diff --git a/app/img/icons/icon-72x72.png b/app/img/icons/icon-72x72.png index 0fab31bd..64f3d020 100644 Binary files a/app/img/icons/icon-72x72.png and b/app/img/icons/icon-72x72.png differ diff --git a/app/img/icons/icon-96x96.png b/app/img/icons/icon-96x96.png index fd7261e6..1e09fcc2 100644 Binary files a/app/img/icons/icon-96x96.png and b/app/img/icons/icon-96x96.png differ diff --git a/app/js/tl/filter.js b/app/js/tl/filter.js index 18078579..f5fcf386 100644 --- a/app/js/tl/filter.js +++ b/app/js/tl/filter.js @@ -14,6 +14,46 @@ function mediaToggle(tlid) { $('#timeline_' + tlid).addClass('media-filter') } } +/* Remote only */ +function remoteOnly(tlid, type) { + var multi = localStorage.getItem('column') + var obj = JSON.parse(multi) + if (obj[tlid].data) { + if (obj[tlid].data.remote) { + obj[tlid].data.remote = false + var json = JSON.stringify(obj) + localStorage.setItem('column', json) + $('#sta-remote-' + tlid).text('Off') + $('#sta-remote-' + tlid).css('color', '#009688') + } else { + obj[tlid].data.remote = true + var json = JSON.stringify(obj) + localStorage.setItem('column', json) + $('#sta-remote-' + tlid).text('On') + $('#sta-remote-' + tlid).css('color', 'red') + } + } else { + obj[tlid].data = {} + obj[tlid].data.remote = true + var json = JSON.stringify(obj) + localStorage.setItem('column', json) + $('#sta-remote-' + tlid).text('On') + $('#sta-remote-' + tlid).css('color', 'red') + } + columnReload(tlid, type) +} +function remoteOnlyCk(tlid) { + var multi = localStorage.getItem('column') + var obj = JSON.parse(multi) + if (obj[tlid].data) { + if (obj[tlid].data.remote) { + $('#sta-remote-' + tlid).text('On') + $('#sta-remote-' + tlid).css('color', 'red') + return true + } + } + return false +} //各TL上方のBT[BTOnly/BTExc/Off] function ebtToggle(tlid) { var ebt = localStorage.getItem('ebt_' + tlid) @@ -117,26 +157,26 @@ function filter() { method: 'GET', headers: { 'content-type': 'application/json', - Authorization: 'Bearer ' + at - } + Authorization: 'Bearer ' + at, + }, }) - .then(function(response) { + .then(function (response) { if (!response.ok) { - response.text().then(function(text) { + response.text().then(function (text) { setLog(response.url, response.status, text) }) } return response.json() }) - .catch(function(error) { + .catch(function (error) { todo(error) setLog(start, 'JSON', error) console.error(error) }) - .then(function(json) { + .then(function (json) { if (json) { var filters = '' - Object.keys(json).forEach(function(key) { + Object.keys(json).forEach(function (key) { var filterword = json[key] var context = filterword.context.join(',') filters = @@ -191,10 +231,7 @@ function makeNewFilter() { if (!who) { who = false } - var time = - $('#days_filter').val() * 24 * 60 * 60 + - $('#hours_filter').val() * 60 * 60 + - $('#mins_filter').val() * 60 + var time = $('#days_filter').val() * 24 * 60 * 60 + $('#hours_filter').val() * 60 * 60 + $('#mins_filter').val() * 60 var domain = localStorage.getItem('domain_' + acct_id) var at = localStorage.getItem('acct_' + acct_id + '_at') if ($('#filter-edit-id').val()) { @@ -216,10 +253,10 @@ function makeNewFilter() { context: cont, irreversible: exc, whole_word: who, - expires_in: time + expires_in: time, }) ) - httpreq.onreadystatechange = function() { + httpreq.onreadystatechange = function () { if (httpreq.readyState === 4) { var json = httpreq.response if (this.status !== 200) { @@ -263,29 +300,29 @@ function filterEdit(id, acct_id) { method: 'GET', headers: { 'content-type': 'application/json', - Authorization: 'Bearer ' + at - } + Authorization: 'Bearer ' + at, + }, }) - .then(function(response) { + .then(function (response) { if (!response.ok) { - response.text().then(function(text) { + response.text().then(function (text) { setLog(response.url, response.status, text) }) } return response.json() }) - .catch(function(error) { + .catch(function (error) { todo(error) setLog(start, 'JSON', error) console.error(error) }) - .then(function(json) { + .then(function (json) { if (json) { var now = new Date() now = now.getTime() var now = Math.floor(now / 1000) $('#filter-add-word').val(json.phrase) - Object.keys(json.context).forEach(function(key) { + Object.keys(json.context).forEach(function (key) { var context = json.context[key] $('[value=' + context + ']').prop('checked', true) }) @@ -315,7 +352,7 @@ function filterDel(id, acct_id) { httpreq.setRequestHeader('Authorization', 'Bearer ' + at) httpreq.responseType = 'json' httpreq.send() - httpreq.onreadystatechange = function() { + httpreq.onreadystatechange = function () { if (httpreq.readyState === 4) { var json = httpreq.response if (this.status !== 200) { @@ -335,23 +372,23 @@ function getFilter(acct_id) { method: 'GET', headers: { 'content-type': 'application/json', - Authorization: 'Bearer ' + at - } + Authorization: 'Bearer ' + at, + }, }) - .then(function(response) { + .then(function (response) { if (!response.ok) { - response.text().then(function(text) { + response.text().then(function (text) { setLog(response.url, response.status, text) }) } return response.json() }) - .catch(function(error) { + .catch(function (error) { todo(error) setLog(start, 'JSON', error) console.error(error) }) - .then(function(json) { + .then(function (json) { localStorage.setItem('filter_' + acct_id, JSON.stringify(json)) }) } else { @@ -370,13 +407,13 @@ function getFilterType(json, type) { type = 'notifi' } var mutedfilters = [] - Object.keys(json).forEach(function(key) { + Object.keys(json).forEach(function (key) { var filterword = json[key] var phrases = filterword.phrase var arr = filterword.context if (arr.join(',').indexOf(type) !== -1) { mutedfilters.push(phrases) - } else if (type == 'mix'){ + } else if (type == 'mix') { if (arr.indexOf('home') !== -1 || arr.indexOf('public') !== -1) { mutedfilters.push(phrases) } @@ -400,23 +437,23 @@ function filterUpdate(acct_id) { method: 'GET', headers: { 'content-type': 'application/json', - Authorization: 'Bearer ' + at - } + Authorization: 'Bearer ' + at, + }, }) - .then(function(response) { + .then(function (response) { if (!response.ok) { - response.text().then(function(text) { + response.text().then(function (text) { setLog(response.url, response.status, text) }) } return response.json() }) - .catch(function(error) { + .catch(function (error) { todo(error) setLog(start, 'JSON', error) console.error(error) }) - .then(function(json) { + .then(function (json) { localStorage.setItem('filter_' + acct_id, JSON.stringify(json)) filterUpdateInternal(json, 'home') filterUpdateInternal(json, 'local') @@ -432,13 +469,11 @@ function filterUpdateInternal(json, type) { home = home.concat(wordmute) } if (home) { - $('[data-acct=' + acct_id + '] [data-type=' + type + '] .cvo').each(function(i, elem) { + $('[data-acct=' + acct_id + '] [data-type=' + type + '] .cvo').each(function (i, elem) { var id = $(elem).attr('toot-id') $('[toot-id=' + id + ']').removeClass('hide') - var text = $(elem) - .find('.toot') - .html() - Object.keys(home).forEach(function(key8) { + var text = $(elem).find('.toot').html() + Object.keys(home).forEach(function (key8) { var word = home[key8] var regExp = new RegExp(word.replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&'), 'g') if ($.strip_tags(text).match(regExp)) { diff --git a/app/js/tl/tl.js b/app/js/tl/tl.js index 19b01378..abe5ed5c 100644 --- a/app/js/tl/tl.js +++ b/app/js/tl/tl.js @@ -158,7 +158,7 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) { } } else { var misskey = false - var url = com(type, data) + var url = com(type, data, tlid) if (type == 'tag') { var tag = localStorage.getItem('tag-range') if (tag == 'local') { @@ -256,10 +256,17 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) { if (type == 'home') { var start = wss + '/api/v1/streaming/?stream=user&access_token=' + at } else if (type == 'pub') { - var start = wss + '/api/v1/streaming/?stream=public&access_token=' + at + var add = '' + if(remoteOnlyCk(tlid)){ + add = '&remote=true' + } + var start = wss + '/api/v1/streaming/?stream=public&access_token=' + at + add } else if (type == 'pub-media') { - var start = - wss + '/api/v1/streaming/?stream=public:media&access_token=' + at + var add = '' + if(remoteOnlyCk(tlid)){ + add = '&remote=true' + }var start = + wss + '/api/v1/streaming/?stream=public:media&access_token=' + at + add } else if (type == 'local') { var start = wss + '/api/v1/streaming/?stream=public:local&access_token=' + at @@ -532,7 +539,7 @@ function moreload(type, tlid) { 'https://' + domain + '/api/v1/timelines/' + - com(type, data) + + com(type, data, tlid) + 'max_id=' + sid if (type == 'dm') { @@ -665,7 +672,7 @@ function tlDiff(type, data, acct_id, tlid, delc, voice, mode) { 'https://' + domain + '/api/v1/timelines/' + - com(type, data) + + com(type, data, tlid) + 'since_id=' + sid if (type == 'dm') { @@ -850,7 +857,7 @@ function cap(type, data, acct_id) { } //TLのURL -function com(type, data) { +function com(type, data, tlid) { if (type == 'home') { return 'home?' } else if (type == 'local' || type == 'noauth') { @@ -858,9 +865,17 @@ function com(type, data) { } else if (type == 'local-media') { return 'public?local=true&only_media=true&' } else if (type == 'pub') { - return 'public?' + var add = '' + if(remoteOnlyCk(tlid)){ + add = 'remote=true&' + } + return 'public?' + add } else if (type == 'pub-media') { - return 'public?only_media=true&' + var add = '' + if(remoteOnlyCk(tlid)){ + add = 'remote=true&' + } + return 'public?only_media=true&' + add } else if (type == 'tag') { if (data.name) { var name = data.name diff --git a/app/js/ui/layout.js b/app/js/ui/layout.js index a2ab9465..0a2c50bc 100644 --- a/app/js/ui/layout.js +++ b/app/js/ui/layout.js @@ -354,6 +354,18 @@ function parseColumn(target, dontclose) { } else { var addHeight = '' } + if (acct.type != 'pub' && acct.type != 'pub-media') { + console.log(acct.type, key) + var mediaFil = ` + perm_media + On + ${lang.lang_layout_mediafil}` + } else { + var mediaFil = ` + perm_media + Off + ${lang.lang_layout_remoteOnly}` + } var html = `