mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-25 17:33:14 +03:00
fix: closing modal sometimes covered by header (#2097)
This commit is contained in:
parent
7ff12a6d0f
commit
ab8669882a
@ -36,7 +36,6 @@ interface BlobRow {
|
|||||||
export class WorkspaceDatabase {
|
export class WorkspaceDatabase {
|
||||||
sqliteDB: Database;
|
sqliteDB: Database;
|
||||||
ydoc = new Y.Doc();
|
ydoc = new Y.Doc();
|
||||||
_db: Database | null = null;
|
|
||||||
|
|
||||||
ready: Promise<Uint8Array>;
|
ready: Promise<Uint8Array>;
|
||||||
|
|
||||||
@ -59,14 +58,14 @@ export class WorkspaceDatabase {
|
|||||||
|
|
||||||
// release resources
|
// release resources
|
||||||
destroy = () => {
|
destroy = () => {
|
||||||
this._db?.close();
|
this.sqliteDB?.close();
|
||||||
this.ydoc.destroy();
|
this.ydoc.destroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
reconnectDB = () => {
|
reconnectDB = () => {
|
||||||
logger.log('open db', this.path);
|
logger.log('open db', this.path);
|
||||||
if (this._db) {
|
if (this.sqliteDB) {
|
||||||
this._db.close();
|
this.sqliteDB.close();
|
||||||
}
|
}
|
||||||
// use cached version?
|
// use cached version?
|
||||||
const db = sqlite(this.path);
|
const db = sqlite(this.path);
|
||||||
@ -75,7 +74,7 @@ export class WorkspaceDatabase {
|
|||||||
// logger.error('open db error', error);
|
// logger.error('open db error', error);
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
this._db = db;
|
this.sqliteDB = db;
|
||||||
db.exec(schemas.join(';'));
|
db.exec(schemas.join(';'));
|
||||||
return db;
|
return db;
|
||||||
};
|
};
|
||||||
|
@ -34,6 +34,7 @@ export const StyledModal = styled(ModalUnstyled, {
|
|||||||
left: '0',
|
left: '0',
|
||||||
top: '0',
|
top: '0',
|
||||||
zIndex: 'var(--affine-z-index-modal)',
|
zIndex: 'var(--affine-z-index-modal)',
|
||||||
|
WebkitAppRegion: 'no-drag',
|
||||||
'*': {
|
'*': {
|
||||||
WebkitTapHighlightColor: 'transparent',
|
WebkitTapHighlightColor: 'transparent',
|
||||||
outline: 'none',
|
outline: 'none',
|
||||||
|
Loading…
Reference in New Issue
Block a user