Skip to content

Commit

Permalink
Merge pull request #4496 from traPtitech/feat/comment-btn
Browse files Browse the repository at this point in the history
Feat/comment btn
  • Loading branch information
mathsuky authored Jan 26, 2025
2 parents e7f8134 + 085f7d1 commit 288ac27
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 32 deletions.
6 changes: 4 additions & 2 deletions src/assets/mdi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ import {
mdiNotebook,
mdiDelete,
mdiVideo,
mdiVideoOff
mdiVideoOff,
mdiCommentTextMultipleOutline
} from '@mdi/js'

interface MdiIconsMapping {
Expand Down Expand Up @@ -179,7 +180,8 @@ const mdi: MdiIconsMapping = {
'format-title': mdiFormatTitle,
delete: mdiDelete,
video: mdiVideo,
'video-off': mdiVideoOff
'video-off': mdiVideoOff,
'comment-outline': mdiCommentTextMultipleOutline

Check warning on line 184 in src/assets/mdi.ts

View check run for this annotation

Codecov / codecov/patch

src/assets/mdi.ts#L181-L184

Added lines #L181 - L184 were not covered by tests
}

export default mdi
31 changes: 14 additions & 17 deletions src/components/Main/MainView/QallView/QallMessageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import useChannelMessageFetcher from '../ChannelView/ChannelViewContent/composab
import { useChannelsStore } from '/@/store/entities/channels'
import MessageElement from '/@/components/Main/MainView/MessageElement/MessageElement.vue'
import { useSubscriptionStore } from '/@/store/domain/subscription'

Check warning on line 10 in src/components/Main/MainView/QallView/QallMessageView.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallMessageView.vue#L7-L10

Added lines #L7 - L10 were not covered by tests
import FormButton from '/@/components/UI/FormButton.vue'
const props = defineProps<{

Check warning on line 12 in src/components/Main/MainView/QallView/QallMessageView.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallMessageView.vue#L12

Added line #L12 was not covered by tests
channelId: ChannelId
Expand Down Expand Up @@ -57,6 +56,20 @@ const handleScroll = () => {
showToNewMessageButton.value = true
}
}

Check warning on line 58 in src/components/Main/MainView/QallView/QallMessageView.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallMessageView.vue#L51-L58

Added lines #L51 - L58 were not covered by tests
const handleMessage = () => {
if (isMessageShow.value) {
isMessageShow.value = false
toNewMessage('smooth')
} else {
isMessageShow.value = true
nextTick(() => toNewMessage())
}
}

Check warning on line 68 in src/components/Main/MainView/QallView/QallMessageView.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallMessageView.vue#L60-L68

Added lines #L60 - L68 were not covered by tests
defineExpose({
handleMessage
})

Check warning on line 72 in src/components/Main/MainView/QallView/QallMessageView.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallMessageView.vue#L70-L72

Added lines #L70 - L72 were not covered by tests
</script>

<template>
Expand Down Expand Up @@ -97,22 +110,6 @@ const handleScroll = () => {
</template>
</messages-scroller>
</transition>
<div :class="$style.uiElement">
<FormButton
label="メッセージを表示"
@click="
() => {
if (isMessageShow) {
isMessageShow = false
toNewMessage('smooth')
} else {
isMessageShow = true
nextTick(() => toNewMessage())
}
}
"
/>
</div>
</div>
<slot name="default"></slot>
</div>
Expand Down
36 changes: 23 additions & 13 deletions src/components/Main/MainView/QallView/QallView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ import { useStampPickerInvoker } from '/@/store/ui/stampPicker'
import ParticipantList from './ParticipantList.vue'

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

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallView.vue#L2-L10

Added lines #L2 - L10 were not covered by tests
import type { TrackInfo } from '/@/composables/qall/useLiveKitSDK'
import UserList from './UserList.vue'
import { useModalStore } from '/@/store/ui/modal'
import CameraDetailSetting from './CameraDetailSetting.vue'
import ScreenShareDetailSetting from './ScreenShareDetailSetting.vue'
import DetailButton from './DetailButton.vue'
import IconButton from '/@/components/UI/IconButton.vue'
import QallMessageView from './QallMessageView.vue'

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

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallView.vue#L12-L17

Added lines #L12 - L17 were not covered by tests
const { pushModal } = useModalStore()
const {
tracksMap,
screenShareTracks,
Expand Down Expand Up @@ -177,23 +174,28 @@ const handleBackgroundSave = (data: {
const showCameraDetailSetting = ref(false)
const showShareScreenSettingDetail = ref(false)

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

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallView.vue#L175-L176

Added lines #L175 - L176 were not covered by tests
const childRef = ref<InstanceType<typeof QallMessageView> | null>(null)

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

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallView.vue#L178

Added line #L178 was not covered by tests
const showMessage = () => {
childRef.value?.handleMessage()
}

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

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallView.vue#L180-L182

Added lines #L180 - L182 were not covered by tests
</script>

<template>
<div :class="$style.Block">
<QallMessageView :channel-id="callingChannel" :typing-users="[]">
<QallMessageView
ref="childRef"
:channel-id="callingChannel"
:typing-users="[]"

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

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/QallView/QallView.vue#L187-L190

Added lines #L187 - L190 were not covered by tests
>
<DanmakuContainer />
<IconButton
icon-name="close"
icon-mdi
:class="$style.closeButton"
@click="isSubView = true"
/>

<!-- 縦並び用のラッパ -->
<div :class="$style.iconContainer">
<IconButton icon-name="comment-outline" icon-mdi @click="showMessage" />
<IconButton icon-name="close" icon-mdi @click="isSubView = true" />
</div>
<div :class="$style.stackContainer">
<UserList :class="$style.userList" />

<div :class="$style.controlBarContainer">
<div :class="$style.controlBar">
<div :class="$style.smallButtonGroup">
Expand Down Expand Up @@ -380,4 +382,12 @@ const showShareScreenSettingDetail = ref(false)
top: 1rem;
right: 1rem;
}
.iconContainer {
display: flex;
gap: 4px;
position: absolute;
top: 1rem;
right: 1rem;
}
</style>

0 comments on commit 288ac27

Please sign in to comment.