Skip to content

Commit 9e1a0fe

Browse files
committed
[IMP] rename CORS extension flags to cors_ prefix
1 parent ccce2d7 commit 9e1a0fe

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/stores/settings.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ interface State {
4747
// Server configuration
4848
cors: string;
4949
cors_regex: string;
50-
allow_aw_chrome_extension: boolean;
51-
allow_all_mozilla_extension: boolean;
50+
cors_allow_aw_chrome_extension: boolean;
51+
cors_allow_all_mozilla_extension: boolean;
5252

5353
// Set to true if settings loaded
5454
_loaded: boolean;
@@ -90,8 +90,8 @@ export const useSettingsStore = defineStore('settings', {
9090
requestTimeout: 30,
9191
cors: '',
9292
cors_regex: '',
93-
allow_aw_chrome_extension: true,
94-
allow_all_mozilla_extension: false,
93+
cors_allow_aw_chrome_extension: true,
94+
cors_allow_all_mozilla_extension: false,
9595

9696
_loaded: false,
9797
}),

src/views/settings/ServerSettings.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ div
1414

1515
h5.mt-4 Extensions Shortcuts
1616
b-form-group(label-cols-md=4)
17-
b-form-checkbox(v-model="allow_aw_chrome_extension") Allow ActivityWatch extension (Chrome)
17+
b-form-checkbox(v-model="cors_allow_aw_chrome_extension") Allow ActivityWatch extension (Chrome)
1818
template(#description)
1919
div Chrome extensions use a stable, persistent ID, so the official extension is reliably supported.
2020

2121
b-form-group(label-cols-md=4)
22-
b-form-checkbox(v-model="allow_all_mozilla_extension") Allow all Firefox extensions (DANGEROUS)
22+
b-form-checkbox(v-model="cors_allow_all_mozilla_extension") Allow all Firefox extensions (DANGEROUS)
2323
template(#description)
2424
div Every version of a Mozilla extension has its own ID to avoid fingerprinting. This is why you must either allow all extensions or manually configure your specific ID.
25-
div.mt-2.text-danger(v-if="allow_all_mozilla_extension")
25+
div.mt-2.text-danger(v-if="cors_allow_all_mozilla_extension")
2626
| ⚠️ DANGEROUS: Not recommended for security. If enabled, any installed extension can access your ActivityWatch data. Use this only if you know what extensions you have and assume full responsibility.
2727
div(v-else)
2828
| Recommended for security. To allow a specific extension safely:
@@ -62,20 +62,20 @@ export default {
6262
useSettingsStore().update({ cors_regex });
6363
},
6464
},
65-
allow_aw_chrome_extension: {
65+
cors_allow_aw_chrome_extension: {
6666
get() {
67-
return useSettingsStore().allow_aw_chrome_extension;
67+
return useSettingsStore().cors_allow_aw_chrome_extension;
6868
},
69-
set(allow_aw_chrome_extension) {
70-
useSettingsStore().update({ allow_aw_chrome_extension });
69+
set(cors_allow_aw_chrome_extension) {
70+
useSettingsStore().update({ cors_allow_aw_chrome_extension });
7171
},
7272
},
73-
allow_all_mozilla_extension: {
73+
cors_allow_all_mozilla_extension: {
7474
get() {
75-
return useSettingsStore().allow_all_mozilla_extension;
75+
return useSettingsStore().cors_allow_all_mozilla_extension;
7676
},
77-
set(allow_all_mozilla_extension) {
78-
useSettingsStore().update({ allow_all_mozilla_extension });
77+
set(cors_allow_all_mozilla_extension) {
78+
useSettingsStore().update({ cors_allow_all_mozilla_extension });
7979
},
8080
},
8181
},

0 commit comments

Comments
 (0)