Skip to content

Commit d5ebec5

Browse files
author
Suhas Hariharan
committed
added default config method
Signed-off-by: Suhas Hariharan <[email protected]>
1 parent 4f7a0c9 commit d5ebec5

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

src/js/helpers.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,15 @@ async function getLocalConfig () {
253253
return data;
254254
}
255255

256+
/**
257+
* Retrieves the default extension config for new users.
258+
* @returns {Config} an object representing the default config.
259+
*/
260+
function getDefaultConfig () {
261+
const data = { opted_in: { changed: false, value: false }, percent_main_page: { changed: false, value: true } };
262+
return data;
263+
}
264+
256265
export {
257266
gradeToFP,
258267
grade_fp,
@@ -266,4 +275,6 @@ export {
266275
calculate_credit_hours,
267276
getSavedGrades,
268277
saveGradesLocally,
278+
getLocalConfig,
279+
getDefaultConfig,
269280
};

src/js/views/Options.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,18 @@
1616
<br>
1717
<footer>
1818
<br>
19-
SAS Powerschool Enhancement Suite is the collective work of many different people working together publicly. Visit our <a href="https://github.com/sas-fossdev/saspes" target="_blank">GitHub page</a> if you'd like to participate as well.<br>
19+
SAS Powerschool Enhancement Suite is the collective work of many different people working together publicly. Visit our <a
20+
href="https://github.com/sas-fossdev/saspes"
21+
target="_blank"
22+
>GitHub page</a> if you'd like to participate as well.<br>
2023
<br>
21-
If you believe you have encountered a bug in the extension, or have any other inquiries, please create an issue on <a href="https://github.com/sas-fossdev/saspes/issues" target="_blank"> the repository</a> or email <a href="mailto:[email protected]" target="_blank">[email protected]</a><br>
24+
If you believe you have encountered a bug in the extension, or have any other inquiries, please create an issue on <a
25+
href="https://github.com/sas-fossdev/saspes/issues"
26+
target="_blank"
27+
> the repository</a> or email <a
28+
href="mailto:[email protected]"
29+
target="_blank"
30+
2231
<br>
2332
Credits: <br>
2433
Special thanks to Alan Chang for the idea. <br>

0 commit comments

Comments
 (0)