Update standard to the latest version 🚀 (#519)

* chore(package): update standard to version 12.0.0

* package lock update

* fix eslint
This commit is contained in:
greenkeeper[bot] 2018-08-29 21:42:57 -07:00 committed by Nolan Lawson
parent d599f2f308
commit 8dbc1b0503
122 changed files with 810 additions and 820 deletions

View File

@ -15,7 +15,7 @@ async function main () {
let checksum = crypto.createHash('sha256').update(headScript).digest('base64')
let checksumFilepath = path.join(__dirname, '../inline-script-checksum.json')
await writeFile(checksumFilepath, JSON.stringify({checksum}), 'utf8')
await writeFile(checksumFilepath, JSON.stringify({ checksum }), 'utf8')
let html2xxFilepath = path.join(__dirname, '../templates/2xx.html')
let html2xxFile = await readFile(html2xxFilepath, 'utf8')

View File

@ -37,9 +37,9 @@ function doWatch () {
async function compileGlobalSass () {
let results = await Promise.all([
render({file: defaultThemeScss, outputStyle: 'compressed'}),
render({file: globalScss, outputStyle: 'compressed'}),
render({file: offlineThemeScss, outputStyle: 'compressed'})
render({ file: defaultThemeScss, outputStyle: 'compressed' }),
render({ file: globalScss, outputStyle: 'compressed' }),
render({ file: offlineThemeScss, outputStyle: 'compressed' })
])
let css = results.map(_ => _.css).join('')
@ -54,7 +54,7 @@ async function compileGlobalSass () {
async function compileThemesSass () {
let files = (await readdir(themesScssDir)).filter(file => !path.basename(file).startsWith('_'))
await Promise.all(files.map(async file => {
let res = await render({file: path.join(themesScssDir, file), outputStyle: 'compressed'})
let res = await render({ file: path.join(themesScssDir, file), outputStyle: 'compressed' })
let outputFilename = 'theme-' + path.basename(file).replace(/\.scss$/, '.css')
await writeFile(path.join(assetsDir, outputFilename), res.css, 'utf8')
}))

View File

@ -56,24 +56,24 @@ async function setupMastodonDatabase () {
try {
await exec(`dropdb -h 127.0.0.1 -U ${DB_USER} -w ${DB_NAME}`, {
cwd: mastodonDir,
env: Object.assign({PGPASSWORD: DB_PASS}, process.env)
env: Object.assign({ PGPASSWORD: DB_PASS }, process.env)
})
} catch (e) { /* ignore */ }
await exec(`createdb -h 127.0.0.1 -U ${DB_USER} -w ${DB_NAME}`, {
cwd: mastodonDir,
env: Object.assign({PGPASSWORD: DB_PASS}, process.env)
env: Object.assign({ PGPASSWORD: DB_PASS }, process.env)
})
let dumpFile = path.join(dir, '../fixtures/dump.sql')
await exec(`psql -h 127.0.0.1 -U ${DB_USER} -w -d ${DB_NAME} -f "${dumpFile}"`, {
cwd: mastodonDir,
env: Object.assign({PGPASSWORD: DB_PASS}, process.env)
env: Object.assign({ PGPASSWORD: DB_PASS }, process.env)
})
let tgzFile = path.join(dir, '../fixtures/system.tgz')
let systemDir = path.join(mastodonDir, 'public/system')
await mkdirp(systemDir)
await exec(`tar -xzf "${tgzFile}"`, {cwd: systemDir})
await exec(`tar -xzf "${tgzFile}"`, { cwd: systemDir })
}
async function runMastodon () {
@ -97,10 +97,10 @@ async function runMastodon () {
for (let cmd of cmds) {
console.log(cmd)
await exec(cmd, {cwd, env})
await exec(cmd, { cwd, env })
}
const promise = spawn('foreman', ['start'], {cwd, env})
const log = fs.createWriteStream('mastodon.log', {flags: 'a'})
const promise = spawn('foreman', ['start'], { cwd, env })
const log = fs.createWriteStream('mastodon.log', { flags: 'a' })
childProc = promise.childProcess
childProc.stdout.pipe(log)
childProc.stderr.pipe(log)

View File

@ -1,40 +1,40 @@
module.exports = [
{id: 'pinafore-logo', src: 'original-assets/sailboat.svg', title: 'Home'},
{id: 'fa-bell', src: 'node_modules/font-awesome-svg-png/white/svg/bell.svg', title: 'Notifications'},
{id: 'fa-users', src: 'node_modules/font-awesome-svg-png/white/svg/users.svg', title: 'Local'},
{id: 'fa-globe', src: 'node_modules/font-awesome-svg-png/white/svg/globe.svg', title: 'Federated'},
{id: 'fa-gear', src: 'node_modules/font-awesome-svg-png/white/svg/gear.svg', title: 'Settings'},
{id: 'fa-reply', src: 'node_modules/font-awesome-svg-png/white/svg/reply.svg', title: 'Reply'},
{id: 'fa-reply-all', src: 'node_modules/font-awesome-svg-png/white/svg/reply-all.svg', title: 'Reply to thread'},
{id: 'fa-retweet', src: 'node_modules/font-awesome-svg-png/white/svg/retweet.svg', title: 'Boost'},
{id: 'fa-star', src: 'node_modules/font-awesome-svg-png/white/svg/star.svg', title: 'Favorite'},
{id: 'fa-ellipsis-h', src: 'node_modules/font-awesome-svg-png/white/svg/ellipsis-h.svg', title: 'More'},
{id: 'fa-spinner', src: 'node_modules/font-awesome-svg-png/white/svg/spinner.svg', title: 'Spinner'},
{id: 'fa-user', src: 'node_modules/font-awesome-svg-png/white/svg/user.svg', title: 'Empty user profile'},
{id: 'fa-play-circle', src: 'node_modules/font-awesome-svg-png/white/svg/play-circle.svg', title: 'Play'},
{id: 'fa-eye', src: 'node_modules/font-awesome-svg-png/white/svg/eye.svg', title: 'Show Sensitive Content'},
{id: 'fa-eye-slash', src: 'node_modules/font-awesome-svg-png/white/svg/eye-slash.svg', title: 'Hide Sensitive Content'},
{id: 'fa-lock', src: 'node_modules/font-awesome-svg-png/white/svg/lock.svg', title: 'Locked'},
{id: 'fa-unlock', src: 'node_modules/font-awesome-svg-png/white/svg/unlock.svg', title: 'Unlocked'},
{id: 'fa-envelope', src: 'node_modules/font-awesome-svg-png/white/svg/envelope.svg', title: 'Sealed Envelope'},
{id: 'fa-user-times', src: 'node_modules/font-awesome-svg-png/white/svg/user-times.svg', title: 'Stop Following'},
{id: 'fa-user-plus', src: 'node_modules/font-awesome-svg-png/white/svg/user-plus.svg', title: 'Follow'},
{id: 'fa-external-link', src: 'node_modules/font-awesome-svg-png/white/svg/external-link.svg', title: 'External Link'},
{id: 'fa-search', src: 'node_modules/font-awesome-svg-png/white/svg/search.svg', title: 'Search'},
{id: 'fa-comments', src: 'node_modules/font-awesome-svg-png/white/svg/comments.svg', title: 'Conversations'},
{id: 'fa-paperclip', src: 'node_modules/font-awesome-svg-png/white/svg/paperclip.svg', title: 'Paperclip'},
{id: 'fa-thumb-tack', src: 'node_modules/font-awesome-svg-png/white/svg/thumb-tack.svg', title: 'Thumbtack'},
{id: 'fa-bars', src: 'node_modules/font-awesome-svg-png/white/svg/bars.svg', title: 'List'},
{id: 'fa-ban', src: 'node_modules/font-awesome-svg-png/white/svg/ban.svg', title: 'Ban'},
{id: 'fa-camera', src: 'node_modules/font-awesome-svg-png/white/svg/camera.svg', title: 'Add media'},
{id: 'fa-smile', src: 'node_modules/font-awesome-svg-png/white/svg/smile-o.svg', title: 'Custom emoji'},
{id: 'fa-exclamation-triangle', src: 'node_modules/font-awesome-svg-png/white/svg/exclamation-triangle.svg', title: 'Content warning'},
{id: 'fa-check', src: 'node_modules/font-awesome-svg-png/white/svg/check.svg', title: 'Check'},
{id: 'fa-trash', src: 'node_modules/font-awesome-svg-png/white/svg/trash-o.svg', title: 'Delete'},
{id: 'fa-hourglass', src: 'node_modules/font-awesome-svg-png/white/svg/hourglass.svg', title: 'Follow requested'},
{id: 'fa-pencil', src: 'node_modules/font-awesome-svg-png/white/svg/pencil.svg', title: 'Compose'},
{id: 'fa-times', src: 'node_modules/font-awesome-svg-png/white/svg/times.svg', title: 'Close'},
{id: 'fa-volume-off', src: 'node_modules/font-awesome-svg-png/white/svg/volume-off.svg', title: 'Mute'},
{id: 'fa-volume-up', src: 'node_modules/font-awesome-svg-png/white/svg/volume-up.svg', title: 'Unmute'},
{id: 'fa-link', src: 'node_modules/font-awesome-svg-png/white/svg/link.svg', title: 'Link'}
{ id: 'pinafore-logo', src: 'original-assets/sailboat.svg', title: 'Home' },
{ id: 'fa-bell', src: 'node_modules/font-awesome-svg-png/white/svg/bell.svg', title: 'Notifications' },
{ id: 'fa-users', src: 'node_modules/font-awesome-svg-png/white/svg/users.svg', title: 'Local' },
{ id: 'fa-globe', src: 'node_modules/font-awesome-svg-png/white/svg/globe.svg', title: 'Federated' },
{ id: 'fa-gear', src: 'node_modules/font-awesome-svg-png/white/svg/gear.svg', title: 'Settings' },
{ id: 'fa-reply', src: 'node_modules/font-awesome-svg-png/white/svg/reply.svg', title: 'Reply' },
{ id: 'fa-reply-all', src: 'node_modules/font-awesome-svg-png/white/svg/reply-all.svg', title: 'Reply to thread' },
{ id: 'fa-retweet', src: 'node_modules/font-awesome-svg-png/white/svg/retweet.svg', title: 'Boost' },
{ id: 'fa-star', src: 'node_modules/font-awesome-svg-png/white/svg/star.svg', title: 'Favorite' },
{ id: 'fa-ellipsis-h', src: 'node_modules/font-awesome-svg-png/white/svg/ellipsis-h.svg', title: 'More' },
{ id: 'fa-spinner', src: 'node_modules/font-awesome-svg-png/white/svg/spinner.svg', title: 'Spinner' },
{ id: 'fa-user', src: 'node_modules/font-awesome-svg-png/white/svg/user.svg', title: 'Empty user profile' },
{ id: 'fa-play-circle', src: 'node_modules/font-awesome-svg-png/white/svg/play-circle.svg', title: 'Play' },
{ id: 'fa-eye', src: 'node_modules/font-awesome-svg-png/white/svg/eye.svg', title: 'Show Sensitive Content' },
{ id: 'fa-eye-slash', src: 'node_modules/font-awesome-svg-png/white/svg/eye-slash.svg', title: 'Hide Sensitive Content' },
{ id: 'fa-lock', src: 'node_modules/font-awesome-svg-png/white/svg/lock.svg', title: 'Locked' },
{ id: 'fa-unlock', src: 'node_modules/font-awesome-svg-png/white/svg/unlock.svg', title: 'Unlocked' },
{ id: 'fa-envelope', src: 'node_modules/font-awesome-svg-png/white/svg/envelope.svg', title: 'Sealed Envelope' },
{ id: 'fa-user-times', src: 'node_modules/font-awesome-svg-png/white/svg/user-times.svg', title: 'Stop Following' },
{ id: 'fa-user-plus', src: 'node_modules/font-awesome-svg-png/white/svg/user-plus.svg', title: 'Follow' },
{ id: 'fa-external-link', src: 'node_modules/font-awesome-svg-png/white/svg/external-link.svg', title: 'External Link' },
{ id: 'fa-search', src: 'node_modules/font-awesome-svg-png/white/svg/search.svg', title: 'Search' },
{ id: 'fa-comments', src: 'node_modules/font-awesome-svg-png/white/svg/comments.svg', title: 'Conversations' },
{ id: 'fa-paperclip', src: 'node_modules/font-awesome-svg-png/white/svg/paperclip.svg', title: 'Paperclip' },
{ id: 'fa-thumb-tack', src: 'node_modules/font-awesome-svg-png/white/svg/thumb-tack.svg', title: 'Thumbtack' },
{ id: 'fa-bars', src: 'node_modules/font-awesome-svg-png/white/svg/bars.svg', title: 'List' },
{ id: 'fa-ban', src: 'node_modules/font-awesome-svg-png/white/svg/ban.svg', title: 'Ban' },
{ id: 'fa-camera', src: 'node_modules/font-awesome-svg-png/white/svg/camera.svg', title: 'Add media' },
{ id: 'fa-smile', src: 'node_modules/font-awesome-svg-png/white/svg/smile-o.svg', title: 'Custom emoji' },
{ id: 'fa-exclamation-triangle', src: 'node_modules/font-awesome-svg-png/white/svg/exclamation-triangle.svg', title: 'Content warning' },
{ id: 'fa-check', src: 'node_modules/font-awesome-svg-png/white/svg/check.svg', title: 'Check' },
{ id: 'fa-trash', src: 'node_modules/font-awesome-svg-png/white/svg/trash-o.svg', title: 'Delete' },
{ id: 'fa-hourglass', src: 'node_modules/font-awesome-svg-png/white/svg/hourglass.svg', title: 'Follow requested' },
{ id: 'fa-pencil', src: 'node_modules/font-awesome-svg-png/white/svg/pencil.svg', title: 'Compose' },
{ id: 'fa-times', src: 'node_modules/font-awesome-svg-png/white/svg/times.svg', title: 'Close' },
{ id: 'fa-volume-off', src: 'node_modules/font-awesome-svg-png/white/svg/volume-off.svg', title: 'Mute' },
{ id: 'fa-volume-up', src: 'node_modules/font-awesome-svg-png/white/svg/volume-up.svg', title: 'Unmute' },
{ id: 'fa-link', src: 'node_modules/font-awesome-svg-png/white/svg/link.svg', title: 'Link' }
]

814
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -105,7 +105,7 @@
"devDependencies": {
"eslint-plugin-html": "^4.0.5",
"now": "^11.4.0",
"standard": "^11.0.1",
"standard": "^12.0.0",
"testcafe": "^0.21.1"
},
"engines": {

View File

@ -11,12 +11,12 @@ async function _updateAccount (accountId, instanceName, accessToken) {
})
try {
store.set({currentAccountProfile: (await localPromise)})
store.set({ currentAccountProfile: (await localPromise) })
} catch (e) {
console.error(e)
}
try {
store.set({currentAccountProfile: (await remotePromise)})
store.set({ currentAccountProfile: (await remotePromise) })
} catch (e) {
console.error(e)
}
@ -29,12 +29,12 @@ async function _updateRelationship (accountId, instanceName, accessToken) {
return relationship
})
try {
store.set({currentAccountRelationship: (await localPromise)})
store.set({ currentAccountRelationship: (await localPromise) })
} catch (e) {
console.error(e)
}
try {
store.set({currentAccountRelationship: (await remotePromise)})
store.set({ currentAccountRelationship: (await remotePromise) })
} catch (e) {
console.error(e)
}
@ -43,7 +43,7 @@ async function _updateRelationship (accountId, instanceName, accessToken) {
export async function updateLocalRelationship (instanceName, accountId, relationship) {
await database.setRelationship(instanceName, relationship)
try {
store.set({currentAccountRelationship: relationship})
store.set({ currentAccountRelationship: relationship })
} catch (e) {
console.error(e)
}

View File

@ -14,7 +14,7 @@ async function redirectToOauth () {
let { instanceNameInSearch, loggedInInstances } = store.get()
instanceNameInSearch = instanceNameInSearch.replace(/^https?:\/\//, '').replace(/\/$/, '').replace('/$', '').toLowerCase()
if (Object.keys(loggedInInstances).includes(instanceNameInSearch)) {
store.set({logInToInstanceError: `You've already logged in to ${instanceNameInSearch}`})
store.set({ logInToInstanceError: `You've already logged in to ${instanceNameInSearch}` })
return
}
let registrationPromise = registerApplication(instanceNameInSearch, REDIRECT_URI)
@ -54,7 +54,7 @@ export async function logInToInstance () {
logInToInstanceErrorForText: instanceNameInSearch
})
} finally {
store.set({logInToInstanceLoading: false})
store.set({ logInToInstanceLoading: false })
}
}
@ -92,11 +92,11 @@ async function registerNewInstance (code) {
export async function handleOauthCode (code) {
try {
store.set({logInToInstanceLoading: true})
store.set({ logInToInstanceLoading: true })
await registerNewInstance(code)
} catch (err) {
store.set({logInToInstanceError: `${err.message || err.name}. Failed to connect to instance.`})
store.set({ logInToInstanceError: `${err.message || err.name}. Failed to connect to instance.` })
} finally {
store.set({logInToInstanceLoading: false})
store.set({ logInToInstanceLoading: false })
}
}

View File

@ -34,7 +34,7 @@ async function insertUpdatesIntoTimeline (instanceName, timelineName, updates) {
if (!isEqual(itemIdsToAdd, newItemIdsToAdd)) {
console.log('adding ', (newItemIdsToAdd.length - itemIdsToAdd.length),
'items to itemIdsToAdd for timeline', timelineName)
store.setForTimeline(instanceName, timelineName, {itemIdsToAdd: newItemIdsToAdd})
store.setForTimeline(instanceName, timelineName, { itemIdsToAdd: newItemIdsToAdd })
}
}
@ -58,7 +58,7 @@ async function insertUpdatesIntoThreads (instanceName, updates) {
if (!isEqual(itemIdsToAdd, newItemIdsToAdd)) {
console.log('adding ', (newItemIdsToAdd.length - itemIdsToAdd.length),
'items to itemIdsToAdd for thread', timelineName)
store.setForTimeline(instanceName, timelineName, {itemIdsToAdd: newItemIdsToAdd})
store.setForTimeline(instanceName, timelineName, { itemIdsToAdd: newItemIdsToAdd })
}
}
}
@ -68,7 +68,7 @@ async function processFreshUpdates (instanceName, timelineName) {
let freshUpdates = store.getForTimeline(instanceName, timelineName, 'freshUpdates')
if (freshUpdates && freshUpdates.length) {
let updates = freshUpdates.slice()
store.setForTimeline(instanceName, timelineName, {freshUpdates: []})
store.setForTimeline(instanceName, timelineName, { freshUpdates: [] })
await Promise.all([
insertUpdatesIntoTimeline(instanceName, timelineName, updates),
@ -93,6 +93,6 @@ export function addStatusesOrNotifications (instanceName, timelineName, newStatu
let freshUpdates = store.getForTimeline(instanceName, timelineName, 'freshUpdates') || []
freshUpdates = [].concat(freshUpdates).concat(newStatusesOrNotifications)
freshUpdates = uniqBy(freshUpdates, _ => _.id)
store.setForTimeline(instanceName, timelineName, {freshUpdates: freshUpdates})
store.setForTimeline(instanceName, timelineName, { freshUpdates: freshUpdates })
lazilyProcessFreshUpdates(instanceName, timelineName)
}

View File

@ -6,8 +6,8 @@ export async function insertUsername (realm, username, startIndex, endIndex) {
let pre = oldText.substring(0, startIndex)
let post = oldText.substring(endIndex)
let newText = `${pre}@${username} ${post}`
store.setComposeData(realm, {text: newText})
store.setForAutosuggest(currentInstance, realm, {autosuggestSearchResults: []})
store.setComposeData(realm, { text: newText })
store.setForAutosuggest(currentInstance, realm, { autosuggestSearchResults: [] })
}
export async function clickSelectedAutosuggestionUsername (realm) {
@ -29,8 +29,8 @@ export function insertEmojiAtPosition (realm, emoji, startIndex, endIndex) {
let pre = oldText.substring(0, startIndex)
let post = oldText.substring(endIndex)
let newText = `${pre}:${emoji.shortcode}: ${post}`
store.setComposeData(realm, {text: newText})
store.setForAutosuggest(currentInstance, realm, {autosuggestSearchResults: []})
store.setComposeData(realm, { text: newText })
store.setForAutosuggest(currentInstance, realm, { autosuggestSearchResults: [] })
}
export async function clickSelectedAutosuggestionEmoji (realm) {

View File

@ -49,7 +49,7 @@ export async function postStatus (realm, text, inReplyToId, mediaIds,
console.error(e)
toast.say('Unable to post status: ' + (e.message || ''))
} finally {
store.set({postingStatus: false})
store.set({ postingStatus: false })
}
}
@ -84,5 +84,5 @@ export function setReplyVisibility (realm, replyVisibility) {
let visibility = PRIVACY_LEVEL[replyVisibility] < PRIVACY_LEVEL[defaultVisibility]
? replyVisibility
: defaultVisibility
store.setComposeData(realm, {postPrivacy: visibility})
store.setComposeData(realm, { postPrivacy: visibility })
}

View File

@ -11,7 +11,7 @@ export async function updateCustomEmojiForInstance (instanceName) {
emoji => {
let { customEmoji } = store.get()
customEmoji[instanceName] = emoji
store.set({customEmoji: customEmoji})
store.set({ customEmoji: customEmoji })
}
)
}
@ -23,5 +23,5 @@ export function insertEmoji (realm, emoji) {
let pre = oldText.substring(0, idx)
let post = oldText.substring(idx)
let newText = `${pre}:${emoji.shortcode}: ${post}`
store.setComposeData(realm, {text: newText})
store.setComposeData(realm, { text: newText })
}

View File

@ -3,15 +3,15 @@ import { auth, basename } from '../_api/utils'
export async function getFollowRequests (instanceName, accessToken) {
let url = `${basename(instanceName)}/api/v1/follow_requests`
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}
export async function authorizeFollowRequest (instanceName, accessToken, id) {
let url = `${basename(instanceName)}/api/v1/follow_requests/${id}/authorize`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}
export async function rejectFollowRequest (instanceName, accessToken, id) {
let url = `${basename(instanceName)}/api/v1/follow_requests/${id}/reject`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -10,7 +10,7 @@ import { database } from '../_database/database'
export function changeTheme (instanceName, newTheme) {
let { instanceThemes } = store.get()
instanceThemes[instanceName] = newTheme
store.set({instanceThemes: instanceThemes})
store.set({ instanceThemes: instanceThemes })
store.save()
let { currentInstance } = store.get()
if (instanceName === currentInstance) {
@ -63,7 +63,7 @@ export async function logOutOfInstance (instanceName) {
function setStoreVerifyCredentials (instanceName, thisVerifyCredentials) {
let { verifyCredentials } = store.get()
verifyCredentials[instanceName] = thisVerifyCredentials
store.set({verifyCredentials: verifyCredentials})
store.set({ verifyCredentials: verifyCredentials })
}
export async function updateVerifyCredentialsForInstance (instanceName) {
@ -90,7 +90,7 @@ export async function updateInstanceInfo (instanceName) {
info => {
let { instanceInfos } = store.get()
instanceInfos[instanceName] = info
store.set({instanceInfos: instanceInfos})
store.set({ instanceInfos: instanceInfos })
}
)
}

View File

@ -13,7 +13,7 @@ export async function updateLists () {
lists => {
let { instanceLists } = store.get()
instanceLists[currentInstance] = lists
store.set({instanceLists: instanceLists})
store.set({ instanceLists: instanceLists })
}
)
}

View File

@ -5,7 +5,7 @@ import { scheduleIdleTask } from '../_utils/scheduleIdleTask'
export async function doMediaUpload (realm, file) {
let { currentInstance, accessToken } = store.get()
store.set({uploadingMedia: true})
store.set({ uploadingMedia: true })
try {
let response = await uploadMedia(currentInstance, accessToken, file)
let composeMedia = store.getComposeData(realm, 'media') || []
@ -22,7 +22,7 @@ export async function doMediaUpload (realm, file) {
console.error(e)
toast.say('Failed to upload media: ' + (e.message || ''))
} finally {
store.set({uploadingMedia: false})
store.set({ uploadingMedia: false })
}
}

View File

@ -16,7 +16,7 @@ export async function updatePinnedStatusesForAccount (accountId) {
let { pinnedStatuses } = store.get()
pinnedStatuses[currentInstance] = pinnedStatuses[currentInstance] || {}
pinnedStatuses[currentInstance][accountId] = statuses
store.set({pinnedStatuses: pinnedStatuses})
store.set({ pinnedStatuses: pinnedStatuses })
}
)
}

View File

@ -2,5 +2,5 @@
import { store } from '../_store/store'
export function setPostPrivacy (realm, postPrivacyKey) {
store.setComposeData(realm, {postPrivacy: postPrivacyKey})
store.setComposeData(realm, { postPrivacy: postPrivacyKey })
}

View File

@ -4,7 +4,7 @@ import { search } from '../_api/search'
export async function doSearch () {
let { currentInstance, accessToken, queryInSearch } = store.get()
store.set({searchLoading: true})
store.set({ searchLoading: true })
try {
let results = await search(currentInstance, accessToken, queryInSearch)
let { queryInSearch: newQueryInSearch } = store.get() // avoid race conditions
@ -18,6 +18,6 @@ export async function doSearch () {
toast.say('Error during search: ' + (e.name || '') + ' ' + (e.message || ''))
console.error(e)
} finally {
store.set({searchLoading: false})
store.set({ searchLoading: false })
}
}

View File

@ -72,10 +72,10 @@ export async function addTimelineItemIds (instanceName, timelineName, newIds, ne
let mergedIds = mergeArrays(oldIds || [], newIds)
if (!isEqual(oldIds, mergedIds)) {
store.setForTimeline(instanceName, timelineName, {timelineItemIds: mergedIds})
store.setForTimeline(instanceName, timelineName, { timelineItemIds: mergedIds })
}
if (oldStale !== newStale) {
store.setForTimeline(instanceName, timelineName, {timelineItemIdsAreStale: newStale})
store.setForTimeline(instanceName, timelineName, { timelineItemIdsAreStale: newStale })
}
}

View File

@ -3,10 +3,10 @@ import { post, WRITE_TIMEOUT } from '../_utils/ajax'
export async function blockAccount (instanceName, accessToken, accountId) {
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/block`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}
export async function unblockAccount (instanceName, accessToken, accountId) {
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/unblock`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -3,10 +3,10 @@ import { auth, basename } from './utils'
export async function blockDomain (instanceName, accessToken, domain) {
let url = `${basename(instanceName)}/api/v1/domain_blocks?${paramsString({ domain })}`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}
export async function unblockDomain (instanceName, accessToken, domain) {
let url = `${basename(instanceName)}/api/v1/domain_blocks?${paramsString({ domain })}`
return del(url, auth(accessToken), {timeout: WRITE_TIMEOUT})
return del(url, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -4,11 +4,11 @@ import { auth, basename } from './utils'
export async function getBlockedAccounts (instanceName, accessToken, limit = 80) {
let url = `${basename(instanceName)}/api/v1/blocks`
url += '?' + paramsString({ limit })
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}
export async function getMutedAccounts (instanceName, accessToken, limit = 80) {
let url = `${basename(instanceName)}/api/v1/mutes`
url += '?' + paramsString({ limit })
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}

View File

@ -3,5 +3,5 @@ import { del, WRITE_TIMEOUT } from '../_utils/ajax'
export async function deleteStatus (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}`
return del(url, auth(accessToken), {timeout: WRITE_TIMEOUT})
return del(url, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -3,5 +3,5 @@ import { DEFAULT_TIMEOUT, get } from '../_utils/ajax'
export async function getCustomEmoji (instanceName) {
let url = `${basename(instanceName)}/api/v1/custom_emojis`
return get(url, null, {timeout: DEFAULT_TIMEOUT})
return get(url, null, { timeout: DEFAULT_TIMEOUT })
}

View File

@ -3,10 +3,10 @@ import { basename, auth } from './utils'
export async function favoriteStatus (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/favourite`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}
export async function unfavoriteStatus (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/unfavourite`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -3,10 +3,10 @@ import { auth, basename } from './utils'
export async function followAccount (instanceName, accessToken, accountId) {
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/follow`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}
export async function unfollowAccount (instanceName, accessToken, accountId) {
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/unfollow`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -4,11 +4,11 @@ import { auth, basename } from './utils'
export async function getFollows (instanceName, accessToken, accountId, limit = 80) {
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/following`
url += '?' + paramsString({ limit })
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}
export async function getFollowers (instanceName, accessToken, accountId, limit = 80) {
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/followers`
url += '?' + paramsString({ limit })
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}

View File

@ -3,5 +3,5 @@ import { basename } from './utils'
export function getInstanceInfo (instanceName) {
let url = `${basename(instanceName)}/api/v1/instance`
return get(url, null, {timeout: DEFAULT_TIMEOUT})
return get(url, null, { timeout: DEFAULT_TIMEOUT })
}

View File

@ -3,5 +3,5 @@ import { auth, basename } from './utils'
export function getLists (instanceName, accessToken) {
let url = `${basename(instanceName)}/api/v1/lists`
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}

View File

@ -8,10 +8,10 @@ export async function uploadMedia (instanceName, accessToken, file, description)
formData.append('description', description)
}
let url = `${basename(instanceName)}/api/v1/media`
return post(url, formData, auth(accessToken), {timeout: MEDIA_WRITE_TIMEOUT})
return post(url, formData, auth(accessToken), { timeout: MEDIA_WRITE_TIMEOUT })
}
export async function putMediaDescription (instanceName, accessToken, mediaId, description) {
let url = `${basename(instanceName)}/api/v1/media/${mediaId}`
return put(url, {description}, auth(accessToken), {timeout: WRITE_TIMEOUT})
return put(url, { description }, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -3,10 +3,10 @@ import { post, WRITE_TIMEOUT } from '../_utils/ajax'
export async function muteAccount (instanceName, accessToken, accountId) {
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/mute`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}
export async function unmuteAccount (instanceName, accessToken, accountId) {
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/unmute`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -3,10 +3,10 @@ import { post, WRITE_TIMEOUT } from '../_utils/ajax'
export async function muteConversation (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/mute`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}
export async function unmuteConversation (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/unmute`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -12,7 +12,7 @@ export function registerApplication (instanceName, redirectUri) {
redirect_uris: redirectUri,
scopes: SCOPES,
website: WEBSITE
}, null, {timeout: WRITE_TIMEOUT})
}, null, { timeout: WRITE_TIMEOUT })
}
export function generateAuthLink (instanceName, clientId, redirectUri) {
@ -33,5 +33,5 @@ export function getAccessTokenFromAuthCode (instanceName, clientId, clientSecret
redirect_uri: redirectUri,
grant_type: 'authorization_code',
code: code
}, null, {timeout: WRITE_TIMEOUT})
}, null, { timeout: WRITE_TIMEOUT })
}

View File

@ -3,10 +3,10 @@ import { auth, basename } from './utils'
export async function pinStatus (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/pin`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}
export async function unpinStatus (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/unpin`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -7,5 +7,5 @@ export async function getPinnedStatuses (instanceName, accessToken, accountId) {
limit: 40,
pinned: true
})
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}

View File

@ -4,11 +4,11 @@ import { auth, basename } from './utils'
export async function getReblogs (instanceName, accessToken, statusId, limit = 80) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/reblogged_by`
url += '?' + paramsString({ limit })
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}
export async function getFavorites (instanceName, accessToken, statusId, limit = 80) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/favourited_by`
url += '?' + paramsString({ limit })
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}

View File

@ -2,7 +2,7 @@ import { basename, auth } from './utils'
import { get, paramsString, DEFAULT_TIMEOUT } from '../_utils/ajax'
export async function getRelationship (instanceName, accessToken, accountId) {
let url = `${basename(instanceName)}/api/v1/accounts/relationships?${paramsString({id: accountId})}`
let res = await get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
let url = `${basename(instanceName)}/api/v1/accounts/relationships?${paramsString({ id: accountId })}`
let res = await get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
return res[0]
}

View File

@ -3,10 +3,10 @@ import { auth, basename } from './utils'
export async function approveFollowRequest (instanceName, accessToken, accountId) {
let url = `${basename(instanceName)}/api/v1/follow_requests/${accountId}/authorize`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}
export async function rejectFollowRequest (instanceName, accessToken, accountId) {
let url = `${basename(instanceName)}/api/v1/follow_requests/${accountId}/reject`
return post(url, null, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, null, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -6,5 +6,5 @@ export function search (instanceName, accessToken, query) {
q: query,
resolve: true
})
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}

View File

@ -3,5 +3,5 @@ import { post, WRITE_TIMEOUT } from '../_utils/ajax'
export function setShowReblogs (instanceName, accessToken, accountId, showReblogs) {
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/follow`
return post(url, { reblogs: !!showReblogs }, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, { reblogs: !!showReblogs }, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -22,15 +22,15 @@ export async function postStatus (instanceName, accessToken, text, inReplyToId,
}
}
return post(url, body, auth(accessToken), {timeout: WRITE_TIMEOUT})
return post(url, body, auth(accessToken), { timeout: WRITE_TIMEOUT })
}
export async function getStatusContext (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/context`
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}
export async function getStatus (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}`
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}

View File

@ -49,5 +49,5 @@ export function getTimeline (instanceName, accessToken, timeline, maxId, since)
url += '?' + paramsString(params)
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}

View File

@ -3,5 +3,5 @@ import { auth, basename } from './utils'
export async function updateCredentials (instanceName, accessToken, accountData) {
let url = `${basename(instanceName)}/api/v1/accounts/update_credentials`
return patch(url, accountData, auth(accessToken), {timeout: WRITE_TIMEOUT})
return patch(url, accountData, auth(accessToken), { timeout: WRITE_TIMEOUT })
}

View File

@ -3,10 +3,10 @@ import { auth, basename } from './utils'
export function getVerifyCredentials (instanceName, accessToken) {
let url = `${basename(instanceName)}/api/v1/accounts/verify_credentials`
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}
export function getAccount (instanceName, accessToken, accountId) {
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}`
return get(url, auth(accessToken), {timeout: DEFAULT_TIMEOUT})
return get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
}

View File

@ -45,7 +45,7 @@
} catch (e) {
toast.say('Error: ' + (e.name || '') + ' ' + (e.message || ''))
} finally {
this.set({loading: false})
this.set({ loading: false })
}
on('refreshAccountsList', this, () => this.refreshAccounts())
},

View File

@ -136,7 +136,7 @@
return
}
let svg = this.refs.svg
let animations = animation.map(({properties, options}) => svg.animate(properties, options))
let animations = animation.map(({ properties, options }) => svg.animate(properties, options))
animations.forEach(anim => anim.play())
}
}

View File

@ -30,7 +30,7 @@
this.refs.container.focus()
}
let { page } = this.get()
this.store.set({currentPage: page})
this.store.set({ currentPage: page })
},
store: () => store
}

View File

@ -29,7 +29,7 @@
this.set({ displaySrc: src })
} catch (e) {
if (fallback) {
this.set({displaySrc: fallback})
this.set({ displaySrc: fallback })
}
}
stop('LazyImage oncreate()')
@ -47,7 +47,7 @@
title: ''
}),
computed: {
computedStyle: ({width, height, background}) => {
computedStyle: ({ width, height, background }) => {
return [
width && `width: ${width}px;`,
height && `height: ${height}px;`,

View File

@ -15,7 +15,7 @@
firstTime = false
requestAnimationFrame(() => {
requestAnimationFrame(() => {
this.set({revealed: true})
this.set({ revealed: true })
})
})
},

View File

@ -23,7 +23,7 @@
export default {
oncreate () {
setTimeout(() => {
this.set({shown: true})
this.set({ shown: true })
}, SPINNER_DELAY)
},
data: () => ({

View File

@ -159,16 +159,16 @@
oncreate () {
let { name } = this.get()
let indicator = this.refs.indicator
on('animateNavPart1', this, ({fromPage, toPage}) => {
on('animateNavPart1', this, ({ fromPage, toPage }) => {
if (fromPage !== name) {
return
}
mark('animateNavPart1 gBCR')
let fromRect = indicator.getBoundingClientRect()
stop('animateNavPart1 gBCR')
emit('animateNavPart2', {fromRect, fromPage, toPage})
emit('animateNavPart2', { fromRect, fromPage, toPage })
})
on('animateNavPart2', this, ({fromPage, fromRect, toPage}) => {
on('animateNavPart2', this, ({ fromPage, fromRect, toPage }) => {
if (toPage !== name) {
return
}

View File

@ -44,7 +44,7 @@
export default {
methods: {
onMouseOver (mouseOver) {
this.set({playing: mouseOver})
this.set({ playing: mouseOver })
}
},
events: {

View File

@ -50,7 +50,7 @@
title: ''
}),
computed: {
computedClass: ({className, src, staticSrc, isLink}) => (classname(
computedClass: ({ className, src, staticSrc, isLink }) => (classname(
className,
src !== staticSrc && 'non-autoplay-zoom-in',
isLink && 'is-link'

View File

@ -73,7 +73,7 @@
pinnable: false
}),
computed: {
ariaLabel: ({label, pinnable, $pinnedPage, href}) => {
ariaLabel: ({ label, pinnable, $pinnedPage, href }) => {
let res = label
if (pinnable) {
res += ' (' + ($pinnedPage === href ? 'Pinned page' : 'Unpinned page') + ')'
@ -90,7 +90,7 @@
let { currentInstance, pinnedPages } = this.store.get()
let { href } = this.get()
pinnedPages[currentInstance] = href
this.store.set({pinnedPages: pinnedPages})
this.store.set({ pinnedPages: pinnedPages })
this.store.save()
}
}

View File

@ -59,7 +59,7 @@
])
}
}).then(() => {
this.set({shown: shouldBeShown})
this.set({ shown: shouldBeShown })
})
})
},

View File

@ -231,7 +231,7 @@
},
setupStickyObserver () {
this.__stickyObserver = new IntersectionObserver(entries => {
this.set({sticky: !entries[0].isIntersecting})
this.set({ sticky: !entries[0].isIntersecting })
})
this.__stickyObserver.observe(this.refs.sentinel)
@ -241,12 +241,12 @@
this.observe('timelineInitialized', timelineInitialized => {
if (timelineInitialized) {
let observer = new IntersectionObserver(entries => {
this.set({sticky: !entries[0].isIntersecting})
this.set({ sticky: !entries[0].isIntersecting })
observer.disconnect()
})
observer.observe(this.refs.sentinel)
}
}, {init: false})
}, { init: false })
},
teardownStickyObserver () {
if (this.__stickyObserver) {

View File

@ -32,7 +32,7 @@
observe,
setupSyncFromStore () {
this.observe('contentWarning', contentWarning => {
this.set({rawText: contentWarning})
this.set({ rawText: contentWarning })
})
},
setupSyncToStore () {
@ -44,7 +44,7 @@
contentWarning: rawText
})
saveText()
}, {init: false})
}, { init: false })
}
}
}

View File

@ -56,7 +56,7 @@
this.observe('text', text => {
let { rawText } = this.get()
if (rawText !== text) {
this.set({rawText: text})
this.set({ rawText: text })
// this next autosize is required to resize after
// the user clicks the "toot" button
mark('autosize.update()')
@ -78,10 +78,10 @@
this.observe('rawText', rawText => {
mark('observe rawText')
let { realm } = this.get()
this.store.setComposeData(realm, {text: rawText})
this.store.setComposeData(realm, { text: rawText })
saveStore()
stop('observe rawText')
}, {init: false})
}, { init: false })
},
setupAutosize () {
let textarea = this.refs.textarea
@ -98,19 +98,19 @@
},
onBlur () {
scheduleIdleTask(() => {
this.store.setForCurrentAutosuggest({composeFocused: false})
this.store.setForCurrentAutosuggest({ composeFocused: false })
})
},
onFocus () {
scheduleIdleTask(() => {
let {realm} = this.get()
this.store.set({currentComposeRealm: realm})
this.store.setForCurrentAutosuggest({composeFocused: true})
let { realm } = this.get()
this.store.set({ currentComposeRealm: realm })
this.store.setForCurrentAutosuggest({ composeFocused: true })
})
},
onSelectionChange (selectionStart) {
scheduleIdleTask(() => {
this.store.setForCurrentAutosuggest({composeSelectionStart: selectionStart})
this.store.setForCurrentAutosuggest({ composeSelectionStart: selectionStart })
})
},
onKeydown (e) {
@ -172,7 +172,7 @@
} else {
autosuggestSelected = autosuggestSearchResults.length + autosuggestSelected
}
this.store.setForCurrentAutosuggest({autosuggestSelected})
this.store.setForCurrentAutosuggest({ autosuggestSelected })
event.preventDefault()
event.stopPropagation()
},

View File

@ -26,17 +26,17 @@
export default {
oncreate () {
let { lengthAsFraction } = this.get()
this.set({lengthAsFractionDeferred: lengthAsFraction})
this.set({ lengthAsFractionDeferred: lengthAsFraction })
// perf improvement for keyboard input latency
this.observe('lengthAsFraction', () => {
scheduleIdleTask(() => {
mark('set lengthAsFractionDeferred')
let { lengthAsFraction } = this.get()
this.set({lengthAsFractionDeferred: lengthAsFraction})
this.set({ lengthAsFractionDeferred: lengthAsFraction })
stop('set lengthAsFractionDeferred')
requestAnimationFrame(() => this.set({shouldAnimate: true}))
requestAnimationFrame(() => this.set({ shouldAnimate: true }))
})
}, {init: false})
}, { init: false })
},
data: () => ({
shouldAnimate: false,

View File

@ -24,16 +24,16 @@
export default {
oncreate () {
let { lengthToDisplay } = this.get()
this.set({lengthToDisplayDeferred: lengthToDisplay})
this.set({ lengthToDisplayDeferred: lengthToDisplay })
// perf improvement for keyboard input latency
this.observe('lengthToDisplay', () => {
scheduleIdleTask(() => {
mark('set lengthToDisplayDeferred')
let { lengthToDisplay } = this.get()
this.set({lengthToDisplayDeferred: lengthToDisplay})
this.set({ lengthToDisplayDeferred: lengthToDisplay })
stop('set lengthToDisplayDeferred')
})
}, {init: false})
}, { init: false })
},
data: () => ({
lengthToDisplayDeferred: 0

View File

@ -100,7 +100,7 @@
let { index, rawText } = this.get()
let text = (media[index] && media[index].description) || ''
if (rawText !== text) {
this.set({rawText: text})
this.set({ rawText: text })
}
})
},
@ -113,9 +113,9 @@
return
}
media[index].description = rawText
store.setComposeData(realm, {media})
store.setComposeData(realm, { media })
saveStore()
}, {init: false})
}, { init: false })
},
onDeleteMedia () {
let {

View File

@ -68,7 +68,7 @@
}
},
onPositive () {
this.set({positiveResult: true})
this.set({ positiveResult: true })
this.close()
},
onNegative () {

View File

@ -24,11 +24,11 @@ import { copyText } from '../../../_actions/copyText'
export default {
oncreate,
computed: {
relationship: ({$currentAccountRelationship}) => $currentAccountRelationship,
account: ({$currentAccountProfile}) => $currentAccountProfile,
verifyCredentials: ({$currentVerifyCredentials}) => $currentVerifyCredentials,
statusId: ({status}) => status.id,
pinned: ({statusId, $currentStatusModifications, status}) => {
relationship: ({ $currentAccountRelationship }) => $currentAccountRelationship,
account: ({ $currentAccountProfile }) => $currentAccountProfile,
verifyCredentials: ({ $currentVerifyCredentials }) => $currentVerifyCredentials,
statusId: ({ status }) => status.id,
pinned: ({ statusId, $currentStatusModifications, status }) => {
if ($currentStatusModifications && statusId in $currentStatusModifications.pins) {
return $currentStatusModifications.pins[statusId]
}
@ -37,14 +37,14 @@ export default {
//
// begin copypasta (StatusOptionsDialog.html / AccountProfileOptionsDialog.html)
//
verifyCredentialsId: ({verifyCredentials}) => verifyCredentials.id,
following: ({relationship}) => relationship && relationship.following,
followRequested: ({relationship}) => relationship && relationship.requested,
accountId: ({account}) => account && account.id,
acct: ({account}) => account.acct,
muting: ({relationship}) => relationship.muting,
blocking: ({relationship}) => relationship.blocking,
followLabel: ({following, followRequested, account, acct}) => {
verifyCredentialsId: ({ verifyCredentials }) => verifyCredentials.id,
following: ({ relationship }) => relationship && relationship.following,
followRequested: ({ relationship }) => relationship && relationship.requested,
accountId: ({ account }) => account && account.id,
acct: ({ account }) => account.acct,
muting: ({ relationship }) => relationship.muting,
blocking: ({ relationship }) => relationship.blocking,
followLabel: ({ following, followRequested, account, acct }) => {
if (typeof following === 'undefined' || !account) {
return ''
}
@ -52,28 +52,28 @@ export default {
? `Unfollow @${acct}`
: `Follow @${acct}`
},
followIcon: ({following, followRequested}) => (
followIcon: ({ following, followRequested }) => (
following ? '#fa-user-times' : followRequested ? '#fa-hourglass' : '#fa-user-plus'
),
blockLabel: ({blocking, acct}) => (
blockLabel: ({ blocking, acct }) => (
blocking ? `Unblock @${acct}` : `Block @${acct}`
),
blockIcon: ({blocking}) => blocking ? '#fa-unlock' : '#fa-ban',
muteLabel: ({muting, acct}) => (
blockIcon: ({ blocking }) => blocking ? '#fa-unlock' : '#fa-ban',
muteLabel: ({ muting, acct }) => (
muting ? `Unmute @${acct}` : `Mute @${acct}`
),
muteIcon: ({muting}) => muting ? '#fa-volume-up' : '#fa-volume-off',
isUser: ({accountId, verifyCredentialsId}) => accountId === verifyCredentialsId,
muteIcon: ({ muting }) => muting ? '#fa-volume-up' : '#fa-volume-off',
isUser: ({ accountId, verifyCredentialsId }) => accountId === verifyCredentialsId,
//
// end copypasta (StatusOptionsDialog.html / AccountProfileOptionsDialog.html)
//
pinLabel: ({pinned, isUser}) => isUser ? (pinned ? 'Unpin from profile' : 'Pin to profile') : '',
visibility: ({status}) => status.visibility,
mentions: ({status}) => status.mentions || [],
mentionsUser: ({mentions, verifyCredentialsId}) => !!mentions.find(_ => _.id === verifyCredentialsId),
mutingConversation: ({status}) => !!status.muted,
muteConversationLabel: ({mutingConversation}) => mutingConversation ? `Unmute conversation` : `Mute conversation`,
muteConversationIcon: ({mutingConversation}) => mutingConversation ? '#fa-volume-up' : '#fa-volume-off',
pinLabel: ({ pinned, isUser }) => isUser ? (pinned ? 'Unpin from profile' : 'Pin to profile') : '',
visibility: ({ status }) => status.visibility,
mentions: ({ status }) => status.mentions || [],
mentionsUser: ({ mentions, verifyCredentialsId }) => !!mentions.find(_ => _.id === verifyCredentialsId),
mutingConversation: ({ status }) => !!status.muted,
muteConversationLabel: ({ mutingConversation }) => mutingConversation ? `Unmute conversation` : `Mute conversation`,
muteConversationIcon: ({ mutingConversation }) => mutingConversation ? '#fa-volume-up' : '#fa-volume-off',
items: ({
blockLabel, blocking, blockIcon, muteLabel, muteIcon, followLabel, followIcon,
following, followRequested, pinLabel, isUser, visibility, mentionsUser, mutingConversation,

View File

@ -31,7 +31,7 @@
itemInitialized () {
let { initializedCount, length } = this.get()
initializedCount++
this.set({initializedCount})
this.set({ initializedCount })
if (initializedCount === length) {
this.initialize()
}

View File

@ -18,7 +18,7 @@
if (makeProps) {
let props = await makeProps(key)
mark('ListLazyItem set props')
this.set({props: props})
this.set({ props: props })
this.fire('initialized')
stop('ListLazyItem set props')
}

View File

@ -43,7 +43,7 @@
} else { // follow/unfollow
let newFollowingValue = !(following || followRequested)
if (!account.locked) { // be optimistic, show the user that it succeeded
this.set({overrideFollowing: newFollowingValue})
this.set({ overrideFollowing: newFollowingValue })
}
if (newFollowingValue) {
this.refs.icon.animate(FOLLOW_BUTTON_ANIMATION)

View File

@ -128,7 +128,7 @@
scheduleIdleTask(() => {
// Perf optimization: lazily load the StatusContent when the user is idle so that
// it's fast when they click the "show more" button
this.set({contentPreloaded: true})
this.set({ contentPreloaded: true })
})
}
},

View File

@ -45,7 +45,7 @@
let { uuid } = this.get()
let { repliesShown } = this.store.get()
repliesShown[uuid] = false
this.store.set({repliesShown})
this.store.set({ repliesShown })
this.fire('recalculateHeight')
})
},

View File

@ -148,7 +148,7 @@
let { uuid } = this.get()
let { sensitivesShown } = this.store.get()
sensitivesShown[uuid] = !sensitivesShown[uuid]
this.store.set({sensitivesShown})
this.store.set({ sensitivesShown })
this.fire('recalculateHeight')
}
}

View File

@ -67,7 +67,7 @@
let { uuid } = this.get()
let { spoilersShown } = this.store.get()
spoilersShown[uuid] = !spoilersShown[uuid]
this.store.set({spoilersShown})
this.store.set({ spoilersShown })
this.fire('recalculateHeight')
stop('clickSpoilerButton')
})

View File

@ -107,7 +107,7 @@
let { uuid } = this.get()
let { repliesShown } = this.store.get()
repliesShown[uuid] = !repliesShown[uuid]
this.store.set({repliesShown})
this.store.set({ repliesShown })
this.fire('recalculateHeight')
})
},

View File

@ -20,8 +20,8 @@
oncreate () {
let { currentInstance } = this.store.get()
let { timeline } = this.get()
this.store.set({currentTimeline: timeline})
this.store.setForTimeline(currentInstance, timeline, {runningUpdate: false})
this.store.set({ currentTimeline: timeline })
this.store.setForTimeline(currentInstance, timeline, { runningUpdate: false })
},
store: () => store,
data: () => ({

View File

@ -154,16 +154,16 @@
if (initializeStarted) {
return
}
this.set({initializeStarted: true})
this.set({ initializeStarted: true })
mark('initializeTimeline')
doubleRAF(() => {
console.log('timeline initialized')
this.store.set({timelineInitialized: true})
this.store.set({ timelineInitialized: true })
stop('initializeTimeline')
})
},
onScrollTopChanged (scrollTop) {
this.set({scrollTop: scrollTop})
this.set({ scrollTop: scrollTop })
},
onScrollToBottom () {
let { timelineType } = this.get()
@ -212,7 +212,7 @@
showMoreItemsForTimeline(currentInstance, timeline)
} else {
// user hasn't scrolled to the top, show a header instead
this.store.setForTimeline(currentInstance, timeline, {shouldShowHeader: true})
this.store.setForTimeline(currentInstance, timeline, { shouldShowHeader: true })
}
stop('handleItemIdsToAdd')
}
@ -294,7 +294,7 @@
// i.e. render anything above the fold of the timeline. This avoids the affect
// where the scrollable content appears to jump around if we need to scroll it.
console.log('timeline preinitialized')
this.store.set({timelinePreinitialized: true})
this.store.set({ timelinePreinitialized: true })
}
}
}

View File

@ -47,12 +47,12 @@
}, SCROLL_EVENT_THROTTLE)
this.observe('showFooter', showFooter => {
mark('set showFooter')
this.store.setForRealm({showFooter: showFooter})
this.store.setForRealm({ showFooter: showFooter })
mark('set showFooter')
})
this.observe('showHeader', showHeader => {
mark('set showHeader')
this.store.setForRealm({showHeader: showHeader})
this.store.setForRealm({ showHeader: showHeader })
stop('set showHeader')
})
this.observe('items', (newItems, oldItems) => {
@ -60,7 +60,7 @@
return
}
mark('set items')
this.store.setForRealm({items: newItems})
this.store.setForRealm({ items: newItems })
stop('set items')
})
this.observe('allVisibleItemsHaveHeight', allVisibleItemsHaveHeight => {
@ -118,7 +118,7 @@
}
mark('calculateListOffset')
let listOffset = node.offsetParent.offsetTop
this.store.setForRealm({listOffset})
this.store.setForRealm({ listOffset })
stop('calculateListOffset')
}
}

View File

@ -26,7 +26,7 @@
console.log('allVisibleItemsHaveHeight', allVisibleItemsHaveHeight)
let { initializedScrollTop } = this.get()
if (!initializedScrollTop && allVisibleItemsHaveHeight && node) {
this.set({'initializedScrollTop': true})
this.set({ 'initializedScrollTop': true })
mark('set scrollTop')
console.log('forcing scroll top to ', scrollTop)
node.scrollTop = scrollTop
@ -95,7 +95,7 @@
doubleRAF(() => {
mark('onScroll -> setForRealm()')
this.store.setForRealm({scrollTop, scrollHeight})
this.store.setForRealm({ scrollTop, scrollHeight })
stop('onScroll -> setForRealm()')
})
},

View File

@ -25,7 +25,7 @@
mark('VirtualListFooter gBCR')
let rect = node.getBoundingClientRect()
stop('VirtualListFooter gBCR')
this.store.setForRealm({footerHeight: rect.height})
this.store.setForRealm({ footerHeight: rect.height })
})
},
store: () => virtualListStore

View File

@ -31,11 +31,11 @@
this.observe('shown', shown => {
if (shown) {
this.doCalculateHeight()
doubleRAF(() => this.set({fadedIn: true})) // animate in
doubleRAF(() => this.set({ fadedIn: true })) // animate in
} else {
this.set({fadedIn: false})
this.set({ fadedIn: false })
}
}, {init: false})
}, { init: false })
},
data: () => ({
fadedIn: false
@ -48,12 +48,12 @@
if (heightCalculated) { // only need to calculate once, it never changes
return
}
this.set({heightCalculated: true})
this.set({ heightCalculated: true })
requestAnimationFrame(() => {
mark('VirtualListHeader gBCR')
let rect = this.refs.node.getBoundingClientRect()
stop('VirtualListHeader gBCR')
this.store.setForRealm({headerHeight: rect.height})
this.store.setForRealm({ headerHeight: rect.height })
})
}
}

View File

@ -59,7 +59,7 @@
let { key } = this.get()
let { itemHeights } = this.store.get()
itemHeights[key] = rect.height
this.store.setForRealm({itemHeights})
this.store.setForRealm({ itemHeights })
}
}
}

View File

@ -16,7 +16,7 @@
if (makeProps) {
let props = await makeProps(key)
mark('VirtualListLazyItem set props')
this.set({props: props})
this.set({ props: props })
stop('VirtualListLazyItem set props')
}
},

View File

@ -106,7 +106,7 @@ virtualListStore.compute('allVisibleItemsHaveHeight',
if (process.browser && process.env.NODE_ENV !== 'production') {
window.virtualListStore = virtualListStore
virtualListStore.on('state', ({changed}) => {
virtualListStore.on('state', ({ changed }) => {
if (changed.visibleItems) {
window.visibleItemsChangedCount = (window.visibleItemsChangedCount || 0) + 1
}

View File

@ -34,7 +34,7 @@ if (process.browser && process.env.NODE_ENV !== 'production') {
function getOrCreateInstanceCache (cache, instanceName) {
let cached = cache.caches[instanceName]
if (!cached) {
cached = cache.caches[instanceName] = new QuickLRU({maxSize: cache.maxSize})
cached = cache.caches[instanceName] = new QuickLRU({ maxSize: cache.maxSize })
}
return cached
}

View File

@ -53,24 +53,24 @@ export function getDatabase (instanceName) {
}
if (e.oldVersion < DB_VERSION_INITIAL) {
createObjectStore(STATUSES_STORE, {keyPath: 'id'}, {
createObjectStore(STATUSES_STORE, { keyPath: 'id' }, {
[TIMESTAMP]: TIMESTAMP,
[REBLOG_ID]: REBLOG_ID
})
createObjectStore(STATUS_TIMELINES_STORE, null, {
'statusId': ''
})
createObjectStore(NOTIFICATIONS_STORE, {keyPath: 'id'}, {
createObjectStore(NOTIFICATIONS_STORE, { keyPath: 'id' }, {
[TIMESTAMP]: TIMESTAMP,
[STATUS_ID]: STATUS_ID
})
createObjectStore(NOTIFICATION_TIMELINES_STORE, null, {
'notificationId': ''
})
createObjectStore(ACCOUNTS_STORE, {keyPath: 'id'}, {
createObjectStore(ACCOUNTS_STORE, { keyPath: 'id' }, {
[TIMESTAMP]: TIMESTAMP
})
createObjectStore(RELATIONSHIPS_STORE, {keyPath: 'id'}, {
createObjectStore(RELATIONSHIPS_STORE, { keyPath: 'id' }, {
[TIMESTAMP]: TIMESTAMP
})
createObjectStore(THREADS_STORE, null, {

View File

@ -47,7 +47,7 @@
} catch (e) {
toast.say('Error: ' + (e.name || '') + ' ' + (e.message || ''))
} finally {
this.set({loading: false})
this.set({ loading: false })
}
},
data: () => ({

View File

@ -1,9 +1,9 @@
export const FAVORITE_ANIMATION = [
{
properties: [
{transform: 'scale(1)'},
{transform: 'scale(2)'},
{transform: 'scale(1)'}
{ transform: 'scale(1)' },
{ transform: 'scale(2)' },
{ transform: 'scale(1)' }
],
options: {
duration: 333,
@ -12,8 +12,8 @@ export const FAVORITE_ANIMATION = [
},
{
properties: [
{fill: 'var(--action-button-fill-color)'},
{fill: 'var(--action-button-fill-color-pressed)'}
{ fill: 'var(--action-button-fill-color)' },
{ fill: 'var(--action-button-fill-color-pressed)' }
],
options: {
duration: 333,
@ -27,9 +27,9 @@ export const REBLOG_ANIMATION = FAVORITE_ANIMATION
export const FOLLOW_BUTTON_ANIMATION = [
{
properties: [
{transform: 'scale(1)'},
{transform: 'scale(2)'},
{transform: 'scale(1)'}
{ transform: 'scale(1)' },
{ transform: 'scale(2)' },
{ transform: 'scale(1)' }
],
options: {
duration: 333,

View File

@ -27,7 +27,7 @@ export class LocalStorageStore extends Store {
}
}
this.set(newState)
this.on('state', ({changed}) => {
this.on('state', ({ changed }) => {
Object.keys(changed).forEach(change => {
if (this._keysToWatch.has(change)) {
this._keysToSave[change] = true

View File

@ -3,7 +3,7 @@ export function instanceMixins (Store) {
let { composeData, currentInstance } = this.get()
let instanceNameData = composeData[currentInstance] = composeData[currentInstance] || {}
instanceNameData[realm] = Object.assign(instanceNameData[realm] || {}, obj)
this.set({composeData})
this.set({ composeData })
}
Store.prototype.getComposeData = function (realm, key) {
@ -18,6 +18,6 @@ export function instanceMixins (Store) {
if (composeData && composeData[currentInstance]) {
delete composeData[currentInstance][realm]
}
this.set({composeData})
this.set({ composeData })
}
}

View File

@ -34,6 +34,6 @@ export function onlineObservers (store) {
}
})
window.addEventListener('offline', () => store.set({online: false}))
window.addEventListener('online', () => store.set({online: true}))
window.addEventListener('offline', () => store.set({ online: false }))
window.addEventListener('online', () => store.set({ online: true }))
}

View File

@ -4,6 +4,6 @@ export function pageVisibilityObservers (store) {
}
document.addEventListener('visibilitychange', () => {
store.set({pageVisibilityHidden: document.hidden})
store.set({ pageVisibilityHidden: document.hidden })
})
}

View File

@ -6,7 +6,7 @@ export function resizeObservers (store) {
}
const recalculateIsMobileSize = () => {
store.set({isMobileSize: window.matchMedia('(max-width: 767px)').matches})
store.set({ isMobileSize: window.matchMedia('(max-width: 767px)').matches })
}
registerResizeListener(recalculateIsMobileSize)

View File

@ -21,11 +21,11 @@ export function timelineObservers (store) {
function shouldObserveTimeline (timeline) {
return timeline &&
!(
timeline !== 'local' &&
timeline !== 'local' &&
timeline !== 'federated' &&
!timeline.startsWith('list/') &&
!timeline.startsWith('tag/')
)
)
}
store.observe('currentTimeline', async (currentTimeline) => {

View File

@ -62,5 +62,5 @@ if (process.browser && process.env.NODE_ENV !== 'production') {
// needed for tests
if (process.browser) {
window.__forceOnline = online => store.set({online})
window.__forceOnline = online => store.set({ online })
}

View File

@ -8,18 +8,18 @@ import { mark, stop } from './marks'
export class RealmStore extends Store {
constructor (init, maxSize) {
super(init)
this.set({realms: new QuickLRU({maxSize: maxSize})})
this.set({ realms: new QuickLRU({ maxSize: maxSize }) })
this._batches = {}
}
setCurrentRealm (realm) {
this.set({currentRealm: realm})
this.set({ currentRealm: realm })
}
setForRealm (obj) {
let { currentRealm, realms } = this.get()
realms.set(currentRealm, Object.assign(realms.get(currentRealm) || {}, obj))
this.set({realms: realms})
this.set({ realms: realms })
}
computeForRealm (key, defaultValue) {
@ -63,8 +63,8 @@ export class RealmStore extends Store {
}
delete this._batches[currentRealm][key]
let { realms } = this.get()
realms.set(currentRealm, Object.assign(realms.get(currentRealm) || {}, {[key]: obj}))
this.set({realms: realms})
realms.set(currentRealm, Object.assign(realms.get(currentRealm) || {}, { [key]: obj }))
this.set({ realms: realms })
stop('batchUpdate')
})
}

View File

@ -8,7 +8,7 @@ import debounce from 'lodash-es/debounce'
import throttle from 'lodash-es/throttle'
const map = new Map()
let createEvent = (name) => new Event(name, {bubbles: true})
let createEvent = (name) => new Event(name, { bubbles: true })
function assign (ta) {
if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) {

View File

@ -40,7 +40,7 @@ export function registerClickDelegates (component, delegates) {
}
export function registerClickDelegate (component, key, callback) {
registerClickDelegates(component, {[key]: callback})
registerClickDelegates(component, { [key]: callback })
}
if (process.browser) {

View File

@ -17,7 +17,7 @@ export function reselect (store, outputKey, inputKey) {
store.compute(countKey, [inputKey], input => {
if (process.browser && process.env.NODE_ENV !== 'production') {
window.reselectStats[inputKey] = window.reselectStats[inputKey] || {numInputChanges: 0, numOutputChanges: 0}
window.reselectStats[inputKey] = window.reselectStats[inputKey] || { numInputChanges: 0, numOutputChanges: 0 }
window.reselectStats[inputKey].numInputChanges++
}
if (!isEqual(prevValue, input)) {

View File

@ -36,8 +36,8 @@ const scroll = (node, key, target) => {
node.removeEventListener('touchstart', cancel)
}
node.addEventListener('wheel', cancel, {passive: true})
node.addEventListener('touchstart', cancel, {passive: true})
node.addEventListener('wheel', cancel, { passive: true })
node.addEventListener('touchstart', cancel, { passive: true })
step()

View File

@ -28,7 +28,7 @@ const nonDebugOnly = (fn) => (req, res, next) => (
~debugPaths.indexOf(req.path) ? next() : fn(req, res, next)
)
app.use(shrinkRay({threshold: 0}))
app.use(shrinkRay({ threshold: 0 }))
// report.html needs to have CSP disable because it has inline scripts
app.use(debugOnly(helmet()))

View File

@ -11,5 +11,5 @@ export function base64StringToBlob (base64, type) {
}
let parts = [binaryStringToArrayBuffer(atob(base64))]
return type ? new Blob(parts, {type: type}) : new Blob(parts)
return type ? new Blob(parts, { type: type }) : new Blob(parts)
}

View File

@ -1,89 +1,89 @@
import { times } from './utils'
export const homeTimeline = [
{content: 'pinned toot 1'},
{content: 'notification of unlisted message'},
{content: 'notification of followers-only message'},
{content: 'notification of direct message'},
{content: 'this is unlisted'},
{content: 'this is followers-only'},
{content: 'direct'},
{spoiler: 'kitten CW'},
{content: 'secret video'},
{content: "here's a video"},
{spoiler: 'CW'},
{content: "here's a secret animated kitten gif"},
{content: "here's an animated kitten gif"},
{content: "here's 2 kitten photos"},
{content: "here's a secret kitten"},
{content: "here's a kitten"},
{content: 'hello admin'},
{content: 'hello foobar'},
{content: 'hello world'}
].concat(times(30, i => ({content: (30 - i).toString()})))
{ content: 'pinned toot 1' },
{ content: 'notification of unlisted message' },
{ content: 'notification of followers-only message' },
{ content: 'notification of direct message' },
{ content: 'this is unlisted' },
{ content: 'this is followers-only' },
{ content: 'direct' },
{ spoiler: 'kitten CW' },
{ content: 'secret video' },
{ content: "here's a video" },
{ spoiler: 'CW' },
{ content: "here's a secret animated kitten gif" },
{ content: "here's an animated kitten gif" },
{ content: "here's 2 kitten photos" },
{ content: "here's a secret kitten" },
{ content: "here's a kitten" },
{ content: 'hello admin' },
{ content: 'hello foobar' },
{ content: 'hello world' }
].concat(times(30, i => ({ content: (30 - i).toString() })))
export const localTimeline = [
{spoiler: 'kitten CW'},
{content: 'secret video'},
{content: "here's a video"},
{spoiler: 'CW'},
{content: "here's a secret animated kitten gif"},
{content: "here's an animated kitten gif"},
{content: "here's 2 kitten photos"},
{content: "here's a secret kitten"},
{content: "here's a kitten"},
{content: 'hello world'}
].concat(times(30, i => ({content: (30 - i).toString()})))
{ spoiler: 'kitten CW' },
{ content: 'secret video' },
{ content: "here's a video" },
{ spoiler: 'CW' },
{ content: "here's a secret animated kitten gif" },
{ content: "here's an animated kitten gif" },
{ content: "here's 2 kitten photos" },
{ content: "here's a secret kitten" },
{ content: "here's a kitten" },
{ content: 'hello world' }
].concat(times(30, i => ({ content: (30 - i).toString() })))
export const notifications = [
{favoritedBy: 'admin'},
{rebloggedBy: 'admin'},
{content: 'notification of unlisted message'},
{content: 'notification of followers-only message'},
{content: 'notification of direct message'},
{followedBy: 'quux'},
{content: 'hello foobar'},
{followedBy: 'admin'}
{ favoritedBy: 'admin' },
{ rebloggedBy: 'admin' },
{ content: 'notification of unlisted message' },
{ content: 'notification of followers-only message' },
{ content: 'notification of direct message' },
{ followedBy: 'quux' },
{ content: 'hello foobar' },
{ followedBy: 'admin' }
]
export const favorites = [
{content: 'notification of direct message'},
{content: 'notification of followers-only message'},
{content: 'notification of unlisted message'},
{content: 'pinned toot 1'}
{ content: 'notification of direct message' },
{ content: 'notification of followers-only message' },
{ content: 'notification of unlisted message' },
{ content: 'pinned toot 1' }
]
export const quuxStatuses = [
{content: 'pinned toot 2'},
{content: 'pinned toot 1'}
].concat(times(25, i => ({content: `unlisted thread ${25 - i}`})))
{ content: 'pinned toot 2' },
{ content: 'pinned toot 1' }
].concat(times(25, i => ({ content: `unlisted thread ${25 - i}` })))
export const quuxThread = times(25, i => ({content: `unlisted thread ${i + 1}`}))
export const quuxThread = times(25, i => ({ content: `unlisted thread ${i + 1}` }))
export const bazThreadRelativeTo2B2 = [
{content: 'thread 1'},
{content: 'thread 2'},
{content: 'thread 2b'},
{content: 'thread 2b2'},
{content: 'thread 2b2a'}
{ content: 'thread 1' },
{ content: 'thread 2' },
{ content: 'thread 2b' },
{ content: 'thread 2b2' },
{ content: 'thread 2b2a' }
]
export const bazThreadRelativeTo2b = [
{content: 'thread 1'},
{content: 'thread 2'},
{content: 'thread 2b'},
{content: 'thread 2b1'},
{content: 'thread 2b2'},
{content: 'thread 2b2a'}
{ content: 'thread 1' },
{ content: 'thread 2' },
{ content: 'thread 2b' },
{ content: 'thread 2b1' },
{ content: 'thread 2b2' },
{ content: 'thread 2b2a' }
]
export const bazThreadRelativeTo2 = [
{content: 'thread 1'},
{content: 'thread 2'},
{content: 'thread 2a'},
{content: 'thread 2b'},
{content: 'thread 2b1'},
{content: 'thread 2b2'},
{content: 'thread 2b2a'},
{content: 'thread 2c'}
{ content: 'thread 1' },
{ content: 'thread 2' },
{ content: 'thread 2a' },
{ content: 'thread 2b' },
{ content: 'thread 2b1' },
{ content: 'thread 2b2' },
{ content: 'thread 2b2a' },
{ content: 'thread 2c' }
]

Some files were not shown because too many files have changed in this diff Show More