fix: improved web push management (#3421)

refactor: organized placement of new button + added comments

fix: added api routes for push registration

fix: modified get request to confirm key identity

fix: added back notification types to always show

feat: added a manageable device list

refactor: modified device list to make it mobile friendly

fix: correct typo for enabling notifications
This commit is contained in:
Brandon Cohen
2025-02-27 20:07:46 -06:00
committed by GitHub
parent 45c0682013
commit b3a9752858
11 changed files with 705 additions and 153 deletions

View File

@@ -1,4 +1,10 @@
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
import {
Column,
CreateDateColumn,
Entity,
ManyToOne,
PrimaryGeneratedColumn,
} from 'typeorm';
import { User } from './User';
@Entity()
@@ -18,9 +24,15 @@ export class UserPushSubscription {
@Column()
public p256dh: string;
@Column({ unique: true })
@Column()
public auth: string;
@Column({ nullable: true })
public userAgent: string;
@CreateDateColumn({ nullable: true })
public createdAt: Date;
constructor(init?: Partial<UserPushSubscription>) {
Object.assign(this, init);
}