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

Qall中のチャンネル一覧の表示 みんながどこにいるかわかるぜ~ #4475

Merged
merged 6 commits into from
Jan 24, 2025
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/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
window.addEventListener('beforeunload', event => {
// TODO: Qall
// ここは適切な変数を置く
const isCurrentDevice = computed(() => true)
const isCurrentDevice = computed(() => false)

Check warning on line 28 in src/App.vue

View check run for this annotation

Codecov / codecov/patch

src/App.vue#L28

Added line #L28 was not covered by tests
if (isCurrentDevice.value) {
const unloadMessage = 'Qall中ですが本当に終了しますか?'
event.preventDefault()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<template>
<div :class="$style.container">
<template v-if="!isMobile">
<!-- TODO:Qall -->
<!-- 元々はデフォルト値ではなくUseQallの関数で計算していた -->
<header-tools-item
v-if="true"
icon-mdi
:icon-name="'phone'"
:icon-name="isCallingHere ? 'phone' : 'phone-outline'"

Check warning on line 7 in src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsList.vue#L7

Added line #L7 was not covered by tests
:class="$style.qallIcon"
:disabled="false"
:data-is-active="$boolAttr(true)"
:data-is-joined="$boolAttr(true)"
:disabled="disabled"
:data-is-active="$boolAttr(isCallingHere)"
:data-is-joined="$boolAttr(isCallingHere)"

Check warning on line 11 in src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsList.vue#L9-L11

Added lines #L9 - L11 were not covered by tests
:tooltip="'Qallボタン'"
@click="joinQall(props.channelId)"
/>
Expand Down Expand Up @@ -80,7 +78,9 @@

const { isMobile } = useResponsiveStore()

const { joinQall } = useQall()
const { joinQall, callingChannel } = useQall()
const isCallingHere = computed(() => callingChannel.value === props.channelId)
const disabled = computed(() => !!callingChannel.value && !isCallingHere.value)

Check warning on line 83 in src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsList.vue#L81-L83

Added lines #L81 - L83 were not covered by tests

const { changeToNextSubscriptionLevel, currentChannelSubscription } =
useChannelSubscriptionState(toRef(props, 'channelId'))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<template>
<primary-view-header-popup-frame>
<!-- TODO:Qall -->
<!-- 元々はデフォルト値ではなくUseQallの関数で計算していた -->
<header-tools-menu-item
v-if="isMobile"
:icon-name="'phone'"
:icon-name="isCallingHere ? 'phone' : 'phone-outline'"

Check warning on line 5 in src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsMenu.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsMenu.vue#L5

Added line #L5 was not covered by tests
icon-mdi
:class="$style.qallIcon"
:label="'Qallを開始'"
:disabled="false"
:data-is-active="$boolAttr(true)"
:disabled="disabled"
:data-is-active="$boolAttr(isCallingHere)"

Check warning on line 10 in src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsMenu.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsMenu.vue#L9-L10

Added lines #L9 - L10 were not covered by tests
@click="joinQall(props.channelId)"
@click-item="emit('clickItem')"
/>
Expand Down Expand Up @@ -86,7 +84,9 @@

const { isMobile } = useResponsiveStore()

const { joinQall } = useQall()
const { joinQall, callingChannel } = useQall()
const isCallingHere = computed(() => callingChannel.value === props.channelId)
const disabled = computed(() => !!callingChannel.value && !isCallingHere.value)

Check warning on line 89 in src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsMenu.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/ChannelView/ChannelHeader/ChannelHeaderToolsMenu.vue#L87-L89

Added lines #L87 - L89 were not covered by tests

const { isChildChannelCreatable, openChannelCreateModal } =
useChannelCreateModal(props)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
:viewer-ids="viewerIds"
:class="$style.sidebarItem"
/>
<!-- TODO: Qall -->
<!-- デザインが確定したら消すか消さないか決める -->
<channel-sidebar-qall
v-if="qallUserIds.length > 0"
:qall-user-ids="qallUserIds"
Expand Down Expand Up @@ -52,6 +50,8 @@
import ChannelSidebarBots from './ChannelSidebarBots.vue'
import type { UserId, ChannelId } from '/@/types/entity-ids'
import { useModelSyncer } from '/@/composables/useModelSyncer'
import { useQall } from '/@/composables/qall/useQall'
import { computed } from 'vue'

Check warning on line 54 in src/components/Main/MainView/ChannelView/ChannelSidebar/ChannelSidebarContent.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/ChannelView/ChannelSidebar/ChannelSidebarContent.vue#L53-L54

Added lines #L53 - L54 were not covered by tests

const props = withDefaults(
defineProps<{
Expand All @@ -71,7 +71,14 @@
(e: 'update:isViewersDetailOpen', value: boolean): void
}>()

const qallUserIds: UserId[] = []
const { rooms: roomWithParticipants } = useQall()

Check warning on line 74 in src/components/Main/MainView/ChannelView/ChannelSidebar/ChannelSidebarContent.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/ChannelView/ChannelSidebar/ChannelSidebarContent.vue#L74

Added line #L74 was not covered by tests

const qallUserIds = computed(
() =>
roomWithParticipants.value
.find(room => room.channel.id === props.channelId)
?.participants?.map(participant => participant.user.id) ?? []
)

Check warning on line 81 in src/components/Main/MainView/ChannelView/ChannelSidebar/ChannelSidebarContent.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/ChannelView/ChannelSidebar/ChannelSidebarContent.vue#L76-L81

Added lines #L76 - L81 were not covered by tests

const isViewersDetailOpen = useModelSyncer(props, emit, 'isViewersDetailOpen')
</script>
Expand Down
9 changes: 7 additions & 2 deletions src/components/Main/MainView/QallView/AudioTrack.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
<script setup lang="ts">
import { onMounted, onUnmounted, useTemplateRef, watchEffect } from 'vue'
import type { TrackInfo } from '/@/composables/qall/useLiveKitSDK'
import { useRtcSettings } from '/@/store/app/rtcSettings'

Check warning on line 4 in src/components/Main/MainView/QallView/AudioTrack.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/AudioTrack.vue#L4

Added line #L4 was not covered by tests
const { trackInfo, volume } = defineProps<{
trackInfo: TrackInfo
volume: number
}>()
const audioElement = useTemplateRef<HTMLMediaElement>('audioElement')
const audioContext = new AudioContext()
const gainNode = audioContext.createGain()
gainNode.gain.value = 1
const { masterVolume } = useRtcSettings()
gainNode.gain.value = volume * masterVolume.value

Check warning on line 13 in src/components/Main/MainView/QallView/AudioTrack.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/AudioTrack.vue#L12-L13

Added lines #L12 - L13 were not covered by tests

watchEffect(() => {
gainNode.gain.value = volume
gainNode.gain.exponentialRampToValueAtTime(
Math.max(volume * masterVolume.value, 1e-44),
audioContext.currentTime + 0.2
)

Check warning on line 19 in src/components/Main/MainView/QallView/AudioTrack.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/AudioTrack.vue#L16-L19

Added lines #L16 - L19 were not covered by tests
})

onMounted(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import { usePath } from './composables/usePath'
import AIcon from '/@/components/UI/AIcon.vue'
import UserIconEllipsisList from '/@/components/UI/UserIconEllipsisList.vue'
import { useQall } from '/@/composables/qall/useQall'

Check warning on line 31 in src/components/Main/NavigationBar/ChannelList/ChannelElementName.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/NavigationBar/ChannelList/ChannelElementName.vue#L31

Added line #L31 was not covered by tests

const props = withDefaults(
defineProps<{
Expand All @@ -43,7 +44,11 @@
const typedProps = props as TypedProps

const { pathToShow, pathTooltip } = usePath(typedProps)
const qallUserIds: string[] = []
const { rooms } = useQall()
const qallUserIds: string[] =
rooms.value
.find(room => room.channel.id === props.channel.id)
?.participants.map(participant => participant.user.id) ?? []

Check warning on line 51 in src/components/Main/NavigationBar/ChannelList/ChannelElementName.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/NavigationBar/ChannelList/ChannelElementName.vue#L47-L51

Added lines #L47 - L51 were not covered by tests
</script>

<style lang="scss" module>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<template>
<ephemeral-navigation-content-container :transparent="transparent">
<transition name="fade-bottom" mode="out-in">
<qall-controller v-if="currentEphemeralNavigation === 'qallController'" />
<SubQallView v-else-if="currentEphemeralNavigation === 'draftList'" />

<!-- <draft-list v-else-if="currentEphemeralNavigation === 'draftList'" /> -->
<SubQallView v-if="currentEphemeralNavigation === 'qallController'" />
<DraftList v-else-if="currentEphemeralNavigation === 'draftList'" />

Check warning on line 5 in src/components/Main/NavigationBar/EphemeralNavigationContent/EphemeralNavigationContent.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/NavigationBar/EphemeralNavigationContent/EphemeralNavigationContent.vue#L4-L5

Added lines #L4 - L5 were not covered by tests
<audio-controller
v-else-if="currentEphemeralNavigation === 'audioController'"
/>
Expand All @@ -14,10 +12,10 @@

<script lang="ts" setup>
import EphemeralNavigationContentContainer from './EphemeralNavigationContentContainer.vue'
import QallController from './QallController/QallController.vue'
import AudioController from './AudioController/AudioController.vue'
import type { EphemeralNavigationItemType } from '/@/components/Main/NavigationBar/composables/useNavigationConstructor'
import SubQallView from '../../MainView/QallView/SubQallView.vue'
import DraftList from './DraftList/DraftList.vue'

Check warning on line 18 in src/components/Main/NavigationBar/EphemeralNavigationContent/EphemeralNavigationContent.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/NavigationBar/EphemeralNavigationContent/EphemeralNavigationContent.vue#L18

Added line #L18 was not covered by tests

withDefaults(
defineProps<{
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading