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

Less clicks to record #706

Merged
Merged
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
35 changes: 34 additions & 1 deletion src/components/mini-widgets/MiniVideoRecorder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
@click="toggleRecording()"
/>
<template v-if="!isRecording">
<FontAwesomeIcon icon="fa-solid fa-video" class="h-6 text-slate-100" />
<div
v-if="nameSelectedStream"
class="flex flex-col max-w-[50%] scroll-container transition-all border-blur cursor-pointer"
@click="isStreamSelectDialogOpen = true"
>
<div class="text-xs text-white select-none scroll-text">{{ nameSelectedStream }}</div>
</div>
<FontAwesomeIcon v-else icon="fa-solid fa-video" class="h-6 text-slate-100" />
</template>
<div v-else class="w-16 text-justify text-slate-100">
{{ timePassedString }}
Expand Down Expand Up @@ -104,6 +111,12 @@ const toggleRecording = async (): Promise<void> => {
}
return
}
// If there's a stream selected already, try to use it without requiring further user interaction
if (nameSelectedStream.value !== undefined) {
updateCurrentStream(nameSelectedStream.value)
startRecording()
return
}
// Open dialog so user can choose the stream which will be recorded
isStreamSelectDialogOpen.value = true
}
Expand Down Expand Up @@ -204,4 +217,24 @@ watch(isRecording, () => {
box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
}
}

.scroll-container {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.scroll-text {
transform: translateX(0%);
transition: transform 1s linear;
}

.scroll-text:hover {
transform: translateX(-100%);
}

.border-blur:hover {
background-color: #475569;
box-shadow: 0px 0px 3px 3px #475569;
}
</style>
Loading