change linter comma-dangle to 'always-multiline'

This commit is contained in:
dartcafe 2020-05-02 01:05:01 +02:00
Родитель 5bc812fec1
Коммит 90bbbc0706
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: CCE73CEF3035D3C8
42 изменённых файлов: 277 добавлений и 277 удалений

Просмотреть файл

@ -38,7 +38,7 @@ module.exports = {
'allowModules': [],
'tryExtensions': ['.js', '.vue']
}],
// 'comma-dangle': ['error', 'always-multiline'],
'comma-dangle': ['error', 'always-multiline'],
// space before function ()
'space-before-function-paren': ['error', 'never'],
// curly braces always space

Просмотреть файл

@ -38,14 +38,14 @@ export default {
components: {
Navigation,
Content,
SideBar
SideBar,
},
data() {
return {
sideBarOpen: (window.innerWidth > 920),
initialTab: 'comments',
activeTab: 'comments'
activeTab: 'comments',
}
},
@ -85,8 +85,8 @@ export default {
OC.Notification.showTemporary(t('polls', 'Error loading poll list'), { type: 'error' })
})
}
}
}
},
},
}
</script>

Просмотреть файл

@ -32,27 +32,27 @@ export default {
props: {
title: {
type: String,
default: ''
default: '',
},
icon: {
type: String,
default: ''
default: '',
},
primary: {
type: Boolean,
default: false
default: false,
},
tag: {
type: String,
default: 'button'
}
default: 'button',
},
},
computed: {
withIcon() {
return Boolean(this.icon)
}
}
},
},
}
</script>

Просмотреть файл

@ -36,13 +36,13 @@ export default {
props: {
value: {
type: String,
required: true
required: true,
},
placeholder: {
type: String,
default: ''
}
}
default: '',
},
},
}
</script>

Просмотреть файл

@ -28,7 +28,7 @@
<script>
export default {
name: 'LoadingOverlay'
name: 'LoadingOverlay',
}
</script>

Просмотреть файл

@ -64,29 +64,29 @@ export default {
props: {
draggable: {
type: Boolean,
default: false
default: false,
},
option: {
type: Object,
required: true
required: true,
},
showOrder: {
type: Boolean,
default: false
default: false,
},
tag: {
type: String,
default: 'div'
default: 'div',
},
type: {
type: String,
required: true
required: true,
},
display: {
type: String,
default: 'textBox'
}
}
default: 'textBox',
},
},
}
</script>

Просмотреть файл

@ -49,20 +49,20 @@ export default {
return {
voteSaved: false,
delay: 50,
newName: ''
newName: '',
}
},
computed: {
...mapState({
acl: state => state.acl
acl: state => state.acl,
}),
...mapGetters([
'participantsVoted'
])
'participantsVoted',
]),
}
},
}
</script>

Просмотреть файл

@ -40,19 +40,19 @@ export default {
name: 'PollInformation',
components: {
UserBubble
UserBubble,
},
computed: {
...mapState({
acl: state => state.acl,
poll: state => state.poll
poll: state => state.poll,
}),
...mapGetters([
'participantsVoted',
'expired'
])
}
'expired',
]),
},
}
</script>

Просмотреть файл

@ -43,44 +43,44 @@ export default {
name: 'UserDiv',
components: {
Avatar
Avatar,
},
props: {
hideNames: {
type: Boolean,
default: false
default: false,
},
disableMenu: {
type: Boolean,
default: false
default: false,
},
menuPosition: {
type: String,
default: 'left'
default: 'left',
},
userId: {
type: String,
default: undefined
default: undefined,
},
displayName: {
type: String,
default: ''
default: '',
},
type: {
type: String,
default: 'user'
default: 'user',
},
icon: {
type: Boolean,
default: false
}
default: false,
},
},
data() {
return {
nothidden: false
nothidden: false,
}
},
@ -104,8 +104,8 @@ export default {
} else {
return ''
}
}
}
},
},
}
</script>

Просмотреть файл

@ -36,24 +36,24 @@ export default {
name: 'CommentAdd',
components: {
InputDiv
InputDiv,
},
data() {
return {
comment: '',
isLoading: false
isLoading: false,
}
},
computed: {
...mapState({
acl: state => state.acl
acl: state => state.acl,
}),
currentUser() {
return this.$store.state.acl.userId
}
},
},
methods: {
@ -73,8 +73,8 @@ export default {
})
}
}
}
},
},
}
</script>

