зеркало из https://github.com/nextcloud/spreed.git
Uppercase all constants
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
This commit is contained in:
Родитель
9643156a29
Коммит
1796ec2056
|
@ -30,7 +30,7 @@
|
|||
|
||||
<script>
|
||||
import Avatar from 'nextcloud-vue/dist/Components/Avatar'
|
||||
import { Conversation } from '../constants'
|
||||
import { CONVERSATION } from '../constants'
|
||||
|
||||
export default {
|
||||
name: 'ConversationIcon',
|
||||
|
@ -55,11 +55,11 @@ export default {
|
|||
return 'icon-file'
|
||||
} else if (this.item.objectType === 'share:password') {
|
||||
return 'icon-password'
|
||||
} else if (this.item.type === Conversation.Type.CHANGELOG) {
|
||||
} else if (this.item.type === CONVERSATION.TYPE.CHANGELOG) {
|
||||
return 'icon-changelog'
|
||||
} else if (this.item.type === Conversation.Type.GROUP) {
|
||||
} else if (this.item.type === CONVERSATION.TYPE.GROUP) {
|
||||
return 'icon-contacts'
|
||||
} else if (this.item.type === Conversation.Type.PUBLIC) {
|
||||
} else if (this.item.type === CONVERSATION.TYPE.PUBLIC) {
|
||||
return 'icon-public'
|
||||
}
|
||||
|
||||
|
|
|
@ -17,37 +17,37 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
export const Conversation = {
|
||||
StartCall: {
|
||||
export const CONVERSATION = {
|
||||
START_CALL: {
|
||||
EVERYONE: 0,
|
||||
USERS: 1,
|
||||
MODERATORS: 2
|
||||
},
|
||||
State: {
|
||||
STATE: {
|
||||
READ_WRITE: 0,
|
||||
READ_ONLY: 1
|
||||
},
|
||||
Type: {
|
||||
TYPE: {
|
||||
ONE_TO_ONE: 1,
|
||||
GROUP: 2,
|
||||
PUBLIC: 3,
|
||||
CHANGELOG: 4
|
||||
}
|
||||
}
|
||||
export const Participant = {
|
||||
CallFlag: {
|
||||
export const PARTICIPANT = {
|
||||
CALL_FLAG: {
|
||||
DISCONNECTED: 0,
|
||||
IN_CALL: 1,
|
||||
WITH_AUDIO: 2,
|
||||
WITH_VIDEO: 4
|
||||
},
|
||||
Notify: {
|
||||
NOTIFY: {
|
||||
DEFAULT: 0,
|
||||
ALWAYS: 1,
|
||||
MENTION: 2,
|
||||
NEVER: 3
|
||||
},
|
||||
Type: {
|
||||
TYPE: {
|
||||
OWNER: 1,
|
||||
MODERATOR: 2,
|
||||
USER: 3,
|
||||
|
@ -56,8 +56,8 @@ export const Participant = {
|
|||
GUEST_MODERATOR: 6
|
||||
}
|
||||
}
|
||||
export const Webinar = {
|
||||
Lobby: {
|
||||
export const WEBINAR = {
|
||||
LOBBY: {
|
||||
NONE: 0,
|
||||
NON_MODERATORS: 1
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
import axios from 'nextcloud-axios'
|
||||
import { generateOcsUrl } from 'nextcloud-router'
|
||||
import { Conversation } from '../constants'
|
||||
import { CONVERSATION } from '../constants'
|
||||
|
||||
/**
|
||||
* Fetches the conversations from the server.
|
||||
|
@ -55,7 +55,7 @@ const searchPossibleConversations = async function(searchText) {
|
|||
*/
|
||||
const createOneToOneConversation = async function(userId) {
|
||||
try {
|
||||
const response = await axios.post(generateOcsUrl('apps/spreed/api/v1', 2) + `room`, { roomType: Conversation.Type.ONE_TO_ONE, invite: userId })
|
||||
const response = await axios.post(generateOcsUrl('apps/spreed/api/v1', 2) + `room`, { roomType: CONVERSATION.TYPE.ONE_TO_ONE, invite: userId })
|
||||
return response
|
||||
} catch (error) {
|
||||
console.debug('Error creating new one to one conversation: ', error)
|
||||
|
@ -68,7 +68,7 @@ const createOneToOneConversation = async function(userId) {
|
|||
*/
|
||||
const createGroupConversation = async function(groupId) {
|
||||
try {
|
||||
const response = await axios.post(generateOcsUrl('apps/spreed/api/v1', 2) + `room`, { roomType: Conversation.Type.GROUP, invite: groupId })
|
||||
const response = await axios.post(generateOcsUrl('apps/spreed/api/v1', 2) + `room`, { roomType: CONVERSATION.TYPE.GROUP, invite: groupId })
|
||||
return response
|
||||
} catch (error) {
|
||||
console.debug('Error creating new group conversation: ', error)
|
||||
|
|
Загрузка…
Ссылка в новой задаче