bugfix: change printer name

bugfix: favicon percent icon

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2020-11-27 18:48:37 +01:00
parent 188bce0aa4
commit 99529defb8
5 changed files with 1997 additions and 5 deletions

1983
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -37,6 +37,7 @@
"eslint-plugin-vue": "^7.1.0",
"sass": "^1.29.0",
"sass-loader": "^10.1.0",
"sw-precache-webpack-plugin": "^1.0.0",
"vue-cli-plugin-route": "0.0.7",
"vue-cli-plugin-vuetify": "^2.0.7",
"vue-router": "^3.4.9",

View File

@ -13,7 +13,7 @@
<template>
<v-app>
<vue-headful :title="getTitle" :head="{ 'meta[version]': {version: version}, }" />
<vue-headful :title="getTitle" />
<v-navigation-drawer
class="sidebar-wrapper" persistent v-model="drawer" enable-resize-watcher fixed app
:src="require('./assets/bg-navi.png')"
@ -190,7 +190,6 @@ export default {
let favicon16 = document.querySelector("link[rel*='icon'][sizes='16x16']")
let favicon32 = document.querySelector("link[rel*='icon'][sizes='32x32']")
if (val > 0 && val < 100) {
let faviconSize = 64;
@ -238,7 +237,7 @@ export default {
}
},
watch: {
current_file_position() {
print_percent() {
this.drawFavicon(this.print_percent);
},
current_file: {

View File

@ -13,7 +13,7 @@
</v-toolbar>
<v-card-text class="py-0">
<v-row>
<v-col class="py-0">
<v-col class="pt-2 pb-0">
<v-text-field
v-model="printerName"
label="Printer Name"
@ -40,7 +40,7 @@
return this.$store.state.gui.general.printername;
},
set(newName) {
return this.$store.dispatch('setSettings', { gui: { general: { printername: newName } } });
return this.$store.dispatch('gui/setSettings', { general: { printername: newName } });
}
},
},

View File

@ -1,4 +1,5 @@
const webpack = require('webpack')
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin')
const fs = require('fs')
const packageJson = fs.readFileSync('./package.json')
const version = JSON.parse(packageJson).version || 0
@ -14,6 +15,14 @@ module.exports = {
PACKAGE_VERSION: '"' + version + '"'
}
}),
new SWPrecacheWebpackPlugin({
cacheId: 'mailsail',
filename: 'service-worker-cache.js',
staticFileGlobs: ['dist/**/*.{js,css}', '/'],
minify: true,
stripPrefix: 'dist/',
dontCacheBustUrlsMatching: /\.\w{6}\./
}),
]
},
pwa: {