Просмотреть файл

@ -63,23 +63,23 @@ export default {
components: {
Actions,
ActionButton,
CommentAdd
CommentAdd,
},
data() {
return {
sort: 'timestamp',
reverse: true
reverse: true,
}
},
computed: {
...mapState({
comments: state => state.comments,
acl: state => state.acl
acl: state => state.acl,
}),
...mapGetters([
'countComments'
'countComments',
]),
sortedList() {
@ -88,7 +88,7 @@ export default {
} else {
return sortBy(this.comments.list, this.sort)
}
}
},
},
@ -101,8 +101,8 @@ export default {
OC.Notification.showTemporary(t('polls', 'Error while deleting the comment'), { type: 'error' })
console.error(error.response)
})
}
}
},
},
}
</script>

Просмотреть файл

@ -62,18 +62,18 @@ export default {
return {
id: 0,
type: 'datePoll',
title: ''
title: '',
}
},
computed: {
...mapState({
poll: state => state.poll
poll: state => state.poll,
}),
titleEmpty() {
return this.title === ''
}
},
},
methods: {
@ -107,8 +107,8 @@ export default {
this.$nextTick(() => {
this.$refs.pollTitle.focus()
})
}
}
},
},
}
</script>

Просмотреть файл

@ -56,7 +56,7 @@ export default {
AppNavigationNew,
AppNavigationItem,
CreateDlg,
PollNavigationItems
PollNavigationItems,
},
data() {
@ -68,39 +68,39 @@ export default {
id: 'relevant',
title: t('polls', 'Relevant'),
icon: 'icon-details',
pinned: false
pinned: false,
},
{
id: 'my',
title: t('polls', 'My polls'),
icon: 'icon-user',
pinned: false
pinned: false,
},
{
id: 'public',
title: t('polls', 'Public polls'),
icon: 'icon-link',
pinned: false
pinned: false,
},
{
id: 'all',
title: t('polls', 'All polls'),
icon: 'icon-folder',
pinned: false
pinned: false,
},
{
id: 'expired',
title: t('polls', 'Expired polls'),
icon: 'icon-delete',
pinned: false
pinned: false,
},
{
id: 'deleted',
title: t('polls', 'Deleted polls'),
icon: 'icon-delete',
pinned: true
}
]
pinned: true,
},
],
}
},
@ -110,7 +110,7 @@ export default {
pollList() {
return this.$store.state.polls.list
}
},
},
created() {
@ -170,8 +170,8 @@ export default {
this.$root.$emit('updatePolls')
})
}
}
},
},
}
</script>

Просмотреть файл

@ -51,14 +51,14 @@ export default {
name: 'PollNavigationItems',
components: {
ActionButton,
AppNavigationItem
AppNavigationItem,
},
props: {
poll: {
type: Object,
default: undefined
}
default: undefined,
},
},
computed: {
@ -68,8 +68,8 @@ export default {
} else {
return 'icon-toggle-filelist'
}
}
}
},
},
}
</script>

Просмотреть файл

@ -117,31 +117,31 @@ export default {
components: {
Actions,
ActionButton
ActionButton,
},
props: {
header: {
type: Boolean,
default: false
default: false,
},
poll: {
type: Object,
default: undefined
default: undefined,
},
sort: {
type: String,
default: 'created'
default: 'created',
},
reverse: {
type: Boolean,
default: true
}
default: true,
},
},
data() {
return {
openedMenu: false
openedMenu: false,
}
},
@ -174,7 +174,7 @@ export default {
} else {
return t('polls', 'never')
}
}
},
},
methods: {
@ -221,8 +221,8 @@ export default {
this.$root.$emit('updatePolls')
})
this.hideMenu()
}
}
},
},
}
</script>

Просмотреть файл

@ -63,22 +63,22 @@ export default {
SideBarTabOptions,
SideBarTabShare,
AppSidebar,
AppSidebarTab
AppSidebarTab,
},
props: {
active: {
type: String,
default: t('polls', 'Comments').toLowerCase()
}
default: t('polls', 'Comments').toLowerCase(),
},
},
computed: {
...mapState({
poll: state => state.poll,
acl: state => state.acl
})
}
acl: state => state.acl,
}),
},
}

Просмотреть файл

