Refactor & Clean up
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
@@ -27,7 +27,7 @@ export default define({
|
||||
};
|
||||
},
|
||||
created() {
|
||||
(this as any).os.getMeta().then(meta => {
|
||||
this.$root.getMeta().then(meta => {
|
||||
this.meta = meta;
|
||||
});
|
||||
}
|
||||
|
@@ -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 => {
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user