Skip to content

Commit

Permalink
Change internal setting name
Browse files Browse the repository at this point in the history
  • Loading branch information
A-K-O-R-A committed Sep 30, 2024
1 parent 5fee1ab commit 7910fa3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ chrome.runtime.onInstalled.addListener(async (details) => {
'theme',
'studiengang',
'hisqisPimpedTable',
'selmajExamTheme',
'improveSelma',
'savedClickCounter',
'saved_click_counter', // legacy
'Rocket', // legacy
Expand All @@ -58,7 +58,7 @@ chrome.runtime.onInstalled.addListener(async (details) => {
if (typeof currentSettings.dashboardDisplay === 'undefined') updateObj.dashboardDisplay = 'favoriten'
if (typeof currentSettings.fwdEnabled === 'undefined') updateObj.fwdEnabled = true
if (typeof currentSettings.hisqisPimpedTable === 'undefined') updateObj.hisqisPimpedTable = true
if (typeof currentSettings.selmajExamTheme === 'undefined') updateObj.selmajExamTheme = true
if (typeof currentSettings.improveSelma === 'undefined') updateObj.improveSelma = true
if (typeof currentSettings.theme === 'undefined') updateObj.theme = 'system'
if (typeof currentSettings.studiengang === 'undefined') updateObj.studiengang = 'general'
if (typeof currentSettings.selectedRocketIcon === 'undefined') updateObj.selectedRocketIcon = JSON.stringify(rockets.default)
Expand Down
6 changes: 3 additions & 3 deletions src/contentScripts/other/selma/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ Actual logic
*/

(async () => {
const { selmajExamTheme } = await chrome.storage.local.get([
'selmajExamTheme'
const { improveSelma } = await chrome.storage.local.get([
'improveSelma'
])

if (!selmajExamTheme) return
if (!improveSelma) return

// Apply all custom changes
document.addEventListener('DOMContentLoaded', eventListener, false)
Expand Down
16 changes: 8 additions & 8 deletions src/freshContent/settings/settingPages/ImproveSelma.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</p>

<Setting
v-model="selmajExamTheme"
v-model="improveSelma"
txt="Das verbesserte layout und die Notenverteilung bei Selma benutzen"
class="setting"
/>
Expand All @@ -23,26 +23,26 @@ export default defineComponent({
Setting
},
setup () {
const selmajExamTheme = ref(true)
const improveSelma = ref(true)
onBeforeMount(async () => {
const { selmajExamTheme: storedValue } = await chrome.storage.local.get([
'selmajExamTheme'
const { improveSelma: storedValue } = await chrome.storage.local.get([
'improveSelma'
])
selmajExamTheme.value = storedValue ?? true
watch(selmajExamTheme, valueUpdate)
improveSelma.value = storedValue ?? true
watch(improveSelma, valueUpdate)
})
const valueUpdate = async () => {
// When we got here, we have the permission
await chrome.storage.local.set({
selmajExamTheme: selmajExamTheme.value
improveSelma: improveSelma.value
})
}
return {
selmajExamTheme
improveSelma
}
}
})
Expand Down

0 comments on commit 7910fa3

Please sign in to comment.