Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 5s to notifications in a few places #814

Merged
merged 1 commit into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default {
.catch((e) => {
console.error('Problem to load spaces only', e)
const text = t('workspace', 'A network error occured while trying to retrieve workspaces.<br>The error is: {error}', { error: e })
showNotificationError('Network error', text)
showNotificationError('Network error', text, 5000)
this.$store.state.loading = false
})
}
Expand Down
21 changes: 15 additions & 6 deletions src/services/groupfoldersService.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function get(groupfolderId) {
}
})
.catch((error) => {
showNotificationError('Error to get the groupfolder', error.message)
showNotificationError('Error to get the groupfolder', error.message, 5000)
throw new Error(error.message)
})
}
Expand Down Expand Up @@ -128,7 +128,7 @@ export async function checkGroupfolderNameExist(spaceName) {
showNotificationError('Error - Duplicate space name', 'This space or groupfolder already exist. Please, input another space.\nIf "toto" space exist, you cannot create the "tOTo" space.\nMake sure you the groupfolder doesn\'t exist.', 5000)
throw new CheckGroupfolderNameExistError('This space or groupfolder already exist. Please, input another space.'
+ '\nIf "toto" space exist, you cannot create the "tOTo" space.'
+ '\nMake sure you the groupfolder doesn\'t exist.')
+ '\nMake sure you the groupfolder doesn\'t exist.', 5000)
}
return false
}
Expand Down Expand Up @@ -172,7 +172,10 @@ export function addGroupToGroupfolder(folderId, gid) {
return resp.data.ocs.data
})
.catch(error => {
showNotificationError('Error groups', `Impossible to attach the ${error} group to groupfolder. May be a problem with the connection ?`)
showNotificationError(
'Error groups',
`Impossible to attach the ${error} group to groupfolder. May be a problem with the connection ?`,
5000)
console.error(`Impossible to attach the ${gid} group to groupfolder. May be a problem with the connection ?`, error)
throw new AddGroupToGroupfolderError('Error to add Space Manager group in the groupfolder')
})
Expand All @@ -195,7 +198,10 @@ export function addGroupToManageACLForGroupfolder(folderId, gid) {
return resp.data.ocs.data
})
.catch(error => {
showNotificationError('Error to add group as manager acl', 'Impossible to add the Space Manager group in Manage ACL groupfolder')
showNotificationError(
'Error to add group as manager acl',
'Impossible to add the Space Manager group in Manage ACL groupfolder',
5000)
console.error('Impossible to add the Space Manager group in Manage ACL groupfolder', error)
throw new AddGroupToManageACLForGroupfolderError('Error to add the Space Manager group in manage ACL groupfolder')
})
Expand All @@ -218,7 +224,10 @@ export function removeGroupToManageACLForGroupfolder(folderId, gid) {
return resp.data.ocs.data
})
.catch(error => {
showNotificationError('Error to remove group as manager acl', 'Impossible to remove the group from the advanced permissions.')
showNotificationError(
'Error to remove group as manager acl',
'Impossible to remove the group from the advanced permissions.',
5000)
console.error('Impossible to remove the group from the advanced permissions.', error)
throw new RemoveGroupToManageACLForGroupfolderError('Impossible to remove the group from the advanced permissions.')
})
Expand All @@ -241,7 +250,7 @@ export function createGroupfolder(spaceName) {
return resp.data.ocs
})
.catch(error => {
showNotificationError('Error - Creating space', error.message)
showNotificationError('Error - Creating space', error.message, 5000)
throw new CreateGroupfolderError('Network error - the error is: ' + error.message)
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/spaceService.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function createSpace(spaceName, folderId, vueInstance = undefined) {
})
.catch(error => {
if (typeof (vueInstance) !== 'undefined') {
showNotificationError('Error to create a workspace', error.message)
showNotificationError('Error to create a workspace', error.message, 5000)
}
throw new BadCreateError(error)
})
Expand Down
2 changes: 1 addition & 1 deletion src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default {
// Restore frontend and inform user
context.commit('removeUserFromGroup', { name, gid, user })
const text = t('workspace', 'An error occured while trying to add user ') + user.name
showNotificationError('Error', text)
showNotificationError('Error', text, 5000)
}
}).catch((e) => {
// Restore frontend and inform user
Expand Down