Skip to content

Commit

Permalink
3.11.4 (#55)
Browse files Browse the repository at this point in the history
* switcheroo

* 3.11.2

* fix grades > 10

* yeah man

* tired help

* e

* remove immediate call-to-action from error message

* úps

* 3.11.4

* refix
  • Loading branch information
QkeleQ10 authored Jun 18, 2024
1 parent 0315f57 commit aa113d2
Show file tree
Hide file tree
Showing 23 changed files with 354 additions and 207 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- name: Indicate beta version
run: |
sed -i '3s/.*/"message": "Study Tools voor Magister BETA"/' _locales/nl/messages.json
sed -i '3s/.*/"message": "Study Tools for Magister BETA"/' _locales/en/messages.json
- name: Upload as artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion manifest-firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"manifest_version": 3,
"name": "__MSG_appName__",
"description": "__MSG_appDesc__",
"version": "3.11.2",
"version": "3.11.4",
"default_locale": "nl",
"icons": {
"16": "icons/icon@16px.png",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"manifest_version": 3,
"name": "__MSG_appName__",
"description": "__MSG_appDesc__",
"version": "3.11.2",
"version": "3.11.4",
"default_locale": "nl",
"icons": {
"16": "icons/icon@16px.png",
Expand Down
28 changes: 0 additions & 28 deletions popup/dist/assets/index-BVWusu7F.js

This file was deleted.

1 change: 1 addition & 0 deletions popup/dist/assets/index-BmeHimE9.css

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions popup/dist/assets/index-CFAfwAOA.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion popup/dist/assets/index-DIOI6ABn.css

This file was deleted.

4 changes: 2 additions & 2 deletions popup/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="./favicon.ico">
<title>Study Tools-configuratiepaneel</title>
<script type="module" crossorigin src="./assets/index-BVWusu7F.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DIOI6ABn.css">
<script type="module" crossorigin src="./assets/index-CFAfwAOA.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-BmeHimE9.css">
</head>

<body>
Expand Down
19 changes: 19 additions & 0 deletions popup/dist/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ export default [
{
id: "grades",
settings: [
{
id: "suf-threshold",
title: "Voldoendegrens",
type: "SlideInput",
default: 5.5,
decimals: 1,
min: 1,
max: 10,
step: 0.1,
},
{
id: "cc",
title: "Cijfercalculator",
Expand Down Expand Up @@ -367,6 +377,15 @@ export default [
{ settingId: 'beta-options', operator: 'equal', value: true }
],
},
{
id: "custom-css",
title: "Aangepaste CSS",
type: "TextInput",
default: '',
conditions: [
{ settingId: 'beta-options', operator: 'equal', value: true }
],
},
// TODO: setting to disable color adaptation for dark theme
]
},
Expand Down
208 changes: 104 additions & 104 deletions popup/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions popup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"vue": "^3.4.27",
"vue-slider-component": "^4.1.0-beta.7"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.5",
"vite": "^5.3.1"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.1"
}
]
}
19 changes: 19 additions & 0 deletions popup/public/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ export default [
{
id: "grades",
settings: [
{
id: "suf-threshold",
title: "Voldoendegrens",
type: "SlideInput",
default: 5.5,
decimals: 1,
min: 1,
max: 10,
step: 0.1,
},
{
id: "cc",
title: "Cijfercalculator",
Expand Down Expand Up @@ -367,6 +377,15 @@ export default [
{ settingId: 'beta-options', operator: 'equal', value: true }
],
},
{
id: "custom-css",
title: "Aangepaste CSS",
type: "TextInput",
default: '',
conditions: [
{ settingId: 'beta-options', operator: 'equal', value: true }
],
},
// TODO: setting to disable color adaptation for dark theme
]
},
Expand Down
27 changes: 23 additions & 4 deletions popup/src/components/ThemePresets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const presets = [
'decoration': 'none,',
'decoration-size': 1,
'appbarcolor': 'false,207,95,47',
'shape': 8
'shape': 8,
'custom-css': ''
},
{
name: "Hawaï",
Expand All @@ -65,7 +66,8 @@ const presets = [
'decoration': 'custom,https://w0.peakpx.com/wallpaper/865/392/HD-wallpaper-hawaii-background-beautiful-colors-nature-outside-palm-trees-portrait-summer-water.jpg',
'decoration-size': 1,
'appbarcolor': 'false,207,95,47',
'shape': 8
'shape': 8,
'custom-css': ''
},
{
name: "Vaporwave",
Expand All @@ -77,7 +79,8 @@ const presets = [
'decoration': 'custom,https://wallpapers.com/images/hd/80s-neon-veqvixadrbra13q4.jpg',
'decoration-size': 1,
'appbarcolor': 'false,207,95,47',
'shape': 8
'shape': 8,
'custom-css': ''
},
{
name: "Wilde Westen",
Expand All @@ -89,7 +92,23 @@ const presets = [
'decoration': 'custom,https://static.vecteezy.com/system/resources/previews/023/592/503/non_2x/american-desert-landscape-western-background-vector.jpg',
'decoration-size': 1,
'appbarcolor': 'false,207,95,47',
'shape': 8
'shape': 8,
'custom-css': ''
},
{
name: "Discord",
thumbnail: 'url(\'https://static.vecteezy.com/system/resources/previews/006/892/625/original/discord-logo-icon-editorial-free-vector.jpg\')',
'ptheme': 'dark,235,48,85',
'pagecolor': 'true,223,6.7,20.6',
'wallpaper': 'none,',
'sidecolor': 'true,220,6.5,18',
'decoration': 'none',
'decoration-size': 1,
'appbarcolor': 'true,225,6.3,12.5',
'shape': 10,
'magister-picture': 'custom',
'magister-picture-source': 'data:image/webp;base64,UklGRuwCAABXRUJQVlA4WAoAAAAgAAAANwAANwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZWUDgg/gAAAHAHAJ0BKjgAOAA/EXi1UCwnpaKuFtuJgCIJZADOsD76t/HoihGP61hpYw5Z1NN4bq7oCKOufMpnylC3y80qP7dFAy4gANZ5R6+pAwH5/1E9hHfeEu9y0SE1mj3Z+QDLC5oD3+LqS1T6ZjXgiYHVWkX3iFjKDyX7UcGV+Smyo1jisfsJFp8mgoSp31n5pybf8uJuJDN8KLAr/UEXi/UylwajOjYeNN4sHaE1pCQwGkAIBs1SUk7qLFKqGb0GsiU4N61XrXFPy/3i91rdvItliQM1J8gZZ9QIz32RnVHALZTLoWn4//RXx++eKTomYf2YcvOjHNDz3CseeMrAAAAA',
'custom-css': ':root{--st-background-secondary:#232428}#st-start-widgets{background-color:var(--st-side-background);border-left:none;box-shadow:none}#st-start-widget-controls-wrapper,.menu-footer{background-color:#232428;border-top:none}'
}
]
</script>
Expand Down
22 changes: 15 additions & 7 deletions popup/src/components/inputs/ColorPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,23 @@ const swatches = [
{ name: "Oranjegeel", color: { h: 40, s: 51, l: 41 } }, // yellow
{ name: "Bloedrood", color: { h: 10, s: 51, l: 41 } }, // red
{ name: "Rozerood", color: { h: 341, s: 61, l: 41 } }, // pink
{ name: "Lavendelpaars", color: { h: 290, s: 41, l: 41 } }, // purple
{ name: "Bosbespaars", color: { h: 240, s: 41, l: 41 } }, // indigo
{ name: "Mauvepaars", color: { h: 290, s: 41, l: 41 } }, // purple
{ name: "Diepindigo", color: { h: 240, s: 41, l: 41 } }, // indigo
{ name: "Babyblauw", color: { h: 207, s: 52, l: 66 } },
{ name: "Mintgroen", color: { h: 161, s: 44, l: 60 } },
{ name: "Pastelgroen", color: { h: 90, s: 44, l: 60 } },
{ name: "Zandbeige", color: { h: 40, s: 44, l: 66 } },
{ name: "Zalmrood", color: { h: 10, s: 44, l: 66 } },
{ name: "Babyroze", color: { h: 341, s: 44, l: 66 } },
{ name: "Lavendelpaars", color: { h: 290, s: 44, l: 66 } },
{ name: "Zachtpaars", color: { h: 240, s: 44, l: 70 } },
]
function isSelected(color) {
return (color.h == value.value.h && color.s == value.value.s && color.l == value.value.l)
}
const isAnySwatchSelected = computed(() => swatches.some(swatch => isSelected(swatch.color)))
const isAnyMainSwatchSelected = computed(() => swatches.slice(0,8).some(swatch => isSelected(swatch.color)))
function updateColor(newColor) {
value.value = newColor
Expand All @@ -47,13 +55,13 @@ function updatePickerOpen(newPickerOpenValue) {
<div class="color-picker">
<div class="gallery">
<div class="swatches">
<button v-for="swatch in swatches" class="swatch" :class="{ 'selected': isSelected(swatch.color) }"
:key="swatch.name" :title="swatch.name"
<button v-for="swatch in swatches.slice(0, 8)" class="swatch"
:class="{ 'selected': isSelected(swatch.color) }" :key="swatch.name" :title="swatch.name"
:style="{ 'background-color': `hsl(${swatch.color.h} ${swatch.color.s}% ${swatch.color.l}%` }"
@click="value = swatch.color"></button>
</div>
<button class="custom" :class="{ 'selected': !isAnySwatchSelected }"
:style="{ '--sel-color': !isAnySwatchSelected ? `hsl(${value.h} ${value.s}% ${value.l}%)` : 'transparent' }"
<button class="custom" :class="{ 'selected': !isAnyMainSwatchSelected }"
:style="{ '--sel-color': !isAnyMainSwatchSelected ? `hsl(${value.h} ${value.s}% ${value.l}%)` : 'transparent' }"
title="Kleur kiezen" @click="pickerOpen = true">
<!-- style="background-image: radial-gradient(var(--color-surface-container) 66%, transparent calc(66% + 2px)), conic-gradient(in hsl longer hue, hsl(0 65% 50%) 0 0);" -->
<Icon>palette</Icon>
Expand Down
12 changes: 9 additions & 3 deletions popup/src/components/sheets/ColorWheelSheet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,19 @@ function isSelected(color) {
transition: margin 50ms, outline 50ms;
}
.swatch:first-child {
.swatch:nth-child(1) {
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}
.swatch:last-child {
.swatch:nth-child(8) {
border-top-right-radius: 6px;
}
.swatch:nth-child(9) {
border-bottom-left-radius: 6px;
}
.swatch:nth-child(16) {
border-bottom-right-radius: 6px;
}
Expand Down
14 changes: 6 additions & 8 deletions src/magister/scripts/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,13 @@ async function fetchWrapper(url, options, identifier = 'unknown', quiet = false)
if (!quiet) {
notify(
'snackbar',
`Fout ${res2.status}. Druk op Ctrl + Shift + J en stuur me een screenshot!`,
`Fout ${res2.status}. Vernieuw de pagina.`,
[
{ innerText: "E-mail", href: `mailto:quinten@althues.nl` },
{ innerText: "Discord", href: `https://discord.gg/2rP7pfeAKf` }
{ innerText: "Hulp", expandToDialog: "Probeer eerst wat achtergrondprogramma's te sluiten en de pagina te vernieuwen.\n\nBlijf je problemen ervaren? Druk op Ctrl + Shift + J en volg de aanwijzingen in het blauw." }
],
120000
)
console.log(`Het zou me erg helpen als je een screenshot of kopie van de volgende informatie doorstuurt via e-mail (quinten@althues.nl) of Discord (https://discord.gg/2rP7pfeAKf) 💚`)
console.log("%cBlijf je problemen ervaren? Neem contact op via e-mail (quinten@althues.nl) of Discord (https://discord.gg/2rP7pfeAKf) en stuur een screenshot van onderstaande foutmelding mee:", 'background-color: hsl(207 95 55); color: #fff; padding: 10px 20px; font: 600 13px system-ui;')
}
console.error(`APIRQ: ${res2.status}\n\nurl: ${url}\nuserId: ${magisterApiUserId}\nuserToken.length: ${magisterApiUserToken?.length} (@ ${identifier})`)
return resolve({})
Expand All @@ -325,14 +324,13 @@ async function fetchWrapper(url, options, identifier = 'unknown', quiet = false)
if (!quiet) {
notify(
'snackbar',
`Er is iets misgegaan. Druk op Ctrl + Shift + J en stuur me een screenshot!`,
`Er is iets misgegaan. Vernieuw de pagina.`,
[
{ innerText: "e-mail", href: `mailto:quinten@althues.nl` },
{ innerText: "Discord", href: `https://discord.gg/2rP7pfeAKf` }
{ innerText: "Hulp", expandToDialog: "Probeer eerst wat achtergrondprogramma's te sluiten en de pagina te vernieuwen.\n\nBlijf je problemen ervaren? Druk op Ctrl + Shift + J en volg de aanwijzingen in het blauw." }
],
120000
)
console.log(`Het zou me erg helpen als je een screenshot of kopie van de volgende informatie doorstuurt via e-mail (quinten@althues.nl) of Discord (https://discord.gg/2rP7pfeAKf) 💚`)
console.log("%cBlijf je problemen ervaren? Neem contact op via e-mail (quinten@althues.nl) of Discord (https://discord.gg/2rP7pfeAKf) en stuur een screenshot van onderstaande foutmelding mee:", 'background-color: hsl(207 95 55); color: #fff; padding: 10px 20px; font: 600 13px system-ui;')
}
console.error(`APIRQ: ${err}\n\nurl: ${url}\nuserId: ${magisterApiUserId}\nuserToken.length: ${magisterApiUserToken?.length} (@ ${identifier})`)
return ({})
Expand Down
Loading

0 comments on commit aa113d2

Please sign in to comment.