bug fixes, new fonts, etc
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user