refactor: flow typing (#1012)

* fix: padding

* fix: Minor button alignment issues

* feat: Add icon to invite people button

* WIP
This commit is contained in:
Tom Moor
2019-08-08 23:09:09 -07:00
committed by GitHub
parent 7b2eea0009
commit d024d31f66
64 changed files with 207 additions and 144 deletions

View File

@@ -7,13 +7,13 @@ import unescape from 'shared/utils/unescape';
import BaseModel from 'models/BaseModel';
import Revision from 'models/Revision';
import User from 'models/User';
import DocumentsStore from 'stores/DocumentsStore';
type SaveOptions = { publish?: boolean, done?: boolean, autosave?: boolean };
export default class Document extends BaseModel {
isSaving: boolean;
ui: *;
store: *;
store: DocumentsStore;
collaborators: User[];
collectionId: string;
@@ -37,7 +37,7 @@ export default class Document extends BaseModel {
shareUrl: ?string;
revision: number;
constructor(data?: Object = {}, store: *) {
constructor(data?: Object = {}, store: DocumentsStore) {
super(data, store);
this.updateTitle();
}
@@ -54,7 +54,7 @@ export default class Document extends BaseModel {
@computed
get isStarred(): boolean {
return this.store.starredIds.get(this.id);
return !!this.store.starredIds.get(this.id);
}
@computed
@@ -90,7 +90,7 @@ export default class Document extends BaseModel {
return this.store.archive(this);
};
restore = (revision: ?Revision) => {
restore = (revision: Revision) => {
return this.store.restore(this, revision);
};