bug fixes, new fonts, etc

This commit is contained in:
yohlo
2025-10-02 14:49:29 -05:00
parent 2dfb7c63d3
commit 8579ec36ca
16 changed files with 111 additions and 83 deletions

View File

@@ -17,6 +17,8 @@ const commonInputStyles = {
const theme = createTheme({
defaultRadius: "sm",
fontFamily: '"Inter", sans-serif',
headings: { fontFamily: '"League Spartan", sans-serif' },
components: {
TextInput: {
styles: commonInputStyles,

View File

@@ -18,6 +18,8 @@ class PocketBaseAdminClient {
this.pb = new PocketBase(process.env.POCKETBASE_URL);
this.pb.beforeSend = async (url, options) => {
await this.authPromise;
if (this.pb.authStore.isValid && this.isTokenExpiringSoon()) {
try {
await this.refreshAuth();
@@ -39,17 +41,16 @@ class PocketBaseAdminClient {
};
this.pb.autoCancellation(false);
Object.assign(this, createPlayersService(this.pb));
Object.assign(this, createTeamsService(this.pb));
Object.assign(this, createTournamentsService(this.pb));
Object.assign(this, createMatchesService(this.pb));
Object.assign(this, createReactionsService(this.pb));
Object.assign(this, createActivitiesService(this.pb));
Object.assign(this, createBadgesService(this.pb));
this.authPromise = this.authenticate();
this.authPromise.then(() => {
Object.assign(this, createPlayersService(this.pb));
Object.assign(this, createTeamsService(this.pb));
Object.assign(this, createTournamentsService(this.pb));
Object.assign(this, createMatchesService(this.pb));
Object.assign(this, createReactionsService(this.pb));
Object.assign(this, createActivitiesService(this.pb));
Object.assign(this, createBadgesService(this.pb));
this.startTokenRefresh();
});
}
@@ -62,7 +63,6 @@ class PocketBaseAdminClient {
process.env.POCKETBASE_ADMIN_EMAIL!,
process.env.POCKETBASE_ADMIN_PASSWORD!
);
console.log('PocketBase admin authenticated successfully');
} catch (error) {
console.error('Failed to authenticate PocketBase admin:', error);
throw error;
@@ -72,7 +72,6 @@ class PocketBaseAdminClient {
private async refreshAuth() {
try {
await this.pb.collection("_superusers").authRefresh();
console.log('PocketBase admin token refreshed');
} catch (error) {
console.error('Failed to refresh PocketBase admin token:', error);
throw error;