зеркало из https://github.com/nextcloud/spreed.git
Add Participants button
Signed-off-by: Marco <marcoambrosini@icloud.com>
This commit is contained in:
Родитель
84c60c932c
Коммит
2973e187c3
|
@ -66,10 +66,10 @@
|
||||||
:is-sidebar="isSidebar"
|
:is-sidebar="isSidebar"
|
||||||
:model="localMediaModel" />
|
:model="localMediaModel" />
|
||||||
|
|
||||||
<div class="top-bar__buttons">
|
<CallButton class="top-bar__button" />
|
||||||
<CallButton class="top-bar__button" />
|
|
||||||
|
|
||||||
<!-- sidebar toggle -->
|
<!-- chat button -->
|
||||||
|
<div class="chat-button">
|
||||||
<NcActions v-if="showOpenSidebarButton"
|
<NcActions v-if="showOpenSidebarButton"
|
||||||
class="top-bar__button"
|
class="top-bar__button"
|
||||||
close-after-click="true"
|
close-after-click="true"
|
||||||
|
@ -82,20 +82,26 @@
|
||||||
fill-color="#ffffff" />
|
fill-color="#ffffff" />
|
||||||
</template>
|
</template>
|
||||||
</NcActionButton>
|
</NcActionButton>
|
||||||
<NcActionButton v-else
|
|
||||||
key="openSideBarButtonMenuPeople"
|
|
||||||
@click="openSidebar">
|
|
||||||
<template #icon>
|
|
||||||
<MenuPeople :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
</NcActions>
|
</NcActions>
|
||||||
|
<NcCounterBubble v-if="!isSidebar && showOpenSidebarButton && isInCall && unreadMessagesCounter > 0"
|
||||||
|
class="chat-button__unread-messages-counter"
|
||||||
|
:highlighted="hasUnreadMentions">
|
||||||
|
{{ unreadMessagesCounter }}
|
||||||
|
</NcCounterBubble>
|
||||||
</div>
|
</div>
|
||||||
<NcCounterBubble v-if="!isSidebar && showOpenSidebarButton && isInCall && unreadMessagesCounter > 0"
|
|
||||||
class="unread-messages-counter"
|
<!-- participants button -->
|
||||||
:highlighted="hasUnreadMentions">
|
<NcButton v-if="showOpenSidebarButton"
|
||||||
{{ unreadMessagesCounter }}
|
class="top-bar__button"
|
||||||
</NcCounterBubble>
|
close-after-click="true"
|
||||||
|
:type="isInCall ? 'tertiary-on-primary': 'tertiary'"
|
||||||
|
@click="openSidebar">
|
||||||
|
<template #icon>
|
||||||
|
<AccountMultiple :size="20"
|
||||||
|
:fill-color="isInCall ? '#ffffff': ''" />
|
||||||
|
</template>
|
||||||
|
{{ isInCall ? participantsInCall : '' }}
|
||||||
|
</NcButton>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -106,7 +112,7 @@ import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
|
||||||
import NcCounterBubble from '@nextcloud/vue/dist/Components/NcCounterBubble.js'
|
import NcCounterBubble from '@nextcloud/vue/dist/Components/NcCounterBubble.js'
|
||||||
import CallButton from './CallButton.vue'
|
import CallButton from './CallButton.vue'
|
||||||
import BrowserStorage from '../../services/BrowserStorage.js'
|
import BrowserStorage from '../../services/BrowserStorage.js'
|
||||||
import MenuPeople from '../missingMaterialDesignIcons/MenuPeople.vue'
|
import AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'
|
||||||
import MessageText from 'vue-material-design-icons/MessageText.vue'
|
import MessageText from 'vue-material-design-icons/MessageText.vue'
|
||||||
import { CONVERSATION } from '../../constants.js'
|
import { CONVERSATION } from '../../constants.js'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
@ -119,6 +125,7 @@ import userStatus from '../../mixins/userStatus.js'
|
||||||
import LocalMediaControls from '../CallView/shared/LocalMediaControls.vue'
|
import LocalMediaControls from '../CallView/shared/LocalMediaControls.vue'
|
||||||
import getParticipants from '../../mixins/getParticipants.js'
|
import getParticipants from '../../mixins/getParticipants.js'
|
||||||
import TopBarMenu from './TopBarMenu.vue'
|
import TopBarMenu from './TopBarMenu.vue'
|
||||||
|
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TopBar',
|
name: 'TopBar',
|
||||||
|
@ -132,11 +139,12 @@ export default {
|
||||||
NcActions,
|
NcActions,
|
||||||
NcCounterBubble,
|
NcCounterBubble,
|
||||||
CallButton,
|
CallButton,
|
||||||
MenuPeople,
|
AccountMultiple,
|
||||||
MessageText,
|
MessageText,
|
||||||
ConversationIcon,
|
ConversationIcon,
|
||||||
LocalMediaControls,
|
LocalMediaControls,
|
||||||
TopBarMenu,
|
TopBarMenu,
|
||||||
|
NcButton,
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [
|
mixins: [
|
||||||
|
@ -246,6 +254,10 @@ export default {
|
||||||
return !peer.sessionIds.length
|
return !peer.sessionIds.length
|
||||||
} else return false
|
} else return false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
participantsInCall() {
|
||||||
|
return this.$store.getters.participantsInCall(this.token)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -355,11 +367,6 @@ export default {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__buttons {
|
|
||||||
display: flex;
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__button {
|
&__button {
|
||||||
margin: 0 2px;
|
margin: 0 2px;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
@ -375,11 +382,14 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.unread-messages-counter {
|
.chat-button {
|
||||||
position: absolute;
|
position: relative;
|
||||||
top: 40px;
|
&__unread-messages-counter {
|
||||||
right: 4px;
|
position: absolute;
|
||||||
pointer-events: none;
|
top: 24px;
|
||||||
|
right: 2px;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -155,6 +155,14 @@ const getters = {
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
participantsInCall: (state) => (token) => {
|
||||||
|
if (state.inCall[token]) {
|
||||||
|
return Object.keys(state.inCall[token]).length
|
||||||
|
} else {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче