Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bare switcher & update Devcontainer files #74

Merged
merged 1 commit into from
Feb 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=16-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
FROM node:18

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# Install basic development tools
RUN apt update && apt install -y less man-db sudo

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
# Ensure default `node` user has access to `sudo`
ARG USERNAME=node
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"
# Set `DEVCONTAINER` environment variable to help with orientation
ENV DEVCONTAINER=true
55 changes: 0 additions & 55 deletions .devcontainer/base.Dockerfile

This file was deleted.

33 changes: 5 additions & 28 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/javascript-node
// See https://containers.dev/implementors/json_reference/ for configuration reference
{
"name": "Node.js",
"name": "Nebula",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 18, 16, 14.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": { "VARIANT": "16-bullseye" }
"dockerfile": "Dockerfile"
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
"remoteUser": "node",
"postCreateCommand": "npm install"
}
13 changes: 0 additions & 13 deletions static/options/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<!-- Embed -->

<script src="../uv/uv.bundle.js"></script>
<script src="../resources/appModules/BareSwitcher.js"></script>
<script src="../resources/options.js"></script>
<meta name="theme-color" content="#5a189a">
<meta property=og:title content=Nebula>
Expand Down Expand Up @@ -141,13 +140,6 @@ <h1 class="nebHeader" style='margin-left: .5%; font-family: "Roboto"; color: #4d
<label disabled for="ssuggestion" style="background: grey;">
</label>
</div>
<div class="settings-cont">
<p class="name" style="font-size: 24px;"> Bare location </p>
<p class="description">Choose the location where a bare server is hosted. </p>
<input id="bareLocationInput" class="bareLocationInput" type="url">
<p id="validIndicator" class="bareValidSignal" > </p>
</label>
</div>
<div class="settings-cont">
<p class="name"> Misc </p>
<p class="description"></p>
Expand Down Expand Up @@ -187,11 +179,6 @@ <h1 class="nebHeader" style='margin-left: .5%; font-family: "Roboto"; color: #4d
}
themeSelector.value = themeStored
proxySel.value = proxyStored

getBareLocation().then(bareLocation => {
document.getElementById("bareLocationInput").value = bareLocation;
});

</script>
</body>
</html>
103 changes: 0 additions & 103 deletions static/resources/appModules/BareSwitcher.js

This file was deleted.

24 changes: 0 additions & 24 deletions static/resources/appModules/database-manager.js

This file was deleted.

20 changes: 0 additions & 20 deletions static/resources/nebulamain.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,6 @@ window.addEventListener('load', () => {
}
}

function getBareLocation () {
return dbPromise
.then(db => db.get('keyval', 'bareLocation'))
.then(value => value || '')
}

getBareLocation().then(bareLocation => {

console.log('Bare Location: ' + bareLocation)
if (bareLocation === '') {
console.log('No bare location found, automatically setting to default')
storage.set('bareLocation', '/bare/')

}

// if bare location is not only whitespace
// if (bareLocation.trim() !== '') {

})

navigator.serviceWorker.register('./sw.js', {
scope: '/service/'
})
Expand Down
2 changes: 1 addition & 1 deletion static/uv/uv.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
self.__uv$config = {
prefix: '/service/go/',
bare: '',
bare: '/bare/',
encodeUrl: Ultraviolet.codec.xor.encode,
decodeUrl: Ultraviolet.codec.xor.decode,
handler: '/uv/uv.handler.js',
Expand Down
Loading