Exemple #1
0
        public override async Task InitAsync()
        {
            await GridLanguage.LoadAsync();

            await GridNavigate.LoadAsync(); // Navigate depends on language selection for translate
        }
Exemple #2
0
        public PageMain(ComponentJson owner)
            : base(owner)
        {
            BulmaNavbar = new BulmaNavbar(this)
            {
                BrandTextHtml = "<b>WorkplaceX</b>.org"
            };

            // Hero
            new Custom01(this);

            // Columns
            var columns = new DivContainer(this)
            {
                CssClass = "columns"
            };
            var column0 = new Div(columns)
            {
                CssClass = "column is-one-fifth has-background-white-ter"
            };
            var column1 = new Div(columns)
            {
                CssClass = "column"
            };
            var column2 = new Div(columns)
            {
                CssClass = "column is-one-fifth"
            };

            // Container
            // var container = new DivContainer(column1) { CssClass = "container" };
            Content = new Div(column1)
            {
                CssClass = "content content-bulma-framework"
            };
            // Content = column1;

            GridNavigate = new GridNavigate(this)
            {
                IsHide = true
            };
            GridLanguage = new GridLanguage(this)
            {
                IsHide = true
            };

            // Footer
            Footer = new Custom02(this);

            BulmaNavbar.GridAdd(GridLanguage, isNavbarEnd: true, isSelectMode: true);
            BulmaNavbar.GridAdd(GridNavigate);

            new BulmaNavbarMenu(column0)
            {
                Grid = GridNavigate
            };

            // Preserve login user
            if (this.ComponentOwner <AppMain>().IsNavigateReload <AppMain>(out var appJsonPrevious))
            {
                LoginUserRoleAppList = appJsonPrevious.PageMain.LoginUserRoleAppList;
            }
        }