@ -104,7 +104,7 @@ export default {
name: 'SideBarTabConfiguration',
components: {
DatetimePicker
DatetimePicker,
},
data() {
@ -112,14 +112,14 @@ export default {
writingPoll: false,
sidebar: false,
titleEmpty: false,
setExpiration: false
setExpiration: false,
}
},
computed: {
...mapState({
poll: state => state.poll,
acl: state => state.acl
acl: state => state.acl,
}),
// Add bindings
@ -129,7 +129,7 @@ export default {
},
set(value) {
this.writeValueDebounced({ description: value })
}
},
},
pollTitle: {
@ -138,7 +138,7 @@ export default {
},
set(value) {
this.writeValueDebounced({ title: value })
}
},
},
pollAccess: {
@ -147,7 +147,7 @@ export default {
},
set(value) {
this.writeValue({ access: value })
}
},
},
pollShowResults: {
@ -156,7 +156,7 @@ export default {
},
set(value) {
this.writeValue({ showResults: value })
}
},
},
pollExpire: {
@ -166,7 +166,7 @@ export default {
set(value) {
this.writeValue({ expire: moment(value).unix() })
}
},
},
pollExpiration: {
@ -180,7 +180,7 @@ export default {
this.writeValue({ expire: 0 })
}
}
},
},
pollAnonymous: {
@ -189,7 +189,7 @@ export default {
},
set(value) {
this.writeValue({ anonymous: value })
}
},
},
pollAdminAccess: {
@ -198,7 +198,7 @@ export default {
},
set(value) {
this.writeValue({ adminAccess: value })
}
},
},
pollAllowMaybe: {
@ -207,7 +207,7 @@ export default {
},
set(value) {
this.writeValue({ allowMaybe: value })
}
},
},
firstDOW() {
@ -233,9 +233,9 @@ export default {
months: moment.months(),
monthsShort: moment.monthsShort(),
weekdays: moment.weekdays(),
weekdaysMin: moment.weekdaysMin()
}
}
weekdaysMin: moment.weekdaysMin(),
},
},
}
},
@ -247,7 +247,7 @@ export default {
} else {
return t('polls', 'Create new poll')
}
}
},
},
methods: {
@ -301,7 +301,7 @@ export default {
this.writePoll()
}
}
}
},
},
}
</script>

Просмотреть файл

@ -41,7 +41,7 @@ export default {
components: {
SideBarTabOptionsDate,
SideBarTabOptionsText
SideBarTabOptionsText,
},
data() {
@ -50,17 +50,17 @@ export default {
move: {
step: 1,
unit: 'week',
units: ['minute', 'hour', 'day', 'week', 'month', 'year']
}
units: ['minute', 'hour', 'day', 'week', 'month', 'year'],
},
}
},
computed: {
...mapState({
poll: state => state.poll,
acl: state => state.acl
})
acl: state => state.acl,
}),
}
},
}
</script>

Просмотреть файл

@ -129,7 +129,7 @@ export default {
DatetimePicker,
Modal,
Multiselect,
OptionItem
OptionItem,
},
data() {
@ -140,7 +140,7 @@ export default {
baseOption: {},
unit: { name: t('polls', 'Week'), value: 'week' },
step: 1,
amount: 1
amount: 1,
},
dateUnits: [
{ name: t('polls', 'Minute'), value: 'minute' },
@ -148,19 +148,19 @@ export default {
{ name: t('polls', 'Day'), value: 'day' },
{ name: t('polls', 'Week'), value: 'week' },
{ name: t('polls', 'Month'), value: 'month' },
{ name: t('polls', 'Year'), value: 'year' }
{ name: t('polls', 'Year'), value: 'year' },
],
shift: {
step: 1,
unit: { name: t('polls', 'Week'), value: 'week' }
}
unit: { name: t('polls', 'Week'), value: 'week' },
},
}
},
computed: {
...mapState({
options: state => state.options,
acl: state => state.acl
acl: state => state.acl,
}),
...mapGetters(['sortedOptions']),
@ -188,11 +188,11 @@ export default {
months: moment.months(),
monthsShort: moment.monthsShort(),
weekdays: moment.weekdays(),
weekdaysMin: moment.weekdaysMin()
}
}
weekdaysMin: moment.weekdaysMin(),
},
},
}
}
},
},
methods: {
@ -221,7 +221,7 @@ export default {
pollOptionText: moment.unix(this.sequence.baseOption.timestamp).add(
this.sequence.step * (i + 1),
this.sequence.unit.value
).format('YYYY-MM-DD HH:mm:ss')
).format('YYYY-MM-DD HH:mm:ss'),
})
}
this.modal = false
@ -235,9 +235,9 @@ export default {
removeOption(option) {
this.$store.dispatch('removeOptionAsync', { option: option })
}
},
}
},
}
</script>

