-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delta-1619 Platforms > Quasar Upgrade > Upgrade Freedom Components (#55)
* fix: fixed issues that prevent the application from building/running * chore: added newline to EOF * refactor: remove credentials from dependency import * chore: updated to latest freedom components commit * fix: fix broken ftable layout in demo pages * fix: update import to use latest commit in freedom-components update
- Loading branch information
1 parent
7341506
commit b1c8f3c
Showing
18 changed files
with
126 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,4 +78,4 @@ dist/ | |
docs/ | ||
|
||
/src-pwa/pwa-flag.d.ts | ||
/src/store/store-flag.d.ts | ||
/src/stores/store-flag.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,4 +77,4 @@ dist/ | |
docs/ | ||
|
||
/src-pwa/pwa-flag.d.ts | ||
/src/store/store-flag.d.ts | ||
/src/stores/store-flag.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import VueGtm from 'vue-gtm'; | ||
import { createGtm } from '@gtm-support/vue-gtm'; | ||
|
||
import config from 'src/config'; | ||
|
||
export default ({ Vue }) => Vue.use(VueGtm, config.GTM_CONFIG); | ||
export default ({ app }) => app.use(createGtm(config.GTM_CONFIG)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import Vuelidate from 'vuelidate'; | ||
import { useVuelidate } from '@vuelidate/core'; | ||
|
||
export default ({ Vue }) => { | ||
Vue.use(Vuelidate); | ||
export default ({ app }) => { | ||
|
||
app.use(useVuelidate); | ||
}; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,48 @@ | ||
import Vue from 'vue'; | ||
import VueRouter from 'vue-router'; | ||
import { route } from 'quasar/wrappers'; | ||
import { createApp } from 'vue'; | ||
import { createGtm } from '@gtm-support/vue-gtm'; | ||
import { createRouter, createMemoryHistory, createWebHistory, createWebHashHistory } from 'vue-router'; | ||
import routes from 'src/router/routes'; | ||
import ga from 'src/router/analytics'; | ||
|
||
import routes from './routes'; | ||
import ga from './analytics'; | ||
import config from 'src/config/index'; | ||
|
||
Vue.use(VueRouter); | ||
const app = createApp({}); | ||
|
||
const Router = new VueRouter({ | ||
/* | ||
* NOTE! Change Vue Router mode from quasar.config.js -> build -> vueRouterMode | ||
* | ||
* When going with "history" mode, please also make sure "build.publicPath" | ||
* is set to something other than an empty string. | ||
* Example: '/' instead of '' | ||
*/ | ||
export default route(function() { | ||
const createHistory = process.env.SERVER | ||
? createMemoryHistory | ||
: (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory); | ||
|
||
// Leave as is and change from quasar.config.js instead! | ||
mode: process.env.VUE_ROUTER_MODE, | ||
base: process.env.VUE_ROUTER_BASE, | ||
scrollBehavior: () => ({ y: 0 }), | ||
routes | ||
}); | ||
const Router = createRouter({ | ||
scrollBehavior: () => ({ y: 0 }), | ||
routes, | ||
// Leave this as is and make changes in quasar.conf.js instead! | ||
// quasar.conf.js -> build -> vueRouterMode | ||
// quasar.conf.js -> build -> publicPath | ||
history: createHistory(process.env.VUE_ROUTER_BASE) | ||
}); | ||
|
||
Router.afterEach(to => { | ||
Vue.gtm.trackView( | ||
to.path, | ||
to.name, | ||
{ | ||
cid: ga.createSessionId(), | ||
path: to.path | ||
} | ||
); | ||
}); | ||
if (config.GTM_CONFIG) { | ||
app.use( | ||
createGtm({ | ||
...config.GTM_CONFIG, | ||
loadScript: true, | ||
vueRouter: Router, | ||
}) | ||
); | ||
} | ||
|
||
export default Router; | ||
Router.afterEach(to => { | ||
app.config.globalProperties.$gtm.trackView( | ||
to.path, | ||
to.name, | ||
{ | ||
cid: ga.createSessionId(), | ||
path: to.path | ||
} | ||
); | ||
}); | ||
|
||
return Router; | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { store } from 'quasar/wrappers'; | ||
import { createPinia } from 'pinia'; | ||
import { Router } from 'vue-router'; | ||
import { useQuasar, QVueGlobals } from 'quasar'; | ||
import piniaPluginPersistedState from 'pinia-plugin-persistedstate'; | ||
|
||
/* | ||
* When adding new properties to stores, you should also | ||
* extend the `PiniaCustomProperties` interface. | ||
* @see https://pinia.vuejs.org/core-concepts/plugins.html#typing-new-store-properties | ||
*/ | ||
declare module 'pinia' { | ||
export interface PiniaCustomProperties { | ||
readonly router: Router; | ||
$q: QVueGlobals; | ||
} | ||
} | ||
|
||
/* | ||
* If not building with SSR mode, you can | ||
* directly export the Store instantiation; | ||
* | ||
* The function below can be async too; either use | ||
* async/await or return a Promise which resolves | ||
* with the Store instance. | ||
*/ | ||
|
||
export default store((/* { ssrContext } */) => { | ||
const pinia = createPinia(); | ||
|
||
// You can add Pinia plugins here | ||
pinia.use(({ store }) => { | ||
store.$q = useQuasar(); | ||
}); | ||
|
||
pinia.use(piniaPluginPersistedState); | ||
|
||
return pinia; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "@quasar/app-webpack/tsconfig-preset", | ||
"compilerOptions": { | ||
"baseUrl": "." | ||
} | ||
} |