fix minor issue in dashboard style, and improve scrollbar style
This commit is contained in:
parent
65eda5648c
commit
269dcde557
3 changed files with 72 additions and 38 deletions
|
@ -186,8 +186,8 @@ export class StyledButton extends LitElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
private _handleClick(e: MouseEvent) {
|
private _handleClick(e: MouseEvent) {
|
||||||
if (this.disabled || this.loading) {
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if (this.disabled || this.loading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ import { customElement, state } from 'lit/decorators.js';
|
||||||
import { map } from 'lit/directives/map.js';
|
import { map } from 'lit/directives/map.js';
|
||||||
import { html, literal } from 'lit/static-html.js';
|
import { html, literal } from 'lit/static-html.js';
|
||||||
|
|
||||||
import '@widgets/BitcoinBlockWidget';
|
|
||||||
import '@components/AppGrid';
|
import '@components/AppGrid';
|
||||||
import '@components/NostrAvatar';
|
|
||||||
import '@components/General/Card';
|
import '@components/General/Card';
|
||||||
|
import '@components/NostrAvatar';
|
||||||
|
import '@components/Widgets/BitcoinBlockWidget';
|
||||||
|
|
||||||
@customElement('arx-eve-home')
|
@customElement('arx-eve-home')
|
||||||
export class Home extends LitElement {
|
export class Home extends LitElement {
|
||||||
|
@ -95,60 +95,71 @@ export class Home extends LitElement {
|
||||||
|
|
||||||
static override styles = [
|
static override styles = [
|
||||||
css`
|
css`
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: var(--color-base-200);
|
||||||
|
border-radius: var(--radius-field);
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: var(--color-base-300);
|
||||||
|
border-radius: var(--radius-field);
|
||||||
|
border: 2px solid var(--color-base-200);
|
||||||
|
transition: var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: var(--color-neutral);
|
||||||
|
}
|
||||||
|
|
||||||
.content-wrapper {
|
.content-wrapper {
|
||||||
|
margin: auto;
|
||||||
|
height: 90vh;
|
||||||
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.home {
|
|
||||||
min-height: calc(100vh - var(--font-2xl));
|
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-container {
|
.home-container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.widgets-container {
|
.widgets-container {
|
||||||
|
height: 75vh;
|
||||||
|
overflow: auto;
|
||||||
width: 350px;
|
width: 350px;
|
||||||
display: flex;
|
margin: 0 auto;
|
||||||
flex-direction: column;
|
|
||||||
gap: 20px;
|
|
||||||
|
|
||||||
& > * {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
.content-wrapper {
|
.content-wrapper {
|
||||||
|
gap: 0;
|
||||||
|
height: auto;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.home-container {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.widgets-container {
|
.widgets-container {
|
||||||
|
overflow: unset;
|
||||||
|
height: auto;
|
||||||
width: calc(100vw - 40px);
|
width: calc(100vw - 40px);
|
||||||
flex-direction: row;
|
|
||||||
overflow-x: auto;
|
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.widgets-container {
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.welcome-section {
|
.welcome-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -173,7 +184,6 @@ export class Home extends LitElement {
|
||||||
|
|
||||||
override render() {
|
override render() {
|
||||||
return html`
|
return html`
|
||||||
<div class="home">
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<arx-card class="home-container">
|
<arx-card class="home-container">
|
||||||
<arx-card class="welcome-section">
|
<arx-card class="welcome-section">
|
||||||
|
@ -191,7 +201,6 @@ export class Home extends LitElement {
|
||||||
${map(this.widgets, (widget) => html`<arx-card><${widget.content}></${widget.content}></arx-card>`)}
|
${map(this.widgets, (widget) => html`<arx-card><${widget.content}></${widget.content}></arx-card>`)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
import '@components/InitialSetup';
|
||||||
import '@routes/404Page';
|
import '@routes/404Page';
|
||||||
|
import '@routes/Arbor/Home';
|
||||||
|
import '@routes/Arbor/NewPost';
|
||||||
|
import '@routes/Arbor/NewTopic';
|
||||||
|
import '@routes/Arbor/TopicView';
|
||||||
import '@routes/Home';
|
import '@routes/Home';
|
||||||
import '@routes/Profile';
|
import '@routes/Profile';
|
||||||
import '@routes/Settings';
|
import '@routes/Settings';
|
||||||
import '@routes/Arbor/Home';
|
|
||||||
import '@routes/Arbor/NewTopic';
|
|
||||||
import '@routes/Arbor/TopicView';
|
|
||||||
import '@routes/Arbor/NewPost';
|
|
||||||
import '@components/InitialSetup';
|
|
||||||
|
|
||||||
import { spread } from '@open-wc/lit-helpers';
|
import { spread } from '@open-wc/lit-helpers';
|
||||||
import { LitElement, css } from 'lit';
|
import { LitElement, css } from 'lit';
|
||||||
|
@ -92,6 +92,27 @@ export default class EveRouter extends LitElement {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: var(--color-base-200);
|
||||||
|
border-radius: var(--radius-field);
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: var(--color-base-300);
|
||||||
|
border-radius: var(--radius-field);
|
||||||
|
border: 2px solid var(--color-base-200);
|
||||||
|
transition: var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: var(--color-neutral);
|
||||||
|
}
|
||||||
|
|
||||||
.window {
|
.window {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
@ -103,6 +124,10 @@ export default class EveRouter extends LitElement {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hide-overflow {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -268,7 +293,7 @@ export default class EveRouter extends LitElement {
|
||||||
@go-forward=${this.goForward}
|
@go-forward=${this.goForward}
|
||||||
title="Eve"
|
title="Eve"
|
||||||
></arx-header>
|
></arx-header>
|
||||||
<div class="window">
|
<div class="window ${this.currentRoute.pattern === 'home' ? 'hide-overflow' : ''}">
|
||||||
<div class="window-content">
|
<div class="window-content">
|
||||||
${keyed(
|
${keyed(
|
||||||
this.currentRoute.params,
|
this.currentRoute.params,
|
||||||
|
|
Loading…
Add table
Reference in a new issue