Просмотреть файл

@ -71,19 +71,19 @@ export default {
ActionButton,
draggable,
InputDiv,
OptionItem
OptionItem,
},
data() {
return {
newPollText: ''
newPollText: '',
}
},
computed: {
...mapState({
options: state => state.options,
acl: state => state.acl
acl: state => state.acl,
}),
...mapGetters(['sortedOptions']),
@ -94,8 +94,8 @@ export default {
},
set(value) {
this.writeOptions(value)
}
}
},
},
},
@ -108,7 +108,7 @@ export default {
addOption() {
if (this.newPollText) {
this.$store.dispatch('addOptionAsync', {
pollOptionText: this.newPollText
pollOptionText: this.newPollText,
})
.then(() => {
this.newPollText = ''
@ -118,10 +118,10 @@ export default {
removeOption(option) {
this.$store.dispatch('removeOptionAsync', {
option: option
option: option,
})
}
}
},
},
}
</script>

Просмотреть файл

@ -113,7 +113,7 @@ export default {
components: {
Actions,
ActionButton,
Multiselect
Multiselect,
},
data() {
@ -128,20 +128,20 @@ export default {
getGroups: true,
getContacts: true,
getMail: true,
query: ''
}
query: '',
},
}
},
computed: {
...mapState({
acl: state => state.acl
acl: state => state.acl,
}),
...mapGetters([
'invitationShares',
'publicShares'
])
'publicShares',
]),
},
methods: {
@ -217,15 +217,15 @@ export default {
userId: payload.user,
pollId: '0',
userEmail: payload.emailAddress,
token: ''
}
token: '',
},
})
.catch(error => {
console.error('Error while adding share - Error: ', error)
OC.Notification.showTemporary(t('polls', 'Error while adding share'), { type: 'error' })
})
}
}
},
},
}
</script>

Просмотреть файл

@ -36,7 +36,7 @@ export default {
computed: {
...mapState({
subscription: state => state.subscription,
poll: state => state.poll
poll: state => state.poll,
}),
subscribe: {
@ -46,19 +46,19 @@ export default {
set(value) {
this.$store.commit('setSubscription', value)
this.$store.dispatch('writeSubscriptionPromise', { pollId: this.poll.id })
}
}
},
},
},
watch: {
$route() {
this.$store.dispatch('getSubscription', { pollId: this.$route.params.id })
}
},
},
created() {
this.$store.dispatch('getSubscription', { pollId: this.$route.params.id })
}
},
}
</script>

Просмотреть файл

@ -66,7 +66,7 @@ export default {
name: 'VoteHeaderPublic',
components: {
Modal
Modal,
},
data() {
@ -77,24 +77,24 @@ export default {
redirecting: false,
isValidName: false,
newName: '',
modal: true
modal: true,
}
},
computed: {
...mapState({
poll: state => state.poll,
acl: state => state.acl
acl: state => state.acl,
}),
...mapGetters([
'expired'
'expired',
]),
loginLink() {
const redirectUrl = this.$router.resolve({
name: 'publicVote',
params: { token: this.$route.params.token }
params: { token: this.$route.params.token },
}).href
return OC.generateUrl('login?redirect_url=' + redirectUrl)
},
@ -103,7 +103,7 @@ export default {
return window.location.origin.concat(
this.$router.resolve({
name: 'publicVote',
params: { token: this.$route.params.token }
params: { token: this.$route.params.token },
}).href
)
},
@ -114,7 +114,7 @@ export default {
isValidUser() {
return (this.acl.userId !== '' && this.acl.userId !== null)
}
},
},
@ -132,7 +132,7 @@ export default {
'poll.id': function(newValue) {
this.setFocus()
}
},
},
methods: {
@ -199,8 +199,8 @@ export default {
OC.Notification.showTemporary(t('polls', 'Error saving username', 1, this.poll.title), { type: 'error' })
})
}
}
}
},
},
}
</script>

Просмотреть файл

