Skip to content

Commit 2e40ac4

Browse files
Merge pull request #59 from webdevnerdstuff/dev
Dev
2 parents c9a010f + bc6bc44 commit 2e40ac4

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ npm i @wdns/vuetify-drilldown-table
4545

4646
## Change Log
4747

48-
[CHANGELOG](https://github.com/webdevnerdstuff/vuetify-drilldown-table/blob/master/CHANGELOG.md)
48+
[CHANGELOG](https://github.com/webdevnerdstuff/vuetify-drilldown-table/blob/main/CHANGELOG.md)
4949

5050

5151
## License
5252

5353
Copyright (c) 2023 WebDevNerdStuff
54-
Licensed under the [MIT license](https://github.com/webdevnerdstuff/vuetify-drilldown-table/blob/master/LICENSE.md).
54+
Licensed under the [MIT license](https://github.com/webdevnerdstuff/vuetify-drilldown-table/blob/main/LICENSE.md).
5555

5656

5757
## Legal

src/stores/index.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import packageJson from '@root/package.json';
33

44

55
export const useCoreStore = defineStore('core', () => {
6-
const packageName = packageJson.name;
7-
const storageName = 'vuetify-drilldown-table';
6+
const scopedPackageName = packageJson.name;
7+
const packageName = scopedPackageName.split('/')[1];
88

99
// Links //
1010
const repoBaseUrl = `https://github.com/webdevnerdstuff/${packageName}`;
@@ -14,7 +14,7 @@ export const useCoreStore = defineStore('core', () => {
1414
github: repoBaseUrl,
1515
githubProfile: 'https://github.com/webdevnerdstuff',
1616
license: `${repoBaseUrl}/blob/main/LICENSE.md`,
17-
npm: `https://www.npmjs.com/package/${packageName}`,
17+
npm: `https://www.npmjs.com/package/${scopedPackageName}`,
1818
vue: 'https://vuejs.org/',
1919
vueUse: 'https://vueuse.org/',
2020
vuetify: 'https://vuetifyjs.com/',
@@ -56,29 +56,29 @@ export const useCoreStore = defineStore('core', () => {
5656

5757
const actions = {
5858
setLocalStorage(val: string): string {
59-
const oldValue = localStorage.getItem(storageName);
59+
const oldValue = localStorage.getItem(packageName);
6060
const newValue = val ?? oldValue;
6161

62-
localStorage.setItem(storageName, newValue);
62+
localStorage.setItem(packageName, newValue);
6363
return newValue;
6464
},
6565
setTheme(val: string): string {
6666
const themeName = val === 'dark' ? 'light' : 'dark';
67-
const currentTheme = localStorage.getItem(`${storageName}-theme`);
67+
const currentTheme = localStorage.getItem(`${packageName}-theme`);
6868
const newTheme = themeName ?? currentTheme;
6969

70-
localStorage.setItem(`${storageName}-theme`, newTheme);
70+
localStorage.setItem(`${packageName}-theme`, newTheme);
7171
return newTheme;
7272
},
7373
};
7474

7575
const getters = {
7676
getLocalStorage: () => (): unknown => {
77-
const value = localStorage.getItem(storageName);
77+
const value = localStorage.getItem(packageName);
7878
return value;
7979
},
8080
getTheme: () => {
81-
const value = localStorage.getItem(`${storageName}-theme`);
81+
const value = localStorage.getItem(`${packageName}-theme`);
8282
return value;
8383
},
8484
};
@@ -89,8 +89,8 @@ export const useCoreStore = defineStore('core', () => {
8989
...getters,
9090
links,
9191
package: packageJson,
92+
packageName,
9293
pluginVersion: packageJson.version,
93-
storageName,
9494
tableHeaders,
9595
};
9696
});

0 commit comments

Comments
 (0)