Skip to content

Commit

Permalink
v2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler authored Apr 2, 2024
1 parent 5122998 commit 67adb93
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 21 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[nodejs]: https://github.com/Magisk-Modules-Alt-Repo/node
[mkshrc]: https://github.com/Magisk-Modules-Alt-Repo/mkshrc
[foxm]: https://github.com/Fox2Code/FoxMagiskModuleManager
[mmrl]: https://github.com/DerGoogler/MMRL

# Code Server for Magisk

Expand All @@ -10,15 +11,23 @@ VS Code in the browser

- [Systemless Mkshrc][mkshrc]
- [Node.js][nodejs]
- [MMRL][mmrl] above 2.15.11
- only for ModConf if want to use it

## Installation

Check releases

## Config location

Or use MMRL
Or use [MMRL][mmrl]

```
/data/mkuser/<USER>/home/.config
```

root user

```
/data/mkuser/root/.config
```
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=code_server
name=Code Server
version=v2.0.1
versionCode=201
version=v2.0.2
versionCode=202
author=coder, vhqtvn & Der_Googler
description=VS Code in the browser
45 changes: 27 additions & 18 deletions system/usr/share/mmrl/config/code_server/index.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from "react";
import { ListItemButton, ListItemText } from "@mui/material";
import { Page, Toolbar } from "@mmrl/ui";
import { useActivity, useConfig } from "@mmrl/hooks";
import { ListItemButton, ListItemText, List, ListItem, ListSubheader, Switch } from "@mui/material";
import { Page, Toolbar, ListItemDialogEditText } from "@mmrl/ui";
import { withRequireNewVersion } from "@mmrl/hoc";
import { ConfigProvider } from "@mmrl/providers";
import { useActivity, useConfig } from "@mmrl/hooks";

const AuthTypes = include("util/authTypes.js");
const SelectDialog = include("components/SelectDialog.jsx");

function App() {
const { context } = useActivity();
const { config, setConfig } = useConfig()
const [config, setConfig] = useConfig();

const renderToolbar = () => {
return (
Expand All @@ -23,7 +23,7 @@ function App() {
position: "absolute",
fontSize: "128px",
},
background: `radial-gradient(125.71% 125.71% at 50% 125.71%, #BD0B00C8 0%, #B16000C8 100%), url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20300%20300%22%3E%3Cfilter%20id%3D%22noiseFilter%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%225%22%20numOctaves%3D%222%22%20stitchTiles%3D%22stitch%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url%28%23noiseFilter%29%22%2F%3E%3C%2Fsvg%3E)`
background: `radial-gradient(125.71% 125.71% at 50% 125.71%, #BD0B00C8 0%, #B16000C8 100%), url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20300%20300%22%3E%3Cfilter%20id%3D%22noiseFilter%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%225%22%20numOctaves%3D%222%22%20stitchTiles%3D%22stitch%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url%28%23noiseFilter%29%22%2F%3E%3C%2Fsvg%3E)`,
}}
modifier="noshadow"
>
Expand All @@ -36,6 +36,7 @@ function App() {
};

const [open, setOpen] = React.useState(false);
const passwordDisabled = React.useMemo(() => config["auth"] === "none", [config["auth"]]);

const handleClickOpen = () => {
setOpen(true);
Expand Down Expand Up @@ -68,6 +69,7 @@ function App() {
<SelectDialog selectedValue={config["auth"]} open={open} onClose={handleClose} />

<ListItemDialogEditText
disabled={passwordDisabled}
onSuccess={(val) => {
if (val) setConfig("password", val);
}}
Expand All @@ -87,15 +89,22 @@ function App() {
);
}

export default () => {
return (
<ConfigProvider loadFromFile="/data/mkuser/root/.config/code-server/config.yaml" initialConfig={{
"bind-addr": "0.0.0.0:8989",
auth: "password",
password: "Waffenfähiges Plutonium",
cert: false,
}} loader="yaml">
<App />
</ConfigProvider>
);
};
export default withRequireNewVersion({
versionCode: 21510,
component: () => {
return (
<ConfigProvider
loadFromFile="/data/mkuser/root/.config/code-server/config.yaml"
initialConfig={{
"bind-addr": "0.0.0.0:8989",
auth: "password",
password: "Waffenfähiges Plutonium",
cert: false,
}}
loader="yaml"
>
<App />
</ConfigProvider>
);
},
});

0 comments on commit 67adb93

Please sign in to comment.