mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-04 14:32:15 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5f4daa8ef | ||
|
|
fd50241e2a | ||
|
|
6a0fbba407 |
@@ -134,7 +134,7 @@ Services may have descriptions,
|
|||||||
|
|
||||||
## Icons
|
## Icons
|
||||||
|
|
||||||
Services may have an icon attached to them, you can use icons from [Dashboard Icons](https://github.com/walkxcode/dashboard-icons) automatically, by passing the name of the icon, with, or without `.png` or with `.svg` to use the svg version.
|
Services may have an icon attached to them, you can use icons from [Dashboard Icons](https://github.com/homarr-labs/dashboard-icons) automatically, by passing the name of the icon, with, or without `.png`, `.webp` or `.svg` to specify the desired version.
|
||||||
|
|
||||||
You can also specify prefixed icons from:
|
You can also specify prefixed icons from:
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ export default class ErrorBoundary extends React.Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// You can also log error messages to an error reporting service here
|
// You can also log error messages to an error reporting service here
|
||||||
// eslint-disable-next-line no-console
|
if (error || errorInfo) {
|
||||||
console.error(error, errorInfo);
|
// eslint-disable-next-line no-console
|
||||||
|
console.error("component error: %s, info: %s", error, errorInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
@@ -101,7 +101,26 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log
|
|||||||
const iconName = icon.replace(".svg", "");
|
const iconName = icon.replace(".svg", "");
|
||||||
return (
|
return (
|
||||||
<Image
|
<Image
|
||||||
src={`https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/svg/${iconName}.svg`}
|
src={`https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/${iconName}.svg`}
|
||||||
|
width={width}
|
||||||
|
height={height}
|
||||||
|
style={{
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
objectFit: "contain",
|
||||||
|
maxHeight: "100%",
|
||||||
|
maxWidth: "100%",
|
||||||
|
}}
|
||||||
|
alt={alt}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (icon.endsWith(".webp")) {
|
||||||
|
const iconName = icon.replace(".webp", "");
|
||||||
|
return (
|
||||||
|
<Image
|
||||||
|
src={`https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/webp/${iconName}.webp`}
|
||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
style={{
|
style={{
|
||||||
@@ -119,7 +138,7 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log
|
|||||||
const iconName = icon.replace(".png", "");
|
const iconName = icon.replace(".png", "");
|
||||||
return (
|
return (
|
||||||
<Image
|
<Image
|
||||||
src={`https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/${iconName}.png`}
|
src={`https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/${iconName}.png`}
|
||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { useState, useEffect, Fragment } from "react";
|
import { useState, useEffect, Fragment } from "react";
|
||||||
import { useTranslation } from "next-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
import { FiSearch } from "react-icons/fi";
|
import { FiSearch } from "react-icons/fi";
|
||||||
import { SiDuckduckgo, SiMicrosoftbing, SiGoogle, SiBaidu, SiBrave } from "react-icons/si";
|
import { SiDuckduckgo, SiGoogle, SiBaidu, SiBrave } from "react-icons/si";
|
||||||
|
import { BiLogoBing } from "react-icons/bi";
|
||||||
import { Listbox, Transition, Combobox } from "@headlessui/react";
|
import { Listbox, Transition, Combobox } from "@headlessui/react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
@@ -25,7 +26,7 @@ export const searchProviders = {
|
|||||||
name: "Bing",
|
name: "Bing",
|
||||||
url: "https://www.bing.com/search?q=",
|
url: "https://www.bing.com/search?q=",
|
||||||
suggestionUrl: "https://api.bing.com/osjson.aspx?query=",
|
suggestionUrl: "https://api.bing.com/osjson.aspx?query=",
|
||||||
icon: SiMicrosoftbing,
|
icon: BiLogoBing,
|
||||||
},
|
},
|
||||||
baidu: {
|
baidu: {
|
||||||
name: "Baidu",
|
name: "Baidu",
|
||||||
|
|||||||
Reference in New Issue
Block a user