mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
no more default export
This commit is contained in:
@@ -12,7 +12,7 @@ import { Action } from "./actions";
|
||||
// { id: 2, title: "CRM", Widget: CRM }
|
||||
// ];
|
||||
|
||||
export default class ActionManager {
|
||||
export class ActionManager {
|
||||
doAction(action: Action) {
|
||||
console.log(action);
|
||||
// load data (??)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import CRM from "../widgets/crm";
|
||||
import Discuss from "../widgets/discuss";
|
||||
import Widget from "../core/widget";
|
||||
import { CRM } from "../widgets/crm";
|
||||
import { Discuss } from "../widgets/discuss";
|
||||
import { Widget } from "../core/widget";
|
||||
import { Env } from "../env";
|
||||
|
||||
interface Type<T> extends Function {
|
||||
@@ -14,13 +14,11 @@ export interface Action {
|
||||
default?: boolean;
|
||||
}
|
||||
|
||||
const actions: Action[] = [
|
||||
export const actions: Action[] = [
|
||||
{ id: 1, title: "Discuss", Widget: Discuss, default: true },
|
||||
{ id: 2, title: "CRM", Widget: CRM }
|
||||
];
|
||||
|
||||
export default actions;
|
||||
|
||||
// class ActionManager {
|
||||
|
||||
// doAction(action: Action) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { Bus } from "../core/bus";
|
||||
|
||||
export type Query = { [key: string]: string };
|
||||
|
||||
export interface Route {
|
||||
@@ -11,10 +13,11 @@ function clearSlaches(s: string): string {
|
||||
return s.replace(/\/$/, "").replace(/^\//, "");
|
||||
}
|
||||
|
||||
export default class Router {
|
||||
export default class Router extends Bus {
|
||||
listeners: { owner: any; callback: (info: Route) => void }[] = [];
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
window.addEventListener("popstate", this.onUrlChange.bind(this));
|
||||
window.onhashchange = function() {
|
||||
console.log("aaaa");
|
||||
|
||||
Reference in New Issue
Block a user