minor cleanup
This commit is contained in:
parent
1f7f7bc87e
commit
79fab84fae
14 changed files with 42 additions and 156 deletions
|
@ -1,9 +1,29 @@
|
|||
# Update the VARIANT arg in docker-compose.yml to pick a Node version: 10, 12, 14
|
||||
ARG VARIANT=14
|
||||
ARG VARIANT=16
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
|
||||
|
||||
# See https://github.com/microsoft/vscode-dev-containers/tree/master/containers/docker-from-docker for more documentation
|
||||
# On how to use docker from within docker
|
||||
|
||||
# Install Docker CE CLI
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y apt-transport-https ca-certificates curl gnupg2 lsb-release \
|
||||
&& curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \
|
||||
&& echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y docker-ce-cli
|
||||
|
||||
# Install Docker Compose
|
||||
RUN LATEST_COMPOSE_VERSION=$(curl -sSL "https://api.github.com/repos/docker/compose/releases/latest" | grep -o -P '(?<="tag_name": ").+(?=")') \
|
||||
&& curl -sSL "https://github.com/docker/compose/releases/download/${LATEST_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
||||
&& chmod +x /usr/local/bin/docker-compose
|
||||
|
||||
# Update args in docker-compose.yaml to set the UID/GID of the "node" user.
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=$USER_UID
|
||||
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then groupmod --gid $USER_GID node && usermod --uid $USER_UID --gid $USER_GID node; fi
|
||||
|
||||
# Add the node user to the docker group to access
|
||||
# the daemon without sudo
|
||||
RUN groupadd docker
|
||||
RUN usermod -a -G docker node
|
|
@ -2,7 +2,6 @@
|
|||
"name": "GCT Generator",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"args": { "VARIANT": "14" }
|
||||
},
|
||||
"settings": {
|
||||
"terminal.integrated.defaultProfile.linux": "bash"
|
||||
|
@ -12,8 +11,9 @@
|
|||
"esbenp.prettier-vscode",
|
||||
"ms-vsliveshare.vsliveshare",
|
||||
"wayou.vscode-todo-highlight",
|
||||
"octref.vetur"
|
||||
],
|
||||
"forwardPorts": [8080, 3000],
|
||||
"postCreateCommand": "npm install",
|
||||
"postCreateCommand": "bash -i .devcontainer/post-create.sh",
|
||||
"remoteUser": "node"
|
||||
}
|
||||
|
|
8
.devcontainer/post-install.sh
Normal file
8
.devcontainer/post-install.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
nvm install
|
||||
nvm use
|
||||
nvm alias default $(node --version)
|
||||
nvm install-latest-npm
|
||||
npm i
|
1
.nvmrc
Normal file
1
.nvmrc
Normal file
|
@ -0,0 +1 @@
|
|||
16.13.0
|
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
@ -15,6 +15,9 @@
|
|||
"editor.suggest.insertMode": "replace",
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[vue-html]": {
|
||||
"editor.defaultFormatter": "octref.vetur"
|
||||
},
|
||||
"breadcrumbs.symbolSortOrder": "type",
|
||||
"editor.codeLens": true,
|
||||
"editor.detectIndentation": true,
|
||||
|
@ -43,7 +46,6 @@
|
|||
"**/node_modules": true,
|
||||
"**/tmp": true
|
||||
},
|
||||
"telemetry.enableCrashReporter": false,
|
||||
"todohighlight.keywords": [
|
||||
"@TODO"
|
||||
],
|
||||
|
@ -52,7 +54,6 @@
|
|||
"typescript.referencesCodeLens.showOnAllFunctions": true,
|
||||
"typescript.reportStyleChecksAsWarnings": true,
|
||||
"typescript.updateImportsOnFileMove.enabled": "always",
|
||||
"window.zoomLevel": 0,
|
||||
"workbench.editor.enablePreview": false,
|
||||
"workbench.editor.enablePreviewFromQuickOpen": false
|
||||
}
|
|
@ -32,5 +32,7 @@
|
|||
"dependencies": {
|
||||
"vuedraggable": "^2.24.3"
|
||||
},
|
||||
"pre-commit": ["precommit"]
|
||||
"pre-commit": [
|
||||
"precommit"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import locales from '../i18n/locales.json';
|
||||
import { translate, translateCode } from '../i18n/localeHelper';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import SelectComponent from './SelectComponent';
|
||||
|
||||
import { translateCode, translate } from '../i18n/localeHelper';
|
||||
import codeCategories from '../data/codeCategories.json';
|
||||
import presetCategories from '../data/presetCategories.json';
|
||||
|
|
|
@ -4,15 +4,11 @@
|
|||
label="Download"
|
||||
:onClick="onClick"
|
||||
:disabled="(!codes || codes.length === 0) && !stageLoaderCode"
|
||||
></ButtonComponent>
|
||||
<FeedbackModal v-if="showFeedbackModal" />
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// Components
|
||||
import FeedbackModal from './FeedbackModal';
|
||||
|
||||
// Data
|
||||
import gameVersions from '../data/gameVersions.json';
|
||||
|
||||
|
@ -27,9 +23,7 @@ export default {
|
|||
versionIdentifier: { type: String },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showFeedbackModal: false,
|
||||
};
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
|
@ -76,10 +70,6 @@ export default {
|
|||
this.generateCheatManagerTXT(c, fileName);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!this.showFeedbackModal && this.$lang === 'en-US') {
|
||||
this.showFeedbackModal = true;
|
||||
}
|
||||
},
|
||||
generateGCT(codes, version) {
|
||||
let code = '00D0C0DE00D0C0DE';
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
<template>
|
||||
<transition v-if="showModal" name="modal">
|
||||
<div class="modal-mask">
|
||||
<div class="modal-wrapper">
|
||||
<div class="modal-container">
|
||||
<div v-if="showModal" class="modal-body">
|
||||
<p>
|
||||
If you have 5 minutes please fill out our
|
||||
<a @click="onFormClick" href="https://forms.gle/WYdGEYARPArd7uYx5" target="_blank"
|
||||
>feedback form</a
|
||||
>. Thanks!
|
||||
</p>
|
||||
<div>
|
||||
<ButtonComponent
|
||||
label="Ok"
|
||||
:onClick="
|
||||
() => {
|
||||
this.showModal = false;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// Components
|
||||
import ButtonComponent from './ButtonComponent';
|
||||
|
||||
export default {
|
||||
name: 'FeedbackModal',
|
||||
data() {
|
||||
return {
|
||||
showModal: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// if (localStorage.getItem('feedback-modal-displayed') !== 'y') {
|
||||
// this.showModal = true;
|
||||
// localStorage.setItem('feedback-modal-displayed', 'y');
|
||||
// try {
|
||||
// window._paq.push(['trackEvent', 'GCT Generator', 'Feedback', 'Open Modal']);
|
||||
// } catch {}
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
onFormClick() {
|
||||
try {
|
||||
window._paq.push(['trackEvent', 'GCT Generator', 'Feedback', 'Open Form']);
|
||||
} catch {
|
||||
} finally {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.modal-mask {
|
||||
position: fixed;
|
||||
z-index: 9998;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: table;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.modal-wrapper {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.modal-container {
|
||||
width: 300px;
|
||||
margin: 0px auto;
|
||||
padding: 20px 30px;
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);
|
||||
transition: all 0.3s ease;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.modal-enter {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.modal-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.modal-enter .modal-container,
|
||||
.modal-leave-active .modal-container {
|
||||
-webkit-transform: scale(1.1);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
</style>
|
|
@ -3,10 +3,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
// Components
|
||||
import SelectComponent from './SelectComponent';
|
||||
|
||||
// Data
|
||||
import downloadFormats from '../data/downloadFormats.json';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -83,11 +83,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
// Components
|
||||
import SelectComponent from './SelectComponent';
|
||||
import ButtonComponent from './ButtonComponent';
|
||||
import GroupSelectComponent from './GroupSelectComponent';
|
||||
|
||||
// Data
|
||||
import stageLoaderLevels from '../data/stageLoaderLevels.json';
|
||||
import stageLoaderPresets from '../data/stageLoaderPresets.json';
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
// Components
|
||||
import SelectComponent from './SelectComponent';
|
||||
|
||||
// Data
|
||||
import gameVersions from '../data/gameVersions.json';
|
||||
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
/**
|
||||
* Client app enhancement file.
|
||||
*
|
||||
* https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements
|
||||
*/
|
||||
|
||||
export default ({
|
||||
Vue, // the version of Vue being used in the VuePress app
|
||||
options, // the options for the root Vue instance
|
||||
router, // the router instance for the app
|
||||
siteData, // site metadata
|
||||
isServer,
|
||||
}) => {
|
||||
export default ({ isServer }) => {
|
||||
if (isServer) return;
|
||||
|
||||
document.onreadystatechange = () => {
|
||||
|
|
Loading…
Reference in a new issue