-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3789a8f
commit f11302f
Showing
6 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,4 +71,4 @@ | |
"publishConfig": { | ||
"access": "public" | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
packages/admin/src/components/pages/Admin/Home/PageHome.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { customElement, html, LitElement, property } from 'lit-element'; | ||
import { connect } from 'pwa-helpers/connect-mixin'; | ||
import { titleSet } from '../../../../lib/decorators/titleSet'; | ||
import { Me, State, store } from '../../../../store/store'; | ||
import CSS from './page-home-css'; | ||
|
||
@customElement('page-home') | ||
export class PageHome extends titleSet('Home')(connect(store)(LitElement)) { | ||
|
||
public static styles = [CSS]; | ||
|
||
@property() | ||
public me?: Me; | ||
|
||
public render() { | ||
return html`${this.me ? html`<h2>Welcome back, ${this.me.fname}</h2>` : null}`; | ||
} | ||
|
||
public stateChanged(s: State) { | ||
this.me = s.Me; | ||
} | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'page-home': PageHome; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/admin/src/components/pages/Admin/Home/page-home-css.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import {css} from 'lit-element'; | ||
// tslint:disable-next-line no-default-export export-name | ||
export default css`:host{position:absolute;top:0;left:0;right:0;bottom:0;overflow-y:auto;padding:var(--size-small);padding-top:0}:host h2{font-size:var(--font-size-super);font-weight:100;margin-top:0} | ||
`; |
18 changes: 18 additions & 0 deletions
18
packages/admin/src/components/pages/Admin/Home/page-home.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@import 'zen-css/import'; | ||
|
||
:host { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
overflow-y: auto; | ||
padding: var(--size-small); | ||
padding-top: 0; | ||
|
||
h2 { | ||
font-size: var(--font-size-super); | ||
font-weight: 100; | ||
margin-top: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ | |
"publishConfig": { | ||
"access": "public" | ||
} | ||
} | ||
} |