@ -36,25 +36,25 @@ export default {
props: {
option: {
type: Object,
default: undefined
default: undefined,
},
userId: {
type: String,
default: ''
}
default: '',
},
},
computed: {
...mapState({
poll: state => state.poll,
acl: state => state.acl
acl: state => state.acl,
}),
answer() {
try {
return this.$store.getters.getVote({
option: this.option,
userId: this.userId
userId: this.userId,
}).voteAnswer
} catch (e) {
return ''
@ -67,7 +67,7 @@ export default {
isActive() {
return (this.isValidUser && this.acl.userId === this.userId && this.acl.allowVote)
}
},
},
@ -76,9 +76,9 @@ export default {
if (this.isActive) {
this.$emit('voteClick')
}
}
},
}
},
}
</script>

Просмотреть файл

@ -57,20 +57,20 @@ export default {
name: 'VoteTable',
components: {
OptionItem,
VoteItem
VoteItem,
},
computed: {
...mapState({
poll: state => state.poll,
acl: state => state.acl
acl: state => state.acl,
}),
...mapGetters([
'sortedOptions',
'participantsVoted',
'votesRank',
'expired'
'expired',
]),
currentUser() {
@ -79,7 +79,7 @@ export default {
noOptions() {
return (this.sortedOptions.length === 0)
}
},
},
@ -108,11 +108,11 @@ export default {
userId: participant,
setTo: this.$store.getters.getNextAnswer({
option: option,
userId: participant
})
userId: participant,
}),
})
}
}
},
},
}
</script>

Просмотреть файл

@ -80,36 +80,36 @@ export default {
ActionButton,
Modal,
VoteTableHeader,
VoteItem
VoteItem,
},
data() {
return {
modal: false,
userToRemove: ''
userToRemove: '',
}
},
computed: {
...mapState({
poll: state => state.poll,
acl: state => state.acl
acl: state => state.acl,
}),
...mapGetters([
'sortedOptions',
'participants'
'participants',
]),
currentUser() {
return this.acl.userId
}
},
},
methods: {
removeUser() {
this.$store.dispatch('deleteVotes', {
userId: this.userToRemove
userId: this.userToRemove,
})
this.modal = false
this.userToRemove = ''
@ -127,11 +127,11 @@ export default {
userId: userId,
setTo: this.$store.getters.getNextAnswer({
option: option,
userId: userId
})
userId: userId,
}),
})
}
}
},
},
}
</script>

Просмотреть файл

@ -43,28 +43,28 @@ export default {
name: 'VoteTableHeader',
components: {
OptionItem
OptionItem,
},
props: {
option: {
type: Object,
default: undefined
default: undefined,
},
pollType: {
type: String,
default: undefined
}
default: undefined,
},
},
computed: {
...mapState({
poll: state => state.poll,
votes: state => state.votes.list
votes: state => state.votes.list,
}),
...mapGetters([
'votesRank',
'winnerCombo'
'winnerCombo',
]),
yesVotes() {
@ -98,8 +98,8 @@ export default {
return rank.pollOptionText === pollOptionText
}).maybe
)
}
}
},
},
}
</script>

Просмотреть файл

@ -67,5 +67,5 @@ new Vue({
el: '#content',
router: router,
store: store,
render: h => h(App)
render: h => h(App),
})

Просмотреть файл

@ -43,44 +43,44 @@ export default new Router({
redirect: {
name: 'list',
params: {
type: 'relevant'
}
}
type: 'relevant',
},
},
},
{
path: '/list/:type?',
components: {
default: List
default: List,
},
props: true,
name: 'list'
name: 'list',
},
{
path: '/not-found',
components: {
default: NotFound
default: NotFound,
},
name: 'notfound'
name: 'notfound',
},
{
path: '/vote/:id',
components: {
default: Vote
default: Vote,
},
props: true,
name: 'vote'
name: 'vote',
},
{
path: '/poll/:token',
redirect: '/s/:token'
redirect: '/s/:token',
},
{
path: '/s/:token',
components: {
default: Vote
default: Vote,
},
props: true,
name: 'publicVote'
}
]
name: 'publicVote',
},
],
})

Просмотреть файл

@ -33,5 +33,5 @@ const debug = process.env.NODE_ENV !== 'production'
export default new Vuex.Store({
modules,
strict: process.env.NODE_ENV !== 'production'
strict: process.env.NODE_ENV !== 'production',
})

Просмотреть файл

