Compare commits

...

37 Commits

Author SHA1 Message Date
SethBurkart123 9e26d2c192 fix(changelog): versions and changelog fixed 2024-12-02 17:34:39 +11:00
SethBurkart123 7445e8be78 feat(changelog): update changelog + bump version 2024-12-02 12:30:25 +11:00
SethBurkart123 d1a876ff22 fix(home): sidebar button sometimes not selecting 2024-12-02 12:25:14 +11:00
SethBurkart123 e2176ea2fa fix(assessments): placing subject average trice 2024-12-02 12:23:47 +11:00
SethBurkart123 a999e4384b feat(notices): add animations to notices 2024-12-02 12:17:39 +11:00
SethBurkart123 4bf5420140 fix(eventManager): not triggering for already created elements' 2024-12-02 12:17:28 +11:00
SethBurkart123 8fb29f7f21 feat(settings): add subject average setting 2024-12-02 12:01:03 +11:00
SethBurkart123 44e3ed34d0 feat(assessments): add subject averages 2024-12-02 11:58:42 +11:00
SethBurkart123 32228ee4db style(changelog): reduce video padding for better screen realestate 2024-12-02 11:11:49 +11:00
SethBurkart123 1692bd3e92 fix(home): notices date picker not working 2024-12-02 11:11:03 +11:00
SethBurkart123 71cf9dbca8 feat(messages): improvements to direct message animations 2024-12-02 11:01:54 +11:00
SethBurkart123 372b591b16 feat(home): async home page loading 2024-12-02 10:58:24 +11:00
SethBurkart123 7578ecee74 chore(logging): improve logging 2024-12-02 09:27:33 +11:00
SethBurkart123 a2b4f81b86 feat(home): add skeleton loaders to homepage 2024-12-02 09:26:49 +11:00
SethBurkart123 fcd95f6823 perf(homePage): add fragmentation and refactor code 2024-11-30 21:55:10 +11:00
SethBurkart123 f2ea7c8104 fix: builds failing 2024-11-29 17:53:47 +11:00
SethBurkart123 379a3ebda0 chore: code cleanup 2024-11-29 17:34:16 +11:00
SethBurkart123 d1850e8ddb chore: fix CI/CD pipeline 2024-11-29 17:24:02 +11:00
SethBurkart123 88a87692cd fix(icon): discord icon scaled incorrectly 2024-11-29 17:18:42 +11:00
Seth Burkart 4e6e4870b0 Merge pull request #189 from MEGA-Dawg68/main
Added Discord icon
2024-11-29 17:15:53 +11:00
SethBurkart123 18f215fa5f chore: code cleanup 2024-11-29 17:14:32 +11:00
SethBurkart123 2ea8ada439 fix(popups): backdrop filter failing to appear during animation 2024-11-29 17:13:59 +11:00
SethBurkart123 34b2501617 chore(changelog): update changelog 2024-11-29 14:57:41 +11:00
SethBurkart123 88d4d3aa11 feat(news): add animations to news page 2024-11-29 14:57:17 +11:00
SethBurkart123 5ed3a05f6a perf(news): improved news page performance 2024-11-29 14:52:26 +11:00
SethBurkart123 430f158957 style(news): improved news styles 2024-11-29 14:38:41 +11:00
SethBurkart123 547caabc45 bump(version): 3.4.1 + changelog 2024-11-29 14:25:58 +11:00
SethBurkart123 f6e549c5da feat(animations): refine home page animations 2024-11-29 11:40:37 +11:00
SethBurkart123 dc1ae9c0a1 feat(animations): migrate to motion-one@11 2024-11-29 11:32:43 +11:00
SethBurkart123 34306e77cf fix(studentInfo): some cases year may be undefined 2024-11-29 10:29:35 +11:00
SethBurkart123 00c9f03827 bump: version to 3.4.0.4 2024-11-27 09:23:40 +11:00
SethBurkart123 6c93477998 fix: background migration not working properly 2024-11-27 09:22:34 +11:00
MEGA_Dawg68 9784b6162f Added Discord icon 2024-11-25 19:57:45 +08:00
SethBurkart123 96cf8e3eac feat: clean up CI/CD piplelines 2024-11-15 17:24:26 +11:00
SethBurkart123 0e23ea0cc3 fix: build running twice in CI/CD 2024-11-15 17:23:34 +11:00
SethBurkart123 7dfe347562 chore: move install to build section 2024-11-15 17:14:15 +11:00
SethBurkart123 21a8472c94 fix: themes failing to install from coverImage decoding error 2024-11-15 16:35:28 +11:00
19 changed files with 821 additions and 555 deletions
+24 -59
View File
@@ -1,73 +1,38 @@
name: MVP - make, version & publish
name: NodeJS Build
on:
push:
branches:
- main
workflow_dispatch: # This line adds manual triggering from the GitHub UI
concurrency: ${{ github.workflow }}-${{ github.ref }}
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
make_version_publish:
name: Make, Version & Publish
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node 20.x
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: ${{ matrix.node-version }}
- name: Install bun & Deps
- name: Build
run: |
npm install bun -g
bun install
npm install --legacy-peer-deps
npm run build
- name: 'Build - all browsers'
id: buildProject
run: MODE=chrome vite build && MODE=firefox vite build
- name: Zip dist folder
run: |
zip -r dist.zip dist
- name: '[ V E R S I O N ] : Create or Update Release Pull Request - Version Changes'
id: changesets
uses: changesets/action@v1
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
version: bun run version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Get current version info from package.json'
if: steps.changesets.outputs.hasChangesets == 'false'
id: package
run: |
echo "::set-output name=PACKAGE_NAME::$(jq -r .name package.json)"
echo "::set-output name=PACKAGE_VERSION::$(jq -r .version package.json)"
working-directory: ${{ github.workspace }}
- name: 'Check if a git release already exists for current version'
if: steps.changesets.outputs.hasChangesets == 'false'
id: checkRelease
run: |
TAG_NAME=${{ steps.package.outputs.PACKAGE_NAME }}@${{ steps.package.outputs.PACKAGE_VERSION }}
if gh release view $TAG_NAME &>/dev/null; then
echo "Release $TAG_NAME already exists."
echo "RELEASE_EXISTS=true" >> $GITHUB_ENV
else
echo "RELEASE_EXISTS=false" >> $GITHUB_ENV
fi
- name: 'Create Release Archive(s) - zip 🫰 it 🫰 up 🫰 !'
id: zip
if: steps.changesets.outputs.hasChangesets == 'false'
run: bun run zip
- name: 'Create a git release w/ notes & release archive(s)'
id: gitRelease
if: steps.changesets.outputs.hasChangesets == 'false' && env.RELEASE_EXISTS != 'true'
run: bun run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGE_NAME: ${{ steps.package.outputs.PACKAGE_NAME }}
PACKAGE_VERSION: ${{ steps.package.outputs.PACKAGE_VERSION }}
name: dist-zip
path: dist.zip
-38
View File
@@ -1,38 +0,0 @@
name: NodeJS Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install
npm run build
- name: Zip dist folder
run: |
zip -r dist.zip dist
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist-zip
path: dist.zip
+5 -2
View File
@@ -1,6 +1,6 @@
{
"name": "betterseqtaplus",
"version": "3.4.0",
"version": "3.4.1",
"type": "module",
"description": "Enhance SEQTA Learn's usability and aesthetics! A fork of BetterSEQTA to continue development, while incorporating a plethora of new and improved features!",
"browserslist": "> 0.5%, last 2 versions, not dead",
@@ -31,6 +31,8 @@
},
"license": "MIT",
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.25.9",
"@babel/runtime": "^7.26.0",
"@crxjs/vite-plugin": "2.0.0-beta.25",
"@types/mime-types": "^2.1.4",
"@vitejs/plugin-react-swc": "^3.7.0",
@@ -67,6 +69,7 @@
"@uiw/codemirror-theme-github": "^4.23.3",
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.20",
"caniuse-lite": "^1.0.30001684",
"classnames": "^2.5.1",
"codemirror": "^6.0.1",
"color": "^4.2.3",
@@ -79,7 +82,7 @@
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"million": "^3.1.11",
"motion": "^10.18.0",
"motion": "^11.12.0",
"postcss": "^8.4.45",
"publish-browser-extension": "^2.2.1",
"react": "17",
+532 -323
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -15,7 +15,7 @@
* along with EvenBetterSEQTA. If not, see <https://www.gnu.org/licenses/>.
*/
@import './injected/popup.scss';
@use 'injected/popup.scss';
html {
background: #161616 !important;
+60 -19
View File
@@ -1,9 +1,10 @@
@use "sass:meta";
@charset "UTF-8";
@import url("https://fonts.googleapis.com/css?family=Rubik:300,400,500,600");
@import "./injected/sidebar-animation.scss";
@import "./injected/theme.scss";
@import "./injected/transparency.scss";
@include meta.load-css("injected/sidebar-animation.scss");
@include meta.load-css("injected/theme.scss");
@include meta.load-css("injected/transparency.scss");
:root {
background: var(--better-main) !important;
@@ -1110,9 +1111,9 @@ div > ol:has(.uiFileHandlerWrapper) {
display: flex;
flex-direction: column;
background: var(--background-primary);
transition: 200ms;
box-shadow: inset 0px 5px 20px 1px rgba(0, 0, 0, 0.3);
padding-bottom: 25px;
transition: none;
color: var(--text-primary);
}
.dummynotice {
@@ -1551,6 +1552,10 @@ iframe.userHTML {
.Collapsible__Collapsible___3O8P3 > .Collapsible__header___-Afvq {
background: none;
}
.Collapsible__Collapsible___3O8P3 > .Collapsible__content___2c6of.Collapsible__enterActive___3b2ow,
.Collapsible__Collapsible___3O8P3 > .Collapsible__content___2c6of.Collapsible__exitActive___3rFL1 {
animation-timing-function: ease-out !important;
}
.AssessmentList__AssessmentList___1GdCl
> .AssessmentList__searchFilter___3N70o
+ .AssessmentList__items___3LcmQ {
@@ -2188,24 +2193,19 @@ li.MessageList__unread___3imtO {
overflow: hidden;
width: 100%;
padding: 0 !important;
margin: 0px auto 30px !important;
background: var(--background-primary) !important;
color: var(--text-primary);
display: flex;
flex-direction: row;
-webkit-box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.3);
box-shadow: 0px 5px 16px 6px rgba(0, 0, 0, 0.3);
&:hover {
.ArticleText a {
text-decoration: underline;
}
.articleimage {
width: 35%;
background-position: center;
background-size: cover;
min-height: 18em;
background-repeat: no-repeat;
}
.NewsArticle img {
width: 35%;
}
.ArticleText a {
padding: 10px 20px;
margin: 0;
@@ -2213,20 +2213,36 @@ li.MessageList__unread___3imtO {
font-size: 2em;
background: none;
}
.NewsArticle:hover > .ArticleText a {
text-decoration: underline;
}
.ArticleText p {
padding: 10px 20px;
margin: 0;
font-size: 1.5em;
}
.ArticleText {
display: flex;
flex-direction: column;
width: 65%;
height: 100%;
}
.articleimage {
width: 35%;
background-position: center;
background-size: cover;
min-height: 18em;
background-repeat: no-repeat;
}
}
#news-container {
gap: 16px;
> h1 {
margin-bottom: 12px;
}
}
.editmenu {
position: absolute;
right: 0;
@@ -2712,7 +2728,7 @@ li.MessageList__unread___3imtO {
display: flex;
flex-direction: column;
color: var(--text-primary);
transition: 200ms;
transition: 200ms, background-color 0s;
border-radius: 16px;
}
.dark .upcoming-items {
@@ -2989,7 +3005,6 @@ li.MessageList__unread___3imtO {
width: 96%;
display: flex;
margin: 0 auto;
padding-bottom: 16px;
}
.whatsnewImg {
margin: 8px auto;
@@ -3082,3 +3097,29 @@ li.MessageList__unread___3imtO {
object-fit: cover;
margin-bottom: 12px;
}
@keyframes shimmer {
0% {
background-position: -1000px 0;
}
100% {
background-position: 1000px 0;
}
}
.loading {
&.upcoming-items,
&.day-container {
background: linear-gradient(90deg,
var(--background-primary) 0%,
var(--background-secondary) 50%,
var(--background-primary) 100%
);
background-size: 1000px 100%;
animation: shimmer 2s infinite linear;
}
&.upcoming-items {
height: 35em;
}
}
+13 -5
View File
@@ -2,7 +2,7 @@
import { onMount } from 'svelte'
import ColourPicker from './ColourPicker.tsx';
import ReactAdapter from './utils/ReactAdapter.svelte';
import { animate, spring } from 'motion';
import { animate } from 'motion';
import { delay } from '@/seqta/utils/delay.ts'
const { hidePicker, standalone = false, savePresets = true, customOnChange = null, customState = null } = $props<{
@@ -23,13 +23,17 @@
animate(
content,
{ scale: [1, 0.4], opacity: [1, 0] },
{ easing: spring({ stiffness: 400, damping: 30 }) }
{
type: 'spring',
stiffness: 400,
damping: 30
}
);
animate(
background,
{ opacity: [1, 0] },
{ easing: [0.4, 0, 0.2, 1] }
{ ease: [0.4, 0, 0.2, 1] }
);
await delay(400);
@@ -43,13 +47,17 @@
animate(
background,
{ opacity: [0, 1] },
{ duration: 0.3, easing: [0.4, 0, 0.2, 1] }
{ duration: 0.3, ease: [0.4, 0, 0.2, 1] }
);
animate(
content,
{ scale: [0.4, 1], opacity: [0, 1] },
{ easing: spring({ stiffness: 400, damping: 30 }) }
{
type: 'spring',
stiffness: 400,
damping: 30
}
);
const handleEscapeKey = (e: KeyboardEvent) => {
+13 -17
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import { onMount, onDestroy, createEventDispatcher } from 'svelte';
import { animate as motionAnimate, spring } from 'motion';
import { onMount, onDestroy } from 'svelte';
import { animate as motionAnimate } from 'motion';
let { initial, animate, exit, transition, children, class: className } = $props<{
initial?: any,
@@ -12,11 +12,9 @@
}>();
let divElement: HTMLElement;
const dispatch = createEventDispatcher();
const playAnimation = (keyframe: any) => {
if (divElement && keyframe) {
let animationOptions = transition;
let finalKeyframe = { ...keyframe };
if (finalKeyframe.height === 'auto') {
@@ -36,16 +34,18 @@
finalKeyframe.height = `${autoHeight}px`;
}
if (!transition || transition.type === 'spring') {
const springConfig = transition?.config || { stiffness: 250, damping: 25 };
animationOptions = {
...transition,
easing: spring(springConfig)
};
}
const defaultSpringConfig = { stiffness: 250, damping: 25 };
const animation = motionAnimate(divElement, finalKeyframe, animationOptions);
return animation.finished;
const animation = motionAnimate(
[divElement],
finalKeyframe,
{
type: 'spring',
stiffness: transition?.stiffness || defaultSpringConfig.stiffness,
damping: transition?.damping || defaultSpringConfig.damping
}
);
return animation;
}
return Promise.resolve();
};
@@ -57,16 +57,12 @@
} else if (animate) {
await playAnimation(animate);
}
dispatch('animationend');
});
$effect(() => {
if (animate) {
playAnimation(animate);
}
dispatch('animationend');
});
onDestroy(async () => {
+4 -2
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import { animate, spring } from 'motion';
import { animate } from 'motion';
import { standalone } from '../utils/standalone.svelte'
let { state, onChange } = $props<{ state: boolean, onChange: (newState: boolean) => void }>();
@@ -18,7 +18,9 @@
x: enabled ? (standalone.standalone ? 24 : 20) : 0,
},
{
easing: spring(springParams),
type: 'spring',
stiffness: springParams.stiffness,
damping: springParams.damping,
}
);
};
@@ -1,7 +1,7 @@
<script lang="ts">
import type { Theme } from '@/interface/types/Theme'
import { fade } from 'svelte/transition';
import { animate, spring } from 'motion';
import { animate } from 'motion';
let { theme, currentThemes, setDisplayTheme, onInstall, onRemove, allThemes, displayTheme } = $props<{
theme: Theme | null;
@@ -28,7 +28,11 @@
animate(
modalElement,
{ y: [500, 0], opacity: [0, 1] },
{ easing: spring({ stiffness: 150, damping: 20 }) }
{
type: 'spring',
stiffness: 150,
damping: 20
}
);
}
});
@@ -37,7 +41,11 @@
animate(
modalElement,
{ y: [10, 500], opacity: [1, 0] },
{ easing: spring({ stiffness: 150, damping: 20 }) }
{
type: 'spring',
stiffness: 150,
damping: 20
}
);
setTimeout(() => {
setDisplayTheme(relatedTheme ?? null);
@@ -97,6 +97,16 @@
onChange: (isOn: boolean) => settingsState.notificationcollector = isOn
}
},
{
title: "Assessment Average",
description: "Shows your subject average for assessments.",
id: 8,
Component: Switch,
props: {
state: $settingsState.assessmentsAverage,
onChange: (isOn: boolean) => settingsState.assessmentsAverage = isOn
}
},
{
title: "Lesson Alerts",
description: "Sends a native browser notification ~5 minutes prior to lessons.",
+5 -1
View File
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "BetterSEQTA+",
"version": "3.4.0",
"version": "3.4.1",
"description": "Enhance SEQTA Learn's usability and aesthetics! A fork of BetterSEQTA to continue development add add heaps more features!",
"icons": {
"32": "resources/icons/icon-32.png",
@@ -40,6 +40,10 @@
{
"resources": ["resources/icons/*"],
"matches": ["*://*/*"]
},
{
"resources": ["seqta/utils/migration/migrate.html"],
"matches": ["*://*/*"]
}
]
}
+9 -1
View File
@@ -13,7 +13,11 @@ export async function AddBetterSEQTAElements() {
document.documentElement.classList.add('dark');
}
createHomeButton();
try {
await appendBackgroundToUI();
} catch (error) {
console.error('Error appending background to UI:', error);
}
await handleUserInfo();
handleStudentData();
createNewsButton();
@@ -144,7 +148,7 @@ async function getUserInfo() {
}
async function updateStudentInfo(students: any) {
const info = await getUserInfo(); // You would need to implement this to fetch or pass the user info
const info = await getUserInfo();
var index = students.findIndex(function (person: any) {
return (
person.firstname == info.userDesc.split(' ')[0] &&
@@ -167,7 +171,11 @@ async function updateStudentInfo(students: any) {
}
}
} else {
try {
houseelement.innerText = students[index].year;
} catch(err) {
houseelement.innerText = 'N/A';
}
}
}
+15 -2
View File
@@ -1,7 +1,14 @@
import localforage from 'localforage';
import type { Theme } from '@/old-interface/pages/Store';
import base64ToBlob from '@/seqta/utils/base64ToBlob';
type Theme = {
name: string;
description: string;
coverImage: string;
marqueeImage: string;
id: string;
}
type ThemeContent = {
id: string;
name: string;
@@ -14,6 +21,11 @@ type ThemeContent = {
images: { id: string, variableName: string, data: string }[]; // data: base64
};
function stripBase64Prefix(base64String: string): string {
const prefixRegex = /^data:image\/\w+;base64,/;
return base64String.replace(prefixRegex, '');
}
export const StoreDownloadTheme = async (theme: { themeContent: Theme }) => {
if (!theme.themeContent.id) return;
@@ -24,7 +36,8 @@ export const StoreDownloadTheme = async (theme: { themeContent: Theme }) => {
};
export const InstallTheme = async (themeData: ThemeContent) => {
const coverImageBlob = base64ToBlob(themeData.coverImage);
const strippedCoverImage = stripBase64Prefix(themeData.coverImage);
const coverImageBlob = base64ToBlob(strippedCoverImage);
const images = themeData.images.map((image) => ({
...image,
+17
View File
@@ -46,10 +46,27 @@ class EventManager {
}
const unregister = () => this.unregisterById(event, id);
this.listeners.get(event)!.push({ id, options, callback, unregister });
this.scanExistingElements(options, callback);
this.startObserving(options.parentElement);
return { unregister };
}
private async scanExistingElements(options: EventListenerOptions, callback: (element: Element) => void): Promise<void> {
const root = options.parentElement || document.documentElement;
const elements = Array.from(root.getElementsByTagName('*'));
elements.unshift(root);
for (let i = 0; i < elements.length; i += this.chunkSize) {
const chunk = elements.slice(i, i + this.chunkSize);
const filteredChunk = chunk.filter(element => this.matchesOptions(element, options));
for (const element of filteredChunk) {
callback(element);
}
}
}
public unregister(event: string): void {
if (this.listeners.has(event)) {
this.listeners.delete(event);
+17 -1
View File
@@ -44,7 +44,23 @@ const getSelectedBackground = (): string | null => {
const startMigration = async () => {
try {
console.info('Starting background extraction...');
const backgrounds = await getAllBackgrounds();
let backgrounds: Data[];
try {
backgrounds = await getAllBackgrounds();
if (!backgrounds || backgrounds.length === 0) {
console.info('No backgrounds to migrate');
window.parent.postMessage({ type: 'MIGRATION_COMPLETE' }, '*');
return;
}
} catch (error: any) {
if (error.name === 'NotFoundError' && error.message.includes('object stores was not found')) {
console.info('No backgrounds to migrate: object store not found');
window.parent.postMessage({ type: 'MIGRATION_COMPLETE' }, '*');
return;
}
console.error('Error fetching backgrounds:', error);
throw new Error('Failed to fetch backgrounds');
}
const selectedBackground = getSelectedBackground();
console.info(`Found ${backgrounds.length} backgrounds`);
+1
View File
@@ -38,6 +38,7 @@ export interface SettingsState {
defaultPage: string;
devMode?: boolean;
originalDarkMode?: boolean;
assessmentsAverage?: boolean;
}
interface ToggleItem {
+1 -8
View File
@@ -1,17 +1,10 @@
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");
import flattenColorPalette from "tailwindcss/lib/util/flattenColorPalette";
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./src/**/*.{js,ts,jsx,tsx,html,svelte}",
],
//safelist: [
//{
// pattern: / */,
//}
//],
darkMode: "class",
theme: {
fontSize: {
+10
View File
@@ -54,6 +54,16 @@ export default defineConfig({
port: 5173
}
},
css: {
preprocessorOptions: {
scss: {
api: 'modern'
}
}
},
optimizeDeps: {
include: ['@babel/runtime/helpers/extends', '@babel/runtime/helpers/interopRequireDefault'],
},
build: {
outDir: resolve(__dirname, 'dist', mode),
emptyOutDir: false,