-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstorage.ts
40 lines (35 loc) · 959 Bytes
/
storage.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { storage } from "@wxt-dev/storage";
export interface CustomLists {
all: string;
}
export interface ExtensionStorageSchema {
/**
* The user's personal access token (PAT).
*/
githubPat: string | null;
/**
* When `true`, don't show the generated line counts next to additions and subtractions.
*/
hideGeneratedLineCount: boolean;
/**
* When `true`, don't show the generated line counts next to additions and subtractions.
*/
customLists: {
all: string;
};
}
export const githubPatStorage = storage.defineItem<string>("local:githubPat", {
defaultValue: import.meta.env.VITE_DEFAULT_TOKEN ?? "",
});
export const hideGeneratedLineCountStorage = storage.defineItem<boolean>(
"local:hideGeneratedLineCount",
{ defaultValue: false },
);
export const customListsStorage = storage.defineItem<{ all: string }>(
"local:customLists",
{
defaultValue: {
all: `*.lock\n*.lock.*\n*-lock*`,
},
},
);