Refactor & Clean up

This commit is contained in:
syuilo
2018-11-09 08:13:34 +09:00
parent ba845f5218
commit 60ef3e3563
154 changed files with 438 additions and 481 deletions

View File

@@ -46,7 +46,7 @@ export default define({
};
},
mounted() {
(this as any).os.getMeta().then(meta => {
this.$root.getMeta().then(meta => {
this.announcements = meta.broadcasts;
this.fetching = false;
});

View File

@@ -27,7 +27,7 @@ export default define({
};
},
created() {
(this as any).os.getMeta().then(meta => {
this.$root.getMeta().then(meta => {
this.meta = meta;
});
}

View File

@@ -32,11 +32,11 @@ export default define({
};
},
mounted() {
this.connection = (this as any).os.stream.useSharedConnection('main');
this.connection = this.$root.stream.useSharedConnection('main');
this.connection.on('driveFileCreated', this.onDriveFileCreated);
(this as any).api('drive/stream', {
this.$root.api('drive/stream', {
type: 'image/*',
limit: 9
}).then(images => {

View File

@@ -112,7 +112,7 @@ export default define({
}
},
mounted() {
this.connection = (this as any).os.stream.useSharedConnection('notesStats');
this.connection = this.$root.stream.useSharedConnection('notesStats');
this.connection.on('stats', this.onStats);
this.connection.on('statsLog', this.onStatsLog);

View File

@@ -52,12 +52,12 @@ export default define({
};
},
mounted() {
(this as any).os.getMeta().then(meta => {
this.$root.getMeta().then(meta => {
this.meta = meta;
this.fetching = false;
});
this.connection = (this as any).os.stream.useSharedConnection('serverStats');
this.connection = this.$root.stream.useSharedConnection('serverStats');
},
beforeDestroy() {
this.connection.dispose();

View File

@@ -101,7 +101,7 @@ export default define({
fetch() {
this.fetching = true;
(this as any).api('drive/files', {
this.$root.api('drive/files', {
folderId: this.props.folder,
type: 'image/*',
limit: 100