Refactor client (#3178)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
This commit is contained in:
syuilo
2018-11-09 16:00:29 +09:00
committed by GitHub
parent 5d882dc3df
commit 3f79c9ae49
52 changed files with 328 additions and 421 deletions

View File

@@ -15,41 +15,6 @@ let spinner = null;
let pending = 0;
//#endregion
export type API = {
chooseDriveFile: (opts: {
title?: string;
currentFolder?: any;
multiple?: boolean;
}) => Promise<any>;
chooseDriveFolder: (opts: {
title?: string;
currentFolder?: any;
}) => Promise<any>;
dialog: (opts: {
title: string;
text: string;
actions?: Array<{
text: string;
id?: string;
}>;
}) => Promise<string>;
input: (opts: {
title: string;
placeholder?: string;
default?: string;
}) => Promise<string>;
post: (opts?: {
reply?: any;
renote?: any;
}) => void;
notify: (message: string) => void;
};
/**
* Misskey Operating System
*/
@@ -70,16 +35,6 @@ export default class MiOS extends EventEmitter {
public app: Vue;
@autobind
public new(vm, props) {
const x = new vm({
parent: this.app,
propsData: props
}).$mount();
document.body.appendChild(x.$el);
return x;
}
/**
* Whether is debug mode
*/
@@ -89,8 +44,6 @@ export default class MiOS extends EventEmitter {
public store: ReturnType<typeof initStore>;
public apis: API;
/**
* A connection manager of home stream
*/