chore: clean up unused/simple packages

This commit is contained in:
mrjvs
2026-08-19 16:38:14 +02:00
parent 05dd74baf1
commit bccf6aafe7
3 changed files with 19 additions and 991 deletions

998
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,6 @@
"@pretendonetwork/grpc": "^2.5.4",
"@pretendonetwork/mii-js": "^1.0.11",
"@vueuse/core": "^14.4.0",
"base64-arraybuffer": "^1.0.2",
"better-sqlite3": "^12.11.1",
"discord-api-types": "^0.38.53",
"eslint": "^9.39.5",
@@ -37,7 +36,6 @@
"mlly": "^1.8.2",
"mongodb": "^7.5.0",
"nice-grpc": "^2.1.17",
"node-stdlib-browser": "^1.2.0",
"nodemailer": "^9.0.5",
"nuxt": "^4.5.2",
"octokit": "^5.0.5",

View File

@@ -1,6 +1,5 @@
<script setup lang="ts">
import Mii from '@pretendonetwork/mii-js';
import { decode } from 'base64-arraybuffer';
import BirthdaySetter from '@/components/BirthdaySetter/BirthdaySetter.vue';
import { miiEditorJSON } from '@/utils/miieditor';
import type { ApiAccountUpdateRequest } from '~~/shared/api-types';
@@ -65,13 +64,18 @@ const newMiiSmileUrl = computed(() => {
});
});
function base64ToArrayBuffer(base64: string): ArrayBuffer {
const binaryString = atob(base64);
const binaryArray = new TextEncoder().encode(binaryString);
return binaryArray.buffer;
}
// this initalizes a mii for editing
// returns true if mii data was parsed successfully
function initializeMiiData(encodedUserMiiData: string) {
// We initialize the Mii object
try {
// @ts-expect-error -- this works just fine
const tempMii = new Mii(decode(encodedUserMiiData));
const tempMii = new Mii(base64ToArrayBuffer(encodedUserMiiData) as any);// ArrayBuffer isn't a Buffer, but it works fine
mii.value = tempMii;
// we also initialize the old mii variable, which will be used to render the miis in the save dialogue
oldMii = tempMii;