Differentiate the global quick-create FAB from page action buttons.

Use a squircle white control with a grid icon so it no longer looks like the teal circular page FABs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-05 20:09:28 +03:30
co-authored by Cursor
parent 495b529aaa
commit 73d949d5d7
+45 -18
View File
@@ -278,16 +278,19 @@ onBeforeUnmount(() => {
v-if="ready" v-if="ready"
class="fab" class="fab"
type="button" type="button"
:class="{ dragging }" :class="{ dragging, open: isQuickCreateOpen }"
:style="fabStyle" :style="fabStyle"
:aria-expanded="isQuickCreateOpen" :aria-expanded="isQuickCreateOpen"
:aria-label="isQuickCreateOpen ? 'بستن ایجاد سریع' : 'ایجاد سریع'" :aria-label="isQuickCreateOpen ? 'بستن ایجاد سریع' : 'ایجاد سریع'"
title="ایجاد سریع"
@pointerdown="onFabPointerDown" @pointerdown="onFabPointerDown"
@pointermove="onFabPointerMove" @pointermove="onFabPointerMove"
@pointerup="onFabPointerUp" @pointerup="onFabPointerUp"
@pointercancel="onFabPointerUp" @pointercancel="onFabPointerUp"
> >
<UiIcon :name="isQuickCreateOpen ? 'x' : 'plus'" :size="22" /> <span class="fab-face" aria-hidden="true">
<UiIcon :name="isQuickCreateOpen ? 'x' : 'grid'" :size="20" />
</span>
</button> </button>
</div> </div>
</Teleport> </Teleport>
@@ -400,38 +403,62 @@ onBeforeUnmount(() => {
.fab { .fab {
position: fixed; position: fixed;
z-index: 93; z-index: 93;
width: 56px; width: 54px;
height: 56px; height: 54px;
padding: 0; padding: 0;
margin: 0; margin: 0;
border: 0; border: 2px solid #0d9488;
border-radius: 50%; border-radius: 16px;
background: #14b8a6; background: #ffffff;
color: #fff; color: #0d9488;
display: grid; display: grid;
place-items: center; place-items: center;
line-height: 0; line-height: 0;
direction: ltr; direction: ltr;
box-shadow: 0 6px 16px rgba(13, 148, 136, 0.28); box-shadow:
0 4px 14px rgba(15, 23, 42, 0.12),
0 0 0 1px rgba(13, 148, 136, 0.08);
cursor: grab; cursor: grab;
touch-action: none; touch-action: none;
user-select: none; user-select: none;
transition:
background 0.15s ease,
color 0.15s ease,
border-color 0.15s ease,
box-shadow 0.15s ease,
transform 0.12s ease;
}
.fab-face {
display: grid;
place-items: center;
width: 100%;
height: 100%;
pointer-events: none;
} }
.fab :deep(.ico) { .fab :deep(.ico) {
display: block; display: block;
position: absolute; stroke-width: 2;
top: 50%; }
left: 50%;
width: 36px; .fab:hover {
height: 36px; background: #f0fdfa;
margin: 0; box-shadow:
transform: translate(-50%, -50%); 0 8px 20px rgba(13, 148, 136, 0.22),
stroke-width: 1.75; 0 0 0 1px rgba(13, 148, 136, 0.12);
}
.fab.open {
background: #0d9488;
color: #fff;
border-color: #0d9488;
box-shadow: 0 8px 22px rgba(13, 148, 136, 0.35);
} }
.fab.dragging { .fab.dragging {
cursor: grabbing; cursor: grabbing;
box-shadow: 0 8px 18px rgba(13, 148, 136, 0.34); transform: scale(1.04);
box-shadow: 0 10px 24px rgba(13, 148, 136, 0.3);
} }
</style> </style>