@ -38,7 +38,7 @@ const defaultAcl = () => {
allowSeeAllVotes: false,
foundByToken: false,
loggedIn: false,
accessLevel: ''
accessLevel: '',
}
}
@ -53,7 +53,7 @@ const mutations = {
resetAcl(state) {
Object.assign(state, defaultAcl())
}
},
}
@ -77,7 +77,7 @@ const actions = {
console.error('Error loading acl', { error: error.response }, { payload: payload })
throw error
})
}
},
}
export default { namespaced, state, mutations, actions }

Просмотреть файл

@ -25,7 +25,7 @@ import axios from '@nextcloud/axios'
const defaultComments = () => {
return {
list: []
list: [],
}
}
@ -49,13 +49,13 @@ const mutations = {
state.list = state.list.filter(comment => {
return comment.id !== payload.comment.id
})
}
},
}
const getters = {
countComments: state => {
return state.list.length
}
},
}
const actions = {
@ -90,7 +90,7 @@ const actions = {
return axios.post(OC.generateUrl(endPoint), {
token: context.rootState.acl.token,
comment: payload.comment
comment: payload.comment,
})
.then((response) => {
context.commit('removeComment', { comment: response.data.comment })
@ -113,7 +113,7 @@ const actions = {
pollId: context.rootState.poll.id,
token: context.rootState.acl.token,
message: payload.message,
userId: context.rootState.acl.userId
userId: context.rootState.acl.userId,
})
.then((response) => {
context.commit('addComment', response.data)
@ -122,7 +122,7 @@ const actions = {
console.error('Error writing comment', { error: error.response }, { payload: payload })
throw error
})
}
},
}
export default { state, mutations, actions, getters }

Просмотреть файл

@ -31,7 +31,7 @@ requireModule.keys().forEach(fileName => {
)
modules[moduleName] = {
namespaced: false,
...requireModule(fileName).default
...requireModule(fileName).default,
}
})
export default modules

Просмотреть файл

@ -25,7 +25,7 @@ import sortBy from 'lodash/sortBy'
const defaultOptions = () => {
return {
list: []
list: [],
}
}
@ -62,7 +62,7 @@ const mutations = {
} else {
state.list.splice(index, 1, payload.option)
}
}
},
}
const getters = {
@ -74,7 +74,7 @@ const getters = {
sortedOptions: state => {
return sortBy(state.list, 'order')
}
},
}
const actions = {
@ -160,7 +160,7 @@ const actions = {
console.error('Error removing option', { error: error.response }, { payload: payload })
throw error
})
}
},
}
export default { state, mutations, getters, actions }

Просмотреть файл

@ -40,7 +40,7 @@ const defaultPoll = () => {
showResults: 'always',
adminAccess: 0,
settings: '',
options: ''
options: '',
}
}
@ -57,7 +57,7 @@ const mutations = {
setPollProperty(state, payload) {
Object.assign(state, payload)
}
},
}
@ -79,7 +79,7 @@ const getters = {
allowEdit: (state, getters, rootState) => {
return (rootState.acl.allowEdit)
}
},
}
@ -121,7 +121,7 @@ const actions = {
throw error
})
}
},
}
export default { state, mutations, getters, actions, defaultPoll }

Просмотреть файл

@ -24,13 +24,13 @@
import axios from '@nextcloud/axios'
const state = {
list: []
list: [],
}
const mutations = {
setPolls(state, { list }) {
state.list = list
}
},
}
const getters = {
@ -65,7 +65,7 @@ const getters = {
poll.expire > 0 && moment.unix(poll.expire).diff() < 0 && !poll.deleted
))
}
}
},
}
const actions = {
@ -114,7 +114,7 @@ const actions = {
console.error('Error cloning poll', { error: error.response }, { payload: payload })
})
}
},
}

Просмотреть файл

@ -25,7 +25,7 @@ import axios from '@nextcloud/axios'
const defaultShares = () => {
return {
list: []
list: [],
}
}
@ -48,7 +48,7 @@ const mutations = {
addShare(state, payload) {
state.list.push(payload)
}
},
}
@ -73,7 +73,7 @@ const getters = {
countShares: state => {
return state.list.length
}
},
}
const actions = {
@ -172,7 +172,7 @@ const actions = {
console.error('Error removing share', { error: error.response }, { payload: payload })
throw error
})
}
},
}

