This commit is contained in:
2021-09-01 00:19:28 +02:00
parent 13cc5e2fb8
commit a906c6046d
4 changed files with 35 additions and 2 deletions
+2
View File
@@ -16,6 +16,8 @@
<img src="/Assets/zero-2-light.png" class="show-light" v-localize:alt="'@zero.name'" />
<img src="/Assets/zero-2.png" class="show-dark" v-localize:alt="'@zero.name'" />
</h1>
<ui-button icon="fth-search" type="blank" class="app-nav-search" />
</div>
+7
View File
@@ -82,6 +82,8 @@
height: 90px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 var(--padding-xs) 0 0;
}
.app-nav-inner
@@ -108,6 +110,11 @@
}
}
.app-nav-search
{
}
.app-nav-switch
{
margin-bottom: var(--padding-s);
+1 -1
View File
@@ -11,7 +11,7 @@ import 'zero/config/axios.config.js';
Object.entries(components).forEach(cmp =>
{
Vue.component(cmp[0], cmp[1].default || cmp[1]);
});
});
Object.entries(directives).forEach(cmp =>
{
+25 -1
View File
@@ -52,6 +52,28 @@ fs.writeFile(path.resolve(__dirname, 'app/core/plugins.js'), pluginFileContent,
//file written successfully
})
const myPlugin = () => ({
name: 'configure-server',
configureServer(server)
{
var watcher = server.watcher;
watcher
.on('add', path => console.log(`watch: ${path}`));
var files = watcher.getWatched();
console.log('watcher:');
console.log(files);
// https://github.com/paulmillr/chokidar#api
//server.middlewares.use((req, res, next) =>
//{
// console.log(req.url);
// next();
// // custom handle request...
//})
}
})
/**
* @type {import('vite').UserConfig}
*/
@@ -60,7 +82,7 @@ let config = {
port: process.env.PORT,
cors: true
},
plugins: [createVuePlugin(), ...zeroPlugins],
plugins: [createVuePlugin(), ...zeroPlugins, myPlugin()],
alias: {
'@zero': path.resolve(__dirname, 'app/'),
'zero': path.resolve(__dirname, 'app/'),
@@ -87,6 +109,8 @@ let config = {
}
};
console.log('root: ' + config.root);
if (process.env.NODE_ENV === 'production')
{
config.base = '/zero/';