mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-06-30 17:34:39 -05:00
refactor & support for extension update: Backend
This commit is contained in:
@@ -49,7 +49,7 @@ interface IProps {
|
||||
export default function ExtensionCard(props: IProps) {
|
||||
const {
|
||||
extension: {
|
||||
name, lang, versionName, installed, apkName, iconUrl,
|
||||
name, lang, versionName, installed, pkgName, iconUrl,
|
||||
},
|
||||
notifyInstall,
|
||||
} = props;
|
||||
@@ -62,7 +62,7 @@ export default function ExtensionCard(props: IProps) {
|
||||
|
||||
function install() {
|
||||
setInstalledState('installing');
|
||||
client.get(`/api/v1/extension/install/${apkName}`)
|
||||
client.get(`/api/v1/extension/install/${pkgName}`)
|
||||
.then(() => {
|
||||
setInstalledState('uninstall');
|
||||
notifyInstall();
|
||||
@@ -71,7 +71,7 @@ export default function ExtensionCard(props: IProps) {
|
||||
|
||||
function uninstall() {
|
||||
setInstalledState('uninstalling');
|
||||
client.get(`/api/v1/extension/uninstall/${apkName}`)
|
||||
client.get(`/api/v1/extension/uninstall/${pkgName}`)
|
||||
.then(() => {
|
||||
// setInstalledState('install');
|
||||
notifyInstall();
|
||||
|
||||
14
webUI/react/src/typings.d.ts
vendored
14
webUI/react/src/typings.d.ts
vendored
@@ -7,12 +7,16 @@
|
||||
|
||||
interface IExtension {
|
||||
name: string
|
||||
lang: string
|
||||
versionName: string
|
||||
iconUrl: string
|
||||
installed: boolean
|
||||
apkName: string
|
||||
pkgName: string
|
||||
versionName: string
|
||||
versionCode: number
|
||||
lang: string
|
||||
isNsfw: boolean
|
||||
apkName: string
|
||||
iconUrl: string
|
||||
isInstalled: boolean
|
||||
hasUpdate: boolean
|
||||
isObsolete: boolean
|
||||
}
|
||||
|
||||
interface ISource {
|
||||
|
||||
Reference in New Issue
Block a user