Skip to content

Commit

Permalink
Merge pull request #12 from ThinLiquid:main
Browse files Browse the repository at this point in the history
💥 breaking: switch to esm
  • Loading branch information
ThinLiquid authored Jul 16, 2023
2 parents 06815a1 + c9d288c commit a66803a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "yarn",
"runtimeExecutable": "yarn",
"runtimeArgs": [
"dev"
],
"cwd": "${workspaceRoot}",
"timeout": 10000
}
]
}
3 changes: 1 addition & 2 deletions FlowOS/public/os.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
<div class="app-switcher">
<ul class="apps"></ul>
</div>

<script src="/uv/uv.bundle.js" defer></script>

<script src="https://cdn.jsdelivr.net/npm/winbox/dist/winbox.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hotkeys-js/dist/hotkeys.min.js"></script>
<script src="/scripts/handler.js" defer></script>
Expand Down
15 changes: 13 additions & 2 deletions FlowOS/public/uv/uv.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
// This file overwrites the stock UV config.js

const plain = {
encode: (str) => {
if (!str) return str;
return encodeURIComponent(str);
},
decode: (str) => {
if (!str) return str;
return decodeURIComponent(str);
},
};

self.__uv$config = {
prefix: '/uv/service/',
bare: '/bare/',
encodeUrl: Ultraviolet.codec.plain.encode,
decodeUrl: Ultraviolet.codec.plain.decode,
encodeUrl: plain.encode,
decodeUrl: plain.decode,
handler: '/uv/uv.handler.js',
client: '/uv/uv.client.js',
bundle: '/uv/uv.bundle.js',
Expand Down

0 comments on commit a66803a

Please sign in to comment.