refactor: streamline widget and integration architecture
This commit is contained in:
1 parent
ec295fe26e
commit
425cb653a1
243 files changed
+5722
-2255
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import { defineWidgetModule } from "@homarr/definitions";
|
||||
|
||||
export default defineWidgetModule({
|
||||
kind: "weather",
|
||||
icon: "IconCloud",
|
||||
clientEntry: ".",
|
||||
documentation: {
|
||||
slug: "weather",
|
||||
sourceDirectory: "docs",
|
||||
},
|
||||
defaultSize: { width: 2, height: 1 },
|
||||
operations: [
|
||||
{
|
||||
name: "atLocation",
|
||||
path: ["widget", "weather", "atLocation"],
|
||||
client: {
|
||||
refetchIntervalSeconds: 600,
|
||||
staleTimeSeconds: 300,
|
||||
persist: true,
|
||||
},
|
||||
serverCache: {
|
||||
namespace: "weather:at-location",
|
||||
ttlMs: 5 * 60 * 1000,
|
||||
scope: "shared",
|
||||
},
|
||||
},
|
||||
],
|
||||
routers: [
|
||||
{
|
||||
namespace: "weather",
|
||||
module: "./weather",
|
||||
exportName: "weatherRouter",
|
||||
additionalWidgetKinds: ["clock"],
|
||||
},
|
||||
],
|
||||
});
|
||||
Reference in new issue
Block a user