Skip to content

Commit

Permalink
fix: Split container/non-container index.html based on targetEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
redmushie committed Oct 1, 2023
1 parent 5875fa9 commit 10058b4
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 24 deletions.
File renamed without changes.
21 changes: 21 additions & 0 deletions public/index.shocklink.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ShockLink</title>

<meta property="og:title" content="ShockLink" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://shocklink.net" />
<meta property="og:image" content="https://shocklink.net/static/images/shocklink-logo-only.png" />
<meta property="og:description" content="OpenShock is a platform to control shockers (shock collars) for humans over the internet. Free and open source!" />
</head>

<body data-color-scheme="dark">
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<footer id="footerApp"></footer>
</html>
52 changes: 29 additions & 23 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,52 @@ global.env = {
};

require("@/globals/config/config." + process.env.TARGET_ENV + ".js");
document.title = config.apiUrl + '1/'

require("@/js/utils.js");

import "bootstrap/scss/bootstrap.scss";
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue-next/dist/bootstrap-vue-next.css'
import 'normalize.css';
import 'toastr/build/toastr.css';
import "@fontsource/poppins";
import "./App.scss";
import 'sweetalert2/dist/sweetalert2.min.css';
import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css'

import * as Sentry from "@sentry/vue";

import { dom, library } from '@fortawesome/fontawesome-svg-core';

import ApiCall from '/src/js/ApiCall';
import App from '@/App';
import BootstrapVueNext from 'bootstrap-vue-next'
import ContextMenu from '@imengyu/vue3-context-menu'
import Footer from '@/Footer';
import VueSweetalert2 from 'vue-sweetalert2';
import {createApp} from 'vue';
import { fab } from '@fortawesome/free-brands-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
import { fas } from '@fortawesome/free-solid-svg-icons';
import jQuery from 'jquery';
import mitt from 'mitt';
import router from '@/router';
import storeA from '@/store';
import toastr from 'toastr';
import * as Sentry from "@sentry/vue";

toastr.options = {
"positionClass": "toast-bottom-right"
}
global.toastr = toastr;
global.apiCall = ApiCall;

import jQuery from 'jquery';
global.jQuery = jQuery;
global.$ = jQuery;
import {createApp} from 'vue';

import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue-next/dist/bootstrap-vue-next.css'
import 'normalize.css';
import 'toastr/build/toastr.css';
import "@fontsource/poppins";

import "./App.scss";
import 'sweetalert2/dist/sweetalert2.min.css';
import App from '@/App';
import Footer from '@/Footer';
import router from '@/router';
import storeA from '@/store';
import mitt from 'mitt';
import BootstrapVueNext from 'bootstrap-vue-next'
import VueSweetalert2 from 'vue-sweetalert2';

import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css'
import ContextMenu from '@imengyu/vue3-context-menu'

import { library, dom } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
import { fab } from '@fortawesome/free-brands-svg-icons';
library.add(fas, far, fab);
dom.watch();

Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module.exports = (env) => {
chunkFilename: "[name].[contenthash:8].css",
}),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, "public", "index.html"),
template: path.resolve(__dirname, "public", `index.${targetEnv === 'container' ? 'container' : 'shocklink'}.html`),
favicon: "./public/favicon.ico",
inject: true
}),
Expand Down

0 comments on commit 10058b4

Please sign in to comment.