Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler committed Aug 16, 2024
1 parent be20253 commit 53cc188
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ body:
> [!IMPORTANT]
> The following things are not MMRL related
> - **Install scripts** such as typos in there or other things.
> - Some parts of **ModConf**. Things like `Cannot find module 'dont-anoy'` are MMRL related, this libaray may has benn removed or renamed.
> - Configured **ModFS**. Try delete `/data/adb/mmrl/modfs.v*.json`
> - Some parts of **ModConf**. Things like `Cannot find module 'dont-anoy'` are sometimes MMRL related, this libaray may has benn removed, renamed or does not exist.
> - General module functionality after the install. MMRL is *module manager* **not** a *module executer*
>
> If these rules are ignored then your issue will be closed.
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/dergoogler/plugin/ChooserPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
while (currentItem < count) {
Uri uri = data.getClipData().getItemAt(currentItem).getUri();
currentItem = currentItem + 1;
result.put("\"" + getPath(appContext, uri) + "\"");
result.put(getPath(appContext, uri));
}

this.callback.success(result);
} else if (uriData != null) {
result.put("\"" + getPath(appContext, uriData) + "\"");
result.put(getPath(appContext, uriData));
this.callback.success(result);
} else {
this.callback.error("File URI was null.");
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"markdown-to-jsx": "^7.4.0",
"material-icons": "^1.10.8",
"material-ui-confirm": "^3.0.11",
"modfs": "^1.1.1",
"modfs": "^1.3.2",
"monaco-editor": "^0.48.0",
"monaco-editor-core": "^0.50.0",
"monaco-languageclient": "^6.5.0",
Expand Down Expand Up @@ -159,4 +159,4 @@
"webpack-dev-server": "^4.15.1",
"yaml-loader": "^0.8.0"
}
}
}
4 changes: 2 additions & 2 deletions src/activitys/InstallTerminalV2Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export const InstallTerminalV2Activity = () => {

if (exploreInstall) {
const url = modSource[0];
const urls = modSource.join(" ");
const urls = modSource;

const explore_install = new Terminal({
cwd: "/data/local/tmp",
Expand Down Expand Up @@ -369,7 +369,7 @@ export const InstallTerminalV2Activity = () => {
);
} else {
const zipfile = modSource[0];
const zipfiles = modSource.join(" ");
const zipfiles = modSource;

const local_install = new Terminal({
cwd: "/data/local/tmp",
Expand Down
12 changes: 5 additions & 7 deletions src/hooks/useModFS.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React, { createContext, useContext } from "react";
import { defaultComposer } from "default-composer";
import { useNativeStorage } from "./useNativeStorage";
import { SetStateAction } from "./useStateCallback";
import { formatObjectEntries, formatString } from "@Util/stringFormat";
import React, { createContext, useContext } from "react";
import { useNativeFileStorage } from "./useNativeFileStorage";
import { SetStateAction } from "./useStateCallback";

import { default as PModFS } from "modfs";

Expand Down Expand Up @@ -106,7 +104,7 @@ export const INITIAL_MOD_CONF: ModFS = {

// Installer
EXPLORE_INSTALL: 'mmrl install -y "<URL>"',
LOCAL_INSTALL: "mmrl install local -y <ZIPFILES>",
LOCAL_INSTALL: "mmrl install local -y <ZIPFILES( |\"\")>",
};

export interface ModConfContext {
Expand All @@ -130,7 +128,7 @@ export const useModFS = () => {
};

export const ModFSProvider = (props: React.PropsWithChildren) => {
const [modFS, setModFS] = useNativeFileStorage("/data/adb/mmrl/modfs.v2.json", INITIAL_MOD_CONF, { loader: "json" });
const [modFS, setModFS] = useNativeFileStorage("/data/adb/mmrl/modfs.v3.json", INITIAL_MOD_CONF, { loader: "json" });

const pmodFS = React.useMemo(() => new PModFS(defaultComposer(INITIAL_MOD_CONF, modFS)), [modFS]);

Expand All @@ -139,7 +137,7 @@ export const ModFSProvider = (props: React.PropsWithChildren) => {
_modFS: defaultComposer(INITIAL_MOD_CONF, modFS),
__modFS: pmodFS.formatEntries(),
modFS<K extends keyof ModFS>(key: K, adds: ModFS | object): ModFS[K] {
return PModFS.format(pmodFS.getEntrie(key)!, { ...modFS, ...adds });
return PModFS.format(pmodFS.get(key)!, { ...modFS, ...adds });
},
setModFS: (name, state) => {
setModFS((prev) => {
Expand Down
2 changes: 1 addition & 1 deletion src/util/licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"author": null,
"license": "MIT",
"description": "ModFS is a json format processor and also used in MMRL as the ModFS system",
"version": "1.1.1",
"version": "1.3.2",
"source": "https://www.npmjs.com/package/modfs"
},
{
Expand Down

0 comments on commit 53cc188

Please sign in to comment.