Skip to content

Commit

Permalink
Merge pull request #11448 from nextcloud/feat/11372/live-polls
Browse files Browse the repository at this point in the history
feat(Poll): live polls pop-ups during the call
  • Loading branch information
Antreesy authored Feb 21, 2024
2 parents 2833efc + ae19ca8 commit 22848f4
Show file tree
Hide file tree
Showing 11 changed files with 622 additions and 461 deletions.
3 changes: 3 additions & 0 deletions src/PublicShareAuthSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
:is-sidebar="true" />
<CallView :token="token" :is-sidebar="true" />
<ChatView />
<PollViewer />
<MediaSettings :recording-consent-given.sync="recordingConsentGiven" />
</template>
</aside>
Expand All @@ -46,6 +47,7 @@ import { loadState } from '@nextcloud/initial-state'
import CallView from './components/CallView/CallView.vue'
import ChatView from './components/ChatView.vue'
import MediaSettings from './components/MediaSettings/MediaSettings.vue'
import PollViewer from './components/PollViewer/PollViewer.vue'
import TopBar from './components/TopBar/TopBar.vue'
import TransitionWrapper from './components/TransitionWrapper.vue'

Expand All @@ -66,6 +68,7 @@ export default {
CallView,
ChatView,
MediaSettings,
PollViewer,
TopBar,
TransitionWrapper,
},
Expand Down
7 changes: 5 additions & 2 deletions src/PublicShareSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<PreventUnload :when="warnLeaving" />
<CallButton class="call-button" />
<ChatView />
<PollViewer />
<MediaSettings :recording-consent-given.sync="recordingConsentGiven" />
</template>
</aside>
Expand All @@ -63,6 +64,7 @@ import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import CallView from './components/CallView/CallView.vue'
import ChatView from './components/ChatView.vue'
import MediaSettings from './components/MediaSettings/MediaSettings.vue'
import PollViewer from './components/PollViewer/PollViewer.vue'
import CallButton from './components/TopBar/CallButton.vue'
import TopBar from './components/TopBar/TopBar.vue'
import TransitionWrapper from './components/TransitionWrapper.vue'
Expand All @@ -83,12 +85,13 @@ export default {
name: 'PublicShareSidebar',

components: {
NcButton,
CallButton,
CallView,
ChatView,
PreventUnload,
MediaSettings,
NcButton,
PollViewer,
PreventUnload,
TopBar,
TransitionWrapper,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
:class="{
'system-message': isSystemMessage && !showJoinCallButton,
'deleted-message': isDeletedMessage,
'call-started': showJoinCallButton,
'message-highlighted': showJoinCallButton,
}">
<!-- Message content / text -->
<CancelIcon v-if="isDeletedMessage" :size="16" />
Expand All @@ -49,6 +49,7 @@
<!-- Normal message body content -->
<div v-else
class="message-main__text markdown-message"
:class="{'message-highlighted': isNewPollMessage }"
@mouseover="handleMarkdownMouseOver"
@mouseleave="handleMarkdownMouseLeave">
<!-- Replied parent message -->
Expand Down Expand Up @@ -284,6 +285,14 @@ export default {
return this.messageParameters?.file
},

isNewPollMessage() {
if (this.messageParameters?.object?.type !== 'talk-poll') {
return false
}

return this.isInCall && !!this.$store.getters.getNewPolls[this.messageParameters.object.id]
},

hideDate() {
return this.isTemporary || this.isDeleting || !!this.sendingFailure
},
Expand Down Expand Up @@ -442,7 +451,7 @@ export default {
padding: 0 20px;
}

&.call-started {
&.message-highlighted {
color: var(--color-text-light);
background-color: var(--color-primary-element-light);
padding: 10px;
Expand Down
Loading

0 comments on commit 22848f4

Please sign in to comment.