Skip to content

Commit 7520903

Browse files
authored
Merge pull request #9 from BetterSEQTA/main
update fork with base repo
2 parents c816174 + 96cf8e3 commit 7520903

File tree

6 files changed

+378
-107
lines changed

6 files changed

+378
-107
lines changed

.github/workflows/mvp.yml

+30-65
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,38 @@
1-
name: MVP - make, version & publish
1+
name: NodeJS Build
22

33
on:
44
push:
5-
branches:
6-
- main
7-
workflow_dispatch: # This line adds manual triggering from the GitHub UI
8-
9-
concurrency: ${{ github.workflow }}-${{ github.ref }}
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
108

119
jobs:
12-
make_version_publish:
13-
name: Make, Version & Publish
10+
build:
1411
runs-on: ubuntu-latest
15-
steps:
16-
- name: Checkout Repo
17-
uses: actions/checkout@v4
18-
19-
- name: Setup Node 20.x
20-
uses: actions/setup-node@v4
21-
with:
22-
node-version: 20.x
23-
24-
- name: Install bun & Deps
25-
run: |
26-
npm install bun -g
27-
bun install
28-
29-
- name: 'Build - all browsers'
30-
id: buildProject
31-
run: MODE=chrome vite build && MODE=firefox vite build
3212

33-
- name: '[ V E R S I O N ] : Create or Update Release Pull Request - Version Changes'
34-
id: changesets
35-
uses: changesets/action@v1
36-
with:
37-
version: bun run version
38-
env:
39-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
strategy:
14+
matrix:
15+
node-version: [20.x]
4016

41-
- name: 'Get current version info from package.json'
42-
if: steps.changesets.outputs.hasChangesets == 'false'
43-
id: package
44-
run: |
45-
echo "::set-output name=PACKAGE_NAME::$(jq -r .name package.json)"
46-
echo "::set-output name=PACKAGE_VERSION::$(jq -r .version package.json)"
47-
working-directory: ${{ github.workspace }}
48-
49-
- name: 'Check if a git release already exists for current version'
50-
if: steps.changesets.outputs.hasChangesets == 'false'
51-
id: checkRelease
52-
run: |
53-
TAG_NAME=${{ steps.package.outputs.PACKAGE_NAME }}@${{ steps.package.outputs.PACKAGE_VERSION }}
54-
if gh release view $TAG_NAME &>/dev/null; then
55-
echo "Release $TAG_NAME already exists."
56-
echo "RELEASE_EXISTS=true" >> $GITHUB_ENV
57-
else
58-
echo "RELEASE_EXISTS=false" >> $GITHUB_ENV
59-
fi
60-
61-
- name: 'Create Release Archive(s) - zip 🫰 it 🫰 up 🫰 !'
62-
id: zip
63-
if: steps.changesets.outputs.hasChangesets == 'false'
64-
run: bun run zip
65-
66-
- name: 'Create a git release w/ notes & release archive(s)'
67-
id: gitRelease
68-
if: steps.changesets.outputs.hasChangesets == 'false' && env.RELEASE_EXISTS != 'true'
69-
run: bun run release
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
PACKAGE_NAME: ${{ steps.package.outputs.PACKAGE_NAME }}
73-
PACKAGE_VERSION: ${{ steps.package.outputs.PACKAGE_VERSION }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Build
26+
run: |
27+
npm install
28+
npm run build
29+
30+
- name: Zip dist folder
31+
run: |
32+
zip -r dist.zip dist
33+
34+
- name: Upload artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: dist-zip
38+
path: dist.zip

.github/workflows/testing.yml

-38
This file was deleted.

src/SEQTA.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export function OpenWhatsNewPopup() {
146146
let video = document.createElement('video')
147147
let source = document.createElement('source')
148148
// Perhaps we host this on a server and then grab it instead of having it locally?
149-
source.setAttribute('src', 'https://raw.githubusercontent.com/BetterSEQTA/BetterSEQTA-Plus/main/src/resources/update-video.webm')
149+
source.setAttribute('src', 'https://raw.githubusercontent.com/BetterSEQTA/BetterSEQTA-Plus/main/src/resources/update-video.mp4')
150150
video.autoplay = true
151151
video.muted = true
152152
video.loop = true
@@ -1334,11 +1334,12 @@ export function setupSettingsButton() {
13341334
extensionPopup!.style.transform = `scale(${progress})`
13351335
}, { easing: spring({ stiffness: 280, damping: 20 }) });
13361336

1337-
extensionPopup!.classList.remove('hide');
13381337
} else {
13391338
extensionPopup!.style.opacity = '1'
13401339
extensionPopup!.style.transform = 'scale(1)'
1340+
extensionPopup!.style.transition = 'opacity 0s linear, transform 0s linear'
13411341
}
1342+
extensionPopup!.classList.remove('hide');
13421343
SettingsClicked = true;
13431344
}
13441345
});

src/resources/update-video.mp4

2.3 MB
Binary file not shown.

src/seqta/ui/themes/downloadTheme.ts

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import localforage from 'localforage';
2-
import type { Theme } from '@/old-interface/pages/Store';
32
import base64ToBlob from '@/seqta/utils/base64ToBlob';
43

4+
type Theme = {
5+
name: string;
6+
description: string;
7+
coverImage: string;
8+
marqueeImage: string;
9+
id: string;
10+
}
11+
512
type ThemeContent = {
613
id: string;
714
name: string;
@@ -14,6 +21,11 @@ type ThemeContent = {
1421
images: { id: string, variableName: string, data: string }[]; // data: base64
1522
};
1623

24+
function stripBase64Prefix(base64String: string): string {
25+
const prefixRegex = /^data:image\/\w+;base64,/;
26+
return base64String.replace(prefixRegex, '');
27+
}
28+
1729
export const StoreDownloadTheme = async (theme: { themeContent: Theme }) => {
1830
if (!theme.themeContent.id) return;
1931

@@ -24,7 +36,8 @@ export const StoreDownloadTheme = async (theme: { themeContent: Theme }) => {
2436
};
2537

2638
export const InstallTheme = async (themeData: ThemeContent) => {
27-
const coverImageBlob = base64ToBlob(themeData.coverImage);
39+
const strippedCoverImage = stripBase64Prefix(themeData.coverImage);
40+
const coverImageBlob = base64ToBlob(strippedCoverImage);
2841

2942
const images = themeData.images.map((image) => ({
3043
...image,

0 commit comments

Comments
 (0)