Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eef4c49398 |
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 582 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 649 KiB |
@@ -18,7 +18,7 @@ Paste a URL and press Enter, paste several comma-separated or one-per-line URLs,
|
|||||||
URLs do not need an App record; Homarr uses the site's favicon and falls back to a link icon when it cannot load one.
|
URLs do not need an App record; Homarr uses the site's favicon and falls back to a link icon when it cannot load one.
|
||||||
Bookmarks selected from Apps continue to use the App name, URL, icon, and description.
|
Bookmarks selected from Apps continue to use the App name, URL, icon, and description.
|
||||||
|
|
||||||
**Adaptive** layout is the practical default: it changes between icons, compact rows, and tiles as the widget changes shape. Every compact item exposes its destination on hover, while advanced view expands items into descriptive cards.
|
**Adaptive** layout is the practical default: it changes between icons, compact rows, and tiles as the widget changes shape. **Compact grid** keeps every card to a short row. Enable **Expand cards to fill row** when cards in an incomplete final row should use the remaining width. Every compact item exposes its destination on hover, while advanced view expands items into descriptive cards.
|
||||||
|
|
||||||
### Screenshots
|
### Screenshots
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,12 @@ export const bookmarksWidget: WidgetDefinition = {
|
|||||||
values: { type: "boolean" },
|
values: { type: "boolean" },
|
||||||
defaultValue: "yes",
|
defaultValue: "yes",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Expand cards to fill row",
|
||||||
|
description: "Whether cards in an incomplete final row expand to use the remaining width.",
|
||||||
|
values: { type: "boolean" },
|
||||||
|
defaultValue: "no",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Bookmarks",
|
name: "Bookmarks",
|
||||||
description: "URLs and existing Apps shown by the widget.",
|
description: "URLs and existing Apps shown by the widget.",
|
||||||
|
|||||||
@@ -2272,6 +2272,9 @@
|
|||||||
"withBorder": {
|
"withBorder": {
|
||||||
"label": "Show border"
|
"label": "Show border"
|
||||||
},
|
},
|
||||||
|
"grow": {
|
||||||
|
"label": "Expand cards to fill row"
|
||||||
|
},
|
||||||
"customUrls": {
|
"customUrls": {
|
||||||
"label": "Custom links"
|
"label": "Custom links"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
Box,
|
Box,
|
||||||
Card,
|
Card,
|
||||||
Center,
|
Center,
|
||||||
|
Grid,
|
||||||
Group,
|
Group,
|
||||||
ScrollArea,
|
ScrollArea,
|
||||||
SimpleGrid,
|
SimpleGrid,
|
||||||
@@ -156,6 +157,14 @@ export default function BookmarksWidget({
|
|||||||
<Group gap={options.spacing} wrap="nowrap" mih="100%" align="stretch">
|
<Group gap={options.spacing} wrap="nowrap" mih="100%" align="stretch">
|
||||||
{cards}
|
{cards}
|
||||||
</Group>
|
</Group>
|
||||||
|
) : options.grow ? (
|
||||||
|
<Grid grow columns={plan.columns} gap={options.spacing}>
|
||||||
|
{cards.map((card) => (
|
||||||
|
<Grid.Col key={card.key} span={1}>
|
||||||
|
{card}
|
||||||
|
</Grid.Col>
|
||||||
|
))}
|
||||||
|
</Grid>
|
||||||
) : (
|
) : (
|
||||||
<SimpleGrid cols={plan.columns} spacing={options.spacing} verticalSpacing={options.spacing}>
|
<SimpleGrid cols={plan.columns} spacing={options.spacing} verticalSpacing={options.spacing}>
|
||||||
{cards}
|
{cards}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ export const { definition, componentLoader } = createWidgetDefinition("bookmarks
|
|||||||
hideHostname: factory.switch({ defaultValue: false }),
|
hideHostname: factory.switch({ defaultValue: false }),
|
||||||
openNewTab: factory.switch({ defaultValue: true }),
|
openNewTab: factory.switch({ defaultValue: true }),
|
||||||
withBorder: factory.switch({ defaultValue: false }),
|
withBorder: factory.switch({ defaultValue: false }),
|
||||||
|
grow: factory.switch({ defaultValue: false }),
|
||||||
customUrls: factory.internal({ defaultValue: [] as string[] }),
|
customUrls: factory.internal({ defaultValue: [] as string[] }),
|
||||||
items: factory.sortableItemList<BookmarkSelectionItem, string>({
|
items: factory.sortableItemList<BookmarkSelectionItem, string>({
|
||||||
ItemComponent: ({ item, handle, removeItem, removeLabel, rootAttributes }) => {
|
ItemComponent: ({ item, handle, removeItem, removeLabel, rootAttributes }) => {
|
||||||
|
|||||||
@@ -240,8 +240,20 @@ export const getBookmarkDisplayPlan = ({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let columns: number = widthSettings.compactColumns;
|
if (layout === "gridHorizontal") {
|
||||||
let orientation: BookmarkOrientation = "horizontal";
|
return {
|
||||||
|
columns: Math.min(count, widthSettings.compactColumns),
|
||||||
|
horizontalScroll: false,
|
||||||
|
itemHeight: 56,
|
||||||
|
itemWidth: widthSettings.rowItemWidth,
|
||||||
|
orientation: "horizontal",
|
||||||
|
showHostname: widthSettings.showHostname && heightSettings.showHostname,
|
||||||
|
showTitle: widthSettings.showTitle && heightSettings.showTitle,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
let columns: number = widthSettings.adaptiveColumns;
|
||||||
|
let orientation: BookmarkOrientation = widthSettings.adaptiveOrientation;
|
||||||
if (layout === "grid") {
|
if (layout === "grid") {
|
||||||
columns = widthSettings.gridColumns;
|
columns = widthSettings.gridColumns;
|
||||||
orientation = "vertical";
|
orientation = "vertical";
|
||||||
|
|||||||
Reference in new issue
Block a user