Remove unused ft-grid component and __static variable (#2744)

* Remove unused ft-grid component

* Remove unused __static variable
This commit is contained in:
absidue 2022-10-19 03:09:49 +02:00 committed by GitHub
parent cffce405a4
commit d8f7d073ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 2 additions and 61 deletions

View File

@ -57,13 +57,7 @@ const config = {
target: 'electron-main', target: 'electron-main',
} }
if (isDevMode) { if (!isDevMode) {
config.plugins.push(
new webpack.DefinePlugin({
__static: `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`,
})
)
} else {
config.plugins.push( config.plugins.push(
new CopyWebpackPlugin({ new CopyWebpackPlugin({
patterns: [ patterns: [

View File

@ -145,14 +145,7 @@ const config = {
/** /**
* Adjust rendererConfig for production settings * Adjust rendererConfig for production settings
*/ */
if (isDevMode) { if (!isDevMode) {
// any dev only config
config.plugins.push(
new webpack.DefinePlugin({
__static: `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`,
})
)
} else {
const processLocalesPlugin = new ProcessLocalesPlugin({ const processLocalesPlugin = new ProcessLocalesPlugin({
compress: true, compress: true,
inputDir: path.join(__dirname, '../static/locales'), inputDir: path.join(__dirname, '../static/locales'),

View File

@ -160,18 +160,6 @@ const config = {
target: 'web', target: 'web',
} }
/**
* Adjust web for production settings
*/
if (isDevMode) {
// any dev only config
config.plugins.push(
new webpack.DefinePlugin({
__static: `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`,
})
)
}
const processLocalesPlugin = new ProcessLocalesPlugin({ const processLocalesPlugin = new ProcessLocalesPlugin({
compress: false, compress: false,
inputDir: path.join(__dirname, '../static/locales'), inputDir: path.join(__dirname, '../static/locales'),

View File

@ -18,17 +18,6 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<% if (process.env.NODE_ENV !== 'development') { %>
<!-- Set `__static` path to static files in production -->
<script>
try {
window.__static = require('path')
.join(__dirname, '/static')
.replace(/\\/g, '\\\\')
} catch {}
</script>
<% } %>
<script> <script>
// This is the service worker with the Advanced caching // This is the service worker with the Advanced caching

View File

@ -302,10 +302,6 @@ function runApp() {
/* eslint-disable-next-line */ /* eslint-disable-next-line */
newWindow.loadFile(`${__dirname}/index.html`) newWindow.loadFile(`${__dirname}/index.html`)
} }
global.__static = path
.join(__dirname, '/static')
.replace(/\\/g, '\\\\')
} }
if (typeof searchQueryText === 'string' && searchQueryText.length > 0) { if (typeof searchQueryText === 'string' && searchQueryText.length > 0) {

View File

@ -1,6 +0,0 @@
.ft-grid {
display: grid;
grid-template-columns: repeat(auto-fill, 240px);
justify-content: space-evenly;
grid-gap: 5px;
}

View File

@ -1,5 +0,0 @@
import Vue from 'vue'
export default Vue.extend({
name: 'FtGrid'
})

View File

@ -1,8 +0,0 @@
<template>
<div class="ft-grid">
<slot />
</div>
</template>
<script src="./ft-grid.js" />
<style scoped src="./ft-grid.css" />