mirror of
https://github.com/chinchang/web-maker.git
synced 2025-05-07 19:15:24 +02:00
fix bugs
This commit is contained in:
parent
98590c3ddf
commit
b08c34ff59
@ -22,22 +22,22 @@ export function ItemTile({
|
|||||||
>
|
>
|
||||||
<div class="saved-item-tile__btns">
|
<div class="saved-item-tile__btns">
|
||||||
{onForkBtnClick ? (
|
{onForkBtnClick ? (
|
||||||
<a
|
<button
|
||||||
class="js-saved-item-tile__fork-btn saved-item-tile__btn hint--left hint--medium"
|
class="js-saved-item-tile__fork-btn saved-item-tile__btn hint--left hint--medium"
|
||||||
aria-label="Creates a duplicate of this creation (Ctrl/⌘ + F)"
|
aria-label="Creates a duplicate of this creation (Ctrl/⌘ + F)"
|
||||||
onClick={onForkBtnClick}
|
onClick={onForkBtnClick}
|
||||||
>
|
>
|
||||||
Fork<span class="show-when-selected">(Ctrl/⌘ + F)</span>
|
Fork<span class="show-when-selected">(Ctrl/⌘ + F)</span>
|
||||||
</a>
|
</button>
|
||||||
) : null}
|
) : null}
|
||||||
{onRemoveBtnClick ? (
|
{onRemoveBtnClick ? (
|
||||||
<a
|
<button
|
||||||
class="js-saved-item-tile__remove-btn saved-item-tile__btn hint--left"
|
class="js-saved-item-tile__remove-btn saved-item-tile__btn hint--left"
|
||||||
aria-label="Remove"
|
aria-label="Remove"
|
||||||
onClick={onRemoveBtnClick}
|
onClick={onRemoveBtnClick}
|
||||||
>
|
>
|
||||||
X
|
X
|
||||||
</a>
|
</button>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-v-center">
|
<div className="flex flex-v-center">
|
||||||
|
@ -11,7 +11,7 @@ export default function SavedItemPane({
|
|||||||
isOpen,
|
isOpen,
|
||||||
closeHandler,
|
closeHandler,
|
||||||
onItemSelect,
|
onItemSelect,
|
||||||
onitemRemove,
|
onItemRemove,
|
||||||
onItemFork,
|
onItemFork,
|
||||||
onExport,
|
onExport,
|
||||||
mergeImportedItems
|
mergeImportedItems
|
||||||
@ -23,7 +23,7 @@ export default function SavedItemPane({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!itemsMap) return;
|
if (!itemsMap) return;
|
||||||
const newItems = Object.values(itemsMap);
|
const newItems = Object.values(itemsMap);
|
||||||
newItems.sort(function(a, b) {
|
newItems.sort(function (a, b) {
|
||||||
return b.updatedOn - a.updatedOn;
|
return b.updatedOn - a.updatedOn;
|
||||||
});
|
});
|
||||||
setItems(newItems);
|
setItems(newItems);
|
||||||
@ -50,7 +50,7 @@ export default function SavedItemPane({
|
|||||||
}
|
}
|
||||||
function itemRemoveBtnClickHandler(item, e) {
|
function itemRemoveBtnClickHandler(item, e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
onitemRemove(item);
|
onItemRemove(item);
|
||||||
}
|
}
|
||||||
function itemForkBtnClickHandler(item, e) {
|
function itemForkBtnClickHandler(item, e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@ -213,8 +213,8 @@ export default function SavedItemPane({
|
|||||||
<ItemTile
|
<ItemTile
|
||||||
item={item}
|
item={item}
|
||||||
onClick={() => itemClickHandler(item)}
|
onClick={() => itemClickHandler(item)}
|
||||||
onForkBtnClick={() => itemForkBtnClickHandler(item)}
|
onForkBtnClick={e => itemForkBtnClickHandler(item, e)}
|
||||||
onRemoveBtnClick={() => itemRemoveBtnClickHandler(item)}
|
onRemoveBtnClick={e => itemRemoveBtnClickHandler(item, e)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
{!items.length ? (
|
{!items.length ? (
|
||||||
|
@ -1226,6 +1226,7 @@ body > #demo-frame {
|
|||||||
.saved-item-tile__btn {
|
.saved-item-tile__btn {
|
||||||
padding: 7px 10px;
|
padding: 7px 10px;
|
||||||
color: white;
|
color: white;
|
||||||
|
border: 0;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
background: rgba(255, 255, 255, 0.1);
|
background: rgba(255, 255, 255, 0.1);
|
||||||
@ -1254,6 +1255,7 @@ body > #demo-frame {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
max-height: calc(100vh - 90px);
|
max-height: calc(100vh - 90px);
|
||||||
|
scroll-behavior: smooth;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notifications-btn {
|
.notifications-btn {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user