commit
b4344a74b6
|
@ -84,7 +84,7 @@ export default class Account {
|
|||
*/
|
||||
listAccounts () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.db.find({accessToken: { $ne: '' }}).sort({ order: 1 }).exec((err, docs) => {
|
||||
this.db.find({ accessToken: { $ne: '' } }).sort({ order: 1 }).exec((err, docs) => {
|
||||
if (err) return reject(err)
|
||||
if (empty(docs)) return reject(new EmptyRecordError('empty'))
|
||||
resolve(docs)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
export default class Hashtags {
|
||||
constructor (db) {
|
||||
this.db = db
|
||||
this.db.ensureIndex({fieldName: 'tagName', unique: true}, (_) => {})
|
||||
this.db.ensureIndex({ fieldName: 'tagName', unique: true }, (_) => {})
|
||||
}
|
||||
|
||||
listTags () {
|
||||
|
@ -15,7 +15,7 @@ export default class Hashtags {
|
|||
|
||||
insertTag (tag) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.db.insert({tagName: tag}, (err, doc) => {
|
||||
this.db.insert({ tagName: tag }, (err, doc) => {
|
||||
if (err) return reject(err)
|
||||
resolve(doc)
|
||||
})
|
||||
|
|
|
@ -92,13 +92,13 @@ export default {
|
|||
this.$store.dispatch('Login/confirmInstance', this.form.domainName)
|
||||
.then(() => {
|
||||
this.$message({
|
||||
message: this.$t('message.domain_confirmed', {domain: this.form.domainName}),
|
||||
message: this.$t('message.domain_confirmed', { domain: this.form.domainName }),
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
message: this.$t('message.domain_doesnt_exist', {domain: this.form.domainName}),
|
||||
message: this.$t('message.domain_doesnt_exist', { domain: this.form.domainName }),
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
|
|
|
@ -188,7 +188,7 @@ export default {
|
|||
}
|
||||
if (this.status.length <= 0 || this.status.length >= 500) {
|
||||
return this.$message({
|
||||
message: this.$t('validation.new_toot.toot_length', {min: 1, max: 500}),
|
||||
message: this.$t('validation.new_toot.toot_length', { min: 1, max: 500 }),
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ export default {
|
|||
if (this.attachedMedias.length > 0) {
|
||||
if (this.attachedMedias.length > 4) {
|
||||
return this.$message({
|
||||
message: this.$t('validation.new_toot.attach_length', {max: 4}),
|
||||
message: this.$t('validation.new_toot.attach_length', { max: 4 }),
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ const NewToot = {
|
|||
* Update visibility using direct value
|
||||
* @param state vuex state object
|
||||
* @param value visibility value
|
||||
**/
|
||||
*/
|
||||
changeVisibilityValue (state, value) {
|
||||
state.visibility = value
|
||||
},
|
||||
|
@ -74,7 +74,7 @@ const NewToot = {
|
|||
}
|
||||
},
|
||||
actions: {
|
||||
async updateMedia ({state, commit, rootState}, media) {
|
||||
async updateMedia ({ state, commit, rootState }, media) {
|
||||
if (rootState.TimelineSpace.account.accessToken === undefined || rootState.TimelineSpace.account.accessToken === null) {
|
||||
throw new AuthenticationError()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue