From 4d6e552f3b163f4d7d45358901fe8ca1ca207ce8 Mon Sep 17 00:00:00 2001 From: maso Date: Thu, 12 Jan 2023 15:43:54 +0330 Subject: [PATCH] sidebar moved to core folder --- src/core/sidebar/index.ts | 4 ++++ src/{components => core/sidebar}/sidebar.scss | 0 src/{components => core/sidebar}/sidebar.ts | 5 ++--- src/{components => core/sidebar}/sidebar.xml | 0 src/webclient/webclient.ts | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 src/core/sidebar/index.ts rename src/{components => core/sidebar}/sidebar.scss (100%) rename src/{components => core/sidebar}/sidebar.ts (93%) rename src/{components => core/sidebar}/sidebar.xml (100%) diff --git a/src/core/sidebar/index.ts b/src/core/sidebar/index.ts new file mode 100644 index 0000000..ec2ce75 --- /dev/null +++ b/src/core/sidebar/index.ts @@ -0,0 +1,4 @@ +import { Sidebar } from "./sidebar"; +export { + Sidebar +}; \ No newline at end of file diff --git a/src/components/sidebar.scss b/src/core/sidebar/sidebar.scss similarity index 100% rename from src/components/sidebar.scss rename to src/core/sidebar/sidebar.scss diff --git a/src/components/sidebar.ts b/src/core/sidebar/sidebar.ts similarity index 93% rename from src/components/sidebar.ts rename to src/core/sidebar/sidebar.ts index 2834ed1..4a43de1 100644 --- a/src/components/sidebar.ts +++ b/src/core/sidebar/sidebar.ts @@ -3,11 +3,10 @@ import { useState, } from "@odoo/owl"; import { v4 as uuidv4 } from 'uuid'; -import { registry } from "../core/registry"; +import { registry } from "../registry"; import "./sidebar.xml"; import "./sidebar.scss"; -import { OPage } from "./page"; export class SidebarBrand extends Component { static template = "components.sidebar.brand"; @@ -55,7 +54,7 @@ export class Sidebar extends Component { SidebarCollapse, }; state:{ - pages: OPage[], + pages: Component[], } = useState({ pages: [], }); diff --git a/src/components/sidebar.xml b/src/core/sidebar/sidebar.xml similarity index 100% rename from src/components/sidebar.xml rename to src/core/sidebar/sidebar.xml diff --git a/src/webclient/webclient.ts b/src/webclient/webclient.ts index 9f78549..88f161e 100644 --- a/src/webclient/webclient.ts +++ b/src/webclient/webclient.ts @@ -1,6 +1,6 @@ import { Component, useState, xml } from "@odoo/owl"; import { Footer } from "@web/components/footer"; -import { Sidebar } from "@web/components/sidebar"; +import { Sidebar } from "../core/sidebar"; import { Navbar } from "../core/navbar"; import { Router } from "@web/core/router";