mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
reverting dashboard rendering to webview, part 2
This commit is contained in:
parent
d413235ed9
commit
50ab4905dc
@ -239,6 +239,7 @@
|
||||
"babel-core": "^7.0.0-beta.3",
|
||||
"babel-loader": "^8.1.0",
|
||||
"babel-plugin-macros": "^2.8.0",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"bootstrap": "^4.5.0",
|
||||
"bootstrap-vue": "^2.15.0",
|
||||
"chart.js": "^2.9.3",
|
||||
|
||||
@ -31,7 +31,7 @@ let windowManager: WindowManager = null;
|
||||
let clusterManager: ClusterManager = null;
|
||||
|
||||
const vmURL = formatUrl({
|
||||
pathname: path.join(__dirname, "dist/index.html"),
|
||||
pathname: path.join(__dirname, "index.html"),
|
||||
protocol: "file",
|
||||
slashes: true,
|
||||
})
|
||||
@ -123,7 +123,7 @@ app.on('window-all-closed', function () {
|
||||
app.on("activate", () => {
|
||||
if (!windowManager) {
|
||||
logger.debug("activate main window")
|
||||
windowManager = new WindowManager(false)
|
||||
windowManager = new WindowManager({ showSplash: false })
|
||||
windowManager.showMain(vmURL)
|
||||
}
|
||||
})
|
||||
|
||||
@ -11,7 +11,7 @@ export class WindowManager {
|
||||
protected promiseIpc: any
|
||||
protected windowState: windowStateKeeper.State;
|
||||
|
||||
constructor(showSplash = true) {
|
||||
constructor({ showSplash = true } = {}) {
|
||||
this.promiseIpc = new PromiseIpc({ timeout: 2000 })
|
||||
// Manage main window size&position with persistence
|
||||
this.windowState = windowStateKeeper({
|
||||
@ -32,7 +32,7 @@ export class WindowManager {
|
||||
}
|
||||
})
|
||||
if (showSplash) {
|
||||
this.splashWindow.loadFile(getStaticUrl("splash.html"))
|
||||
this.splashWindow.loadURL(getStaticUrl("splash.html"))
|
||||
this.splashWindow.show()
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="app_vue">
|
||||
<div id="app">
|
||||
<div id="lens-container" />
|
||||
<div class="draggable-top"/>
|
||||
<div class="main-view" :class="{ 'menu-visible': isMenuVisible }">
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<span class="hashicon" ref="hashicon" />
|
||||
</template>
|
||||
<script>
|
||||
import hashicon from '@/_vue/components/hashicon/hashicon'
|
||||
import hashicon from 'hashicon'
|
||||
|
||||
export default {
|
||||
name:'Hashicon',
|
||||
|
||||
@ -39,7 +39,6 @@ setTimeout(() => {
|
||||
console.log("start vue")
|
||||
new Vue({
|
||||
components: { App },
|
||||
persist,
|
||||
store,
|
||||
router,
|
||||
template: '<App/>'
|
||||
|
||||
@ -9,9 +9,5 @@
|
||||
|
||||
<div id="app"></div>
|
||||
|
||||
<!--<div id="app_vue"></div>-->
|
||||
<!--<script src="dll.js"></script>-->
|
||||
<!--<script src="renderer_vue.js"></script>-->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -24,7 +24,7 @@ export default function (): webpack.Configuration {
|
||||
__dirname: false,
|
||||
__filename: false,
|
||||
},
|
||||
// fixme: hiding warnings during compilation, but creates runtime error
|
||||
// fixme: this will hide warnings during compilation, but creates runtime error
|
||||
// externals: [
|
||||
// "@kubernetes/client-node",
|
||||
// "handlebars",
|
||||
|
||||
@ -28,9 +28,6 @@ export function webpackConfigReact(): webpack.Configuration {
|
||||
chunkFilename: 'chunks/[name].js',
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": rendererDir,
|
||||
},
|
||||
extensions: [
|
||||
'.js', '.jsx', '.json',
|
||||
'.ts', '.tsx',
|
||||
@ -135,6 +132,13 @@ export function webpackConfigVue(): webpack.Configuration {
|
||||
const config = webpackConfigReact();
|
||||
|
||||
config.resolve.extensions.push(".vue");
|
||||
|
||||
config.resolve.alias = {
|
||||
"@": rendererDir,
|
||||
"vue$": "vue/dist/vue.esm.js",
|
||||
"vue-router$": "vue-router/dist/vue-router.esm.js",
|
||||
}
|
||||
|
||||
config.entry = {
|
||||
renderer_vue: path.resolve(rendererDir, "_vue/index.js")
|
||||
}
|
||||
|
||||
@ -889,7 +889,7 @@
|
||||
"@babel/helper-plugin-utils" "^7.10.1"
|
||||
"@babel/plugin-transform-typescript" "^7.10.1"
|
||||
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.6":
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.6":
|
||||
version "7.10.2"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.10.2.tgz#d103f21f2602497d38348a32e008637d506db839"
|
||||
integrity sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==
|
||||
|
||||
Loading…
Reference in New Issue
Block a user