|
@@ -169,7 +169,7 @@ function App() {
|
|
|
const local = useLocal()
|
|
const local = useLocal()
|
|
|
const kv = useKV()
|
|
const kv = useKV()
|
|
|
const command = useCommandDialog()
|
|
const command = useCommandDialog()
|
|
|
- const { event } = useSDK()
|
|
|
|
|
|
|
+ const sdk = useSDK()
|
|
|
const toast = useToast()
|
|
const toast = useToast()
|
|
|
const { theme, mode, setMode } = useTheme()
|
|
const { theme, mode, setMode } = useTheme()
|
|
|
const sync = useSync()
|
|
const sync = useSync()
|
|
@@ -417,6 +417,15 @@ function App() {
|
|
|
},
|
|
},
|
|
|
category: "System",
|
|
category: "System",
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "Open WebUI",
|
|
|
|
|
+ value: "webui.open",
|
|
|
|
|
+ onSelect: () => {
|
|
|
|
|
+ open(sdk.url).catch(() => {})
|
|
|
|
|
+ dialog.clear()
|
|
|
|
|
+ },
|
|
|
|
|
+ category: "System",
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
title: "Exit the app",
|
|
title: "Exit the app",
|
|
|
value: "app.exit",
|
|
value: "app.exit",
|
|
@@ -487,11 +496,11 @@ function App() {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- event.on(TuiEvent.CommandExecute.type, (evt) => {
|
|
|
|
|
|
|
+ sdk.event.on(TuiEvent.CommandExecute.type, (evt) => {
|
|
|
command.trigger(evt.properties.command)
|
|
command.trigger(evt.properties.command)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- event.on(TuiEvent.ToastShow.type, (evt) => {
|
|
|
|
|
|
|
+ sdk.event.on(TuiEvent.ToastShow.type, (evt) => {
|
|
|
toast.show({
|
|
toast.show({
|
|
|
title: evt.properties.title,
|
|
title: evt.properties.title,
|
|
|
message: evt.properties.message,
|
|
message: evt.properties.message,
|
|
@@ -500,7 +509,7 @@ function App() {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- event.on(SessionApi.Event.Deleted.type, (evt) => {
|
|
|
|
|
|
|
+ sdk.event.on(SessionApi.Event.Deleted.type, (evt) => {
|
|
|
if (route.data.type === "session" && route.data.sessionID === evt.properties.info.id) {
|
|
if (route.data.type === "session" && route.data.sessionID === evt.properties.info.id) {
|
|
|
route.navigate({ type: "home" })
|
|
route.navigate({ type: "home" })
|
|
|
toast.show({
|
|
toast.show({
|
|
@@ -510,7 +519,7 @@ function App() {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- event.on(SessionApi.Event.Error.type, (evt) => {
|
|
|
|
|
|
|
+ sdk.event.on(SessionApi.Event.Error.type, (evt) => {
|
|
|
const error = evt.properties.error
|
|
const error = evt.properties.error
|
|
|
const message = (() => {
|
|
const message = (() => {
|
|
|
if (!error) return "An error occured"
|
|
if (!error) return "An error occured"
|
|
@@ -531,7 +540,7 @@ function App() {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- event.on(Installation.Event.Updated.type, (evt) => {
|
|
|
|
|
|
|
+ sdk.event.on(Installation.Event.Updated.type, (evt) => {
|
|
|
toast.show({
|
|
toast.show({
|
|
|
variant: "success",
|
|
variant: "success",
|
|
|
title: "Update Complete",
|
|
title: "Update Complete",
|
|
@@ -540,7 +549,7 @@ function App() {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- event.on(Installation.Event.UpdateAvailable.type, (evt) => {
|
|
|
|
|
|
|
+ sdk.event.on(Installation.Event.UpdateAvailable.type, (evt) => {
|
|
|
toast.show({
|
|
toast.show({
|
|
|
variant: "info",
|
|
variant: "info",
|
|
|
title: "Update Available",
|
|
title: "Update Available",
|