[Plugins] Fix updating, and make it hash-based

This commit is contained in:
Beef 2023-02-05 23:30:51 +00:00
parent b0df91db7a
commit 6ed08a0ac9
2 changed files with 24 additions and 19 deletions

View file

@ -3,7 +3,7 @@ import { Forms } from "@ui/components";
import { showToast } from "@ui/toasts";
import { getAssetIDByName } from "@ui/assets";
import { useProxy } from "@lib/storage";
import { plugins, fetchPlugin, startPlugin } from "@lib/plugins";
import { plugins, installPlugin } from "@lib/plugins";
import PluginCard from "@ui/settings/components/PluginCard";
const { FormInput, FormRow } = Forms;
@ -24,7 +24,7 @@ export default function Plugins() {
label="Install plugin"
leading={<FormRow.Icon source={getAssetIDByName("ic_add_18px")} />}
onPress={() => {
fetchPlugin(pluginUrl).then(() => {
installPlugin(pluginUrl).then(() => {
setPluginUrl("");
}).catch((e: Error) => {
showToast(e.message, getAssetIDByName("Small"));