mirror of https://github.com/jetkvm/kvm.git
cleanup macrobar
This commit is contained in:
parent
4438dbbe0c
commit
54d011897d
|
@ -27,7 +27,9 @@ export default function MacroBar() {
|
|||
return (
|
||||
<Container className="bg-white dark:bg-slate-900 border-b border-b-slate-800/20 dark:border-b-slate-300/20">
|
||||
<div className="flex items-center gap-x-2 py-1.5">
|
||||
<LuCommand className="h-4 w-4 text-slate-500 mr-1" />
|
||||
<div className="absolute -ml-5">
|
||||
<LuCommand className="h-4 w-4 text-slate-500" />
|
||||
</div>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{macros.map(macro => (
|
||||
<Button
|
||||
|
|
|
@ -336,6 +336,12 @@ export function MacroForm({
|
|||
</div>
|
||||
|
||||
<div className="flex justify-end gap-x-2">
|
||||
<Button
|
||||
size="SM"
|
||||
theme="blank"
|
||||
text="Cancel"
|
||||
onClick={() => setShowDeleteConfirm(false)}
|
||||
/>
|
||||
<Button
|
||||
size="SM"
|
||||
theme="danger"
|
||||
|
@ -346,12 +352,6 @@ export function MacroForm({
|
|||
}}
|
||||
disabled={isDeleting}
|
||||
/>
|
||||
<Button
|
||||
size="SM"
|
||||
theme="light"
|
||||
text="Cancel"
|
||||
onClick={() => setShowDeleteConfirm(false)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -528,7 +528,8 @@ export default function WebRTCVideo() {
|
|||
return (
|
||||
<div className="grid h-full w-full grid-rows-layout">
|
||||
<div className="min-h-[39.5px] flex flex-col">
|
||||
<fieldset disabled={peerConnectionState !== "connected"}>
|
||||
<div className="flex flex-col">
|
||||
<fieldset disabled={peerConnectionState !== "connected"} className="contents">
|
||||
<Actionbar
|
||||
requestFullscreen={async () =>
|
||||
videoElm.current?.requestFullscreen({
|
||||
|
@ -539,6 +540,7 @@ export default function WebRTCVideo() {
|
|||
<MacroBar />
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
ref={containerRef}
|
||||
|
|
|
@ -126,7 +126,7 @@ export default function SettingsMacrosRoute() {
|
|||
<h3 className="truncate text-sm font-semibold text-black dark:text-white">
|
||||
{macro.name}
|
||||
</h3>
|
||||
<p className="mt-1 ml-2 text-xs text-slate-500 dark:text-slate-400 overflow-hidden">
|
||||
<p className="mt-1 ml-4 text-xs text-slate-500 dark:text-slate-400 overflow-hidden">
|
||||
<span className="flex flex-col items-start gap-1">
|
||||
{macro.steps.map((step, stepIndex) => {
|
||||
const StepIcon = stepIndex === 0 ? LuMoveRight : LuCornerDownRight;
|
||||
|
@ -154,7 +154,7 @@ export default function SettingsMacrosRoute() {
|
|||
|
||||
{Array.isArray(step.keys) && step.keys.map((key, idx) => (
|
||||
<Fragment key={`key-${idx}`}>
|
||||
<span className="font-medium text-blue-600 dark:text-blue-200">
|
||||
<span className="font-medium text-blue-600 dark:text-blue-400">
|
||||
{keyDisplayMap[key] || key}
|
||||
</span>
|
||||
{idx < step.keys.length - 1 && (
|
||||
|
@ -210,6 +210,7 @@ export default function SettingsMacrosRoute() {
|
|||
title="Macros"
|
||||
description={`${loading ? '?' : macros.length}/${MAX_TOTAL_MACROS}`}
|
||||
>
|
||||
{ macros.length > 0 && (
|
||||
<div className="flex items-center gap-2">
|
||||
<Button
|
||||
size="SM"
|
||||
|
@ -220,6 +221,7 @@ export default function SettingsMacrosRoute() {
|
|||
aria-label="Add new macro"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</SettingsItem>
|
||||
</div>
|
||||
|
||||
|
@ -235,7 +237,6 @@ export default function SettingsMacrosRoute() {
|
|||
) : macros.length === 0 ? (
|
||||
<EmptyCard
|
||||
headline="No macros created yet"
|
||||
description="Create keyboard macros to automate repetitive tasks"
|
||||
BtnElm={
|
||||
<Button
|
||||
size="SM"
|
||||
|
|
Loading…
Reference in New Issue