Skip to content

Commit

Permalink
Fixed chunk size issue on PWA
Browse files Browse the repository at this point in the history
[frontend] fixed chunk size issue on PWA
[frontend] add additional validations to logout logic
  • Loading branch information
joaovitoriasilva committed Jan 9, 2025
1 parent b8035c9 commit de7439a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions frontend/app/src/stores/authStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const useAuthStore = defineStore('auth', {
session_id: '',
}),
actions: {
async logoutUser(router, locale = 'us') {
async logoutUser(router = null, locale = null) {
try {
await session.logoutUser();
this.clearUser(locale);
Expand Down Expand Up @@ -99,7 +99,9 @@ export const useAuthStore = defineStore('auth', {
this.setLocale(language, locale);
},
setLocale(language, locale) {
locale.value = language;
if (locale) {
locale.value = language;
}
localStorage.setItem('lang', language);
},
setUserWebsocket() {
Expand Down
7 changes: 6 additions & 1 deletion frontend/app/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
vue(),
VitePWA({ registerType: 'autoUpdate' }),
VitePWA({
workbox: {
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
},
registerType: 'autoUpdate' ,
}),
],
resolve: {
alias: {
Expand Down

0 comments on commit de7439a

Please sign in to comment.