mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 22:12:03 +00:00
add frontend
This commit is contained in:
Vendored
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"deckip" : "0.0.0.0",
|
"deckip" : "192.168.1.69",
|
||||||
"deckport" : "22",
|
"deckport" : "22",
|
||||||
"deckuser" : "deck",
|
"deckuser" : "deck",
|
||||||
"deckpass" : "ssap",
|
"deckpass" : "deck",
|
||||||
"deckkey" : "-i ${env:HOME}/.ssh/id_rsa",
|
"deckkey" : "-i ${env:HOME}/.ssh/id_rsa",
|
||||||
"deckdir" : "/home/deck"
|
"deckdir" : "/home/deck"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class Loader:
|
|||||||
|
|
||||||
async def get_plugins(self):
|
async def get_plugins(self):
|
||||||
plugins = list(self.plugins.values())
|
plugins = list(self.plugins.values())
|
||||||
return [{"name": str(i), "version": i.version, "load_type": i.load_type} for i in plugins]
|
return [{"name": str(i), "version": i.version, "load_type": i.load_type, "disabled": i.disabled} for i in plugins]
|
||||||
|
|
||||||
async def handle_plugin_dist(self, request: web.Request):
|
async def handle_plugin_dist(self, request: web.Request):
|
||||||
plugin = self.plugins[request.match_info["plugin_name"]]
|
plugin = self.plugins[request.match_info["plugin_name"]]
|
||||||
@@ -166,6 +166,7 @@ class Loader:
|
|||||||
|
|
||||||
plugin = PluginWrapper(file, plugin_directory, self.plugin_path, plugin_emitted_event)
|
plugin = PluginWrapper(file, plugin_directory, self.plugin_path, plugin_emitted_event)
|
||||||
if hasattr(self.context, "utilities") and plugin.name in await self.context.utilities.get_setting("disabled_plugins",[]):
|
if hasattr(self.context, "utilities") and plugin.name in await self.context.utilities.get_setting("disabled_plugins",[]):
|
||||||
|
plugin.disabled = True
|
||||||
self.plugins[plugin.name] = plugin
|
self.plugins[plugin.name] = plugin
|
||||||
return
|
return
|
||||||
if plugin.name in self.plugins:
|
if plugin.name in self.plugins:
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ class PluginWrapper:
|
|||||||
self.author = json["author"]
|
self.author = json["author"]
|
||||||
self.flags = json["flags"]
|
self.flags = json["flags"]
|
||||||
self.api_version = json["api_version"] if "api_version" in json else 0
|
self.api_version = json["api_version"] if "api_version" in json else 0
|
||||||
|
self.disabled = False
|
||||||
|
|
||||||
self.passive = not path.isfile(self.file)
|
self.passive = not path.isfile(self.file)
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ class Utilities:
|
|||||||
|
|
||||||
async def http_request_legacy(self, method: str, url: str, extra_opts: Any = {}, timeout: int | None = None):
|
async def http_request_legacy(self, method: str, url: str, extra_opts: Any = {}, timeout: int | None = None):
|
||||||
async with ClientSession() as web:
|
async with ClientSession() as web:
|
||||||
res = await web.request(method, url, ssl=helpers.get_ssl_context(), timeout=timeout, **extra_opts)
|
res = await web.request(method, url, ssl=helpers.get_ssl_context(), timeout=timeout, **extra_opts) # type: ignore
|
||||||
text = await res.text()
|
text = await res.text()
|
||||||
return {
|
return {
|
||||||
"status": res.status,
|
"status": res.status,
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export class DeckyState {
|
|||||||
return {
|
return {
|
||||||
plugins: this._plugins,
|
plugins: this._plugins,
|
||||||
disabled: this._disabledPlugins,
|
disabled: this._disabledPlugins,
|
||||||
installedPlugins: this._disabledPlugins,
|
installedPlugins: this._installedPlugins,
|
||||||
pluginOrder: this._pluginOrder,
|
pluginOrder: this._pluginOrder,
|
||||||
frozenPlugins: this._frozenPlugins,
|
frozenPlugins: this._frozenPlugins,
|
||||||
hiddenPlugins: this._hiddenPlugins,
|
hiddenPlugins: this._hiddenPlugins,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { ConfirmModal, Spinner } from '@decky/ui';
|
import { ConfirmModal, Spinner } from '@decky/ui';
|
||||||
import { FC, useState } from 'react';
|
import { FC, useState } from 'react';
|
||||||
|
|
||||||
import { disablePlugin, uninstallPlugin } from '../../plugin';
|
import { disablePlugin } from '../../plugin';
|
||||||
|
|
||||||
interface PluginUninstallModalProps {
|
interface PluginUninstallModalProps {
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user