Просмотреть файл

@ -25,7 +25,7 @@ import axios from '@nextcloud/axios'
const defaultSubscription = () => {
return {
subscribed: false
subscribed: false,
}
}
@ -35,7 +35,7 @@ const mutations = {
setSubscription(state, payload) {
state.subscribed = payload
}
},
}
@ -56,7 +56,7 @@ const actions = {
}, (error) => {
console.error(error.response)
})
}
},
}
export default { state, mutations, actions }

Просмотреть файл

@ -25,7 +25,7 @@ import orderBy from 'lodash/orderBy'
const defaultVotes = () => {
return {
list: []
list: [],
}
}
@ -54,7 +54,7 @@ const mutations = {
} else {
state.list.push(payload.vote)
}
}
},
}
const getters = {
@ -75,7 +75,7 @@ const getters = {
map.set(item.userId, true)
list.push({
userId: item.userId,
displayName: item.displayName
displayName: item.displayName,
})
}
}
@ -91,7 +91,7 @@ const getters = {
list.push({
userId: item.userId,
displayName: item.displayName,
voted: true
voted: true,
})
}
}
@ -100,7 +100,7 @@ const getters = {
list.push({
userId: rootState.acl.userId,
displayName: rootState.acl.displayName,
voted: false
voted: false,
})
}
return list
@ -117,7 +117,7 @@ const getters = {
pollOptionText: option.pollOptionText,
yes: countYes,
no: countNo,
maybe: countMaybe
maybe: countMaybe,
})
})
rank = orderBy(rank, ['yes', 'maybe'], ['desc', 'desc'])
@ -149,7 +149,7 @@ const getters = {
return getters.answerSequence[1]
}
}
},
}
@ -180,7 +180,7 @@ const actions = {
return axios.post(OC.generateUrl(endPoint), {
pollId: context.rootState.poll.id,
voteId: 0,
userId: payload.userId
userId: payload.userId,
})
.then(() => {
context.commit('deleteVotes', payload)
@ -203,7 +203,7 @@ const actions = {
token: context.rootState.acl.token,
option: payload.option,
userId: payload.userId,
setTo: payload.setTo
setTo: payload.setTo,
})
.then((response) => {
context.commit('setVote', { option: payload.option, pollId: context.rootState.poll.id, vote: response.data })
@ -212,7 +212,7 @@ const actions = {
console.error('Error setting vote', { error: error.response }, { payload: payload })
throw error
})
}
},
}

Просмотреть файл

@ -42,13 +42,13 @@ import { AppContent } from '@nextcloud/vue'
export default {
name: 'NotFound',
components: {
AppContent
AppContent,
},
methods: {
gotoLogin() {
window.location.replace(OC.generateUrl('/'))
}
}
},
},
}
</script>

Просмотреть файл

@ -62,7 +62,7 @@ export default {
components: {
AppContent,
LoadingOverlay,
PollItem
PollItem,
},
data() {
@ -70,7 +70,7 @@ export default {
noPolls: false,
isLoading: false,
sort: 'created',
reverse: true
reverse: true,
}
},
@ -127,14 +127,14 @@ export default {
} else {
return sortBy(this.filteredPolls(this.$route.params.type), this.sort)
}
}
},
},
watch: {
$route() {
this.refreshView()
}
},
},
mounted() {
@ -165,11 +165,11 @@ export default {
this.$router.push({
name: name,
params: {
id: poll.id
}
id: poll.id,
},
})
}
}
},
},
}
</script>

Просмотреть файл

@ -94,7 +94,7 @@ export default {
LoadingOverlay,
VoteHeaderPublic,
VoteTable,
VoteList
VoteList,
},
data() {
@ -102,7 +102,7 @@ export default {
voteSaved: false,
delay: 50,
isLoading: true,
tableMode: true
tableMode: true,
}
},
@ -110,23 +110,23 @@ export default {
...mapState({
poll: state => state.poll,
acl: state => state.acl,
options: state => state.options
options: state => state.options,
}),
...mapGetters([
'expired'
'expired',
]),
windowTitle: function() {
return t('polls', 'Polls') + ' - ' + this.poll.title
}
},
},
watch: {
$route() {
this.loadPoll()
}
},
},
created() {
@ -169,8 +169,8 @@ export default {
this.isLoading = false
this.$router.replace({ name: 'notfound' })
})
}
}
},
},
}
</script>