feat(widgets): consolidate integration metadata + shared response caching (#6691)
This commit is contained in:
1 parent
7d1d9062ed
commit
8d8dec5749
206 files changed
+3893
-1946
No files matched your search
@@ -2,6 +2,7 @@ import { IconChevronLeft, IconChevronRight, IconPhoto, IconPlayerPause } from "@
|
||||
import z from "zod";
|
||||
|
||||
import { clientApi } from "@homarr/api/client";
|
||||
import { getWidgetIntegrationConfig } from "@homarr/definitions";
|
||||
import { useI18n } from "@homarr/translation/client";
|
||||
|
||||
import { createWidgetDefinition, widgetQueryInputMatches } from "../../definition";
|
||||
@@ -62,9 +63,7 @@ export const { definition, componentLoader } = createWidgetDefinition("immich-al
|
||||
: undefined,
|
||||
}),
|
||||
refetchInterval: null,
|
||||
supportedIntegrations: ["immich", "mock"],
|
||||
integrationsRequired: true,
|
||||
maxIntegrations: 1,
|
||||
...getWidgetIntegrationConfig("immich-albumCarousel"),
|
||||
contextActions: ({ widgetRuntimeRef }) => {
|
||||
const actions = widgetRuntimeRef.current.actions;
|
||||
return [
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { IconGraphFilled } from "@tabler/icons-react";
|
||||
|
||||
import { getWidgetIntegrationConfig } from "@homarr/definitions";
|
||||
|
||||
import { createWidgetDefinition, matchesWidgetRuntimeQuery } from "../../definition";
|
||||
import { optionsBuilder } from "../../options";
|
||||
|
||||
@@ -9,9 +11,7 @@ export const { definition, componentLoader } = createWidgetDefinition("immich-se
|
||||
queryKeys: [[["widget", "immich", "getServerStats"]], [["widget", "immich", "getAlbums"]]],
|
||||
queryMatcher: matchesWidgetRuntimeQuery,
|
||||
refetchInterval: null,
|
||||
supportedIntegrations: ["immich", "mock"],
|
||||
integrationsRequired: true,
|
||||
maxIntegrations: 1,
|
||||
...getWidgetIntegrationConfig("immich-serverStats"),
|
||||
createOptions() {
|
||||
return optionsBuilder.from((factory) => ({
|
||||
showUsers: factory.switch({
|
||||
|
||||
Reference in new issue
Block a user