mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-08-23 09:07:40 -05:00
chore: clean up unused/simple packages
This commit is contained in:
998
package-lock.json
generated
998
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user