Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
feat(#228): replace tabs with menu
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Oct 21, 2019
1 parent 6d79344 commit 328f0ae
Show file tree
Hide file tree
Showing 14 changed files with 158 additions and 96 deletions.
46 changes: 29 additions & 17 deletions remote/src/app/app-root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,37 @@ export class AppRoot {
return (
<ion-app>
<ion-router useHash={false}>
<ion-route-redirect from="/" to="/remote"/>

<ion-route component="app-tabs">
<ion-route url="/remote" component="tab-home">
<ion-route component="app-remote"></ion-route>
<ion-route url="/:room" component="app-remote"></ion-route>
</ion-route>

<ion-route url="/timer" component="tab-timer">
<ion-route component="app-timer"></ion-route>
</ion-route>

<ion-route url="/about" component="tab-about">
<ion-route component="app-about"></ion-route>
</ion-route>
</ion-route>
<ion-route url="/" component="app-remote"></ion-route>
<ion-route url="/remote" component="app-remote"></ion-route>
<ion-route url="/remote/:room" component="app-remote"></ion-route>

<ion-route url="/timer" component="app-timer"></ion-route>

<ion-route url="/about" component="app-about"></ion-route>
</ion-router>

<ion-router-outlet animated={true}></ion-router-outlet>
<ion-menu side="start" type="push" swipeGesture={false} content-id="menu-content">
<ion-header>
<ion-toolbar>
<ion-title slot="start" class="ion-no-padding ion-margin-start ion-margin-end">
<a href="/">
<app-logo></app-logo>
<span>DeckDeckGo</span>
</a>
</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>
<ion-menu-toggle autoHide={false}>
<ion-item detail={false} href="/" routerDirection="forward"><ion-label>Remote</ion-label></ion-item>
<ion-item detail={false} href="/timer" routerDirection="forward"><ion-label>Timer</ion-label></ion-item>
<ion-item detail={false} href="/about" routerDirection="forward"><ion-label>About</ion-label></ion-item>
</ion-menu-toggle>
</ion-content>
</ion-menu>

<ion-nav id="menu-content"/>

<ion-modal-controller></ion-modal-controller>

Expand Down
15 changes: 15 additions & 0 deletions remote/src/app/components/app-logo/app-logo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
div {
color: transparent;

vertical-align: var(--deckgo-logo-vertical-align);
margin-right: var(--deckgo-logo-margin-end);

background-color: transparent;
background-image: var(--deckgo-logo-url, url('/assets/img/deckdeckgo-logo.svg'));
background-repeat: no-repeat;

width: var(--deckgo-logo-size);
height: var(--deckgo-logo-size);

display: inline-block;
}
13 changes: 13 additions & 0 deletions remote/src/app/components/app-logo/app-logo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {Component, h} from '@stencil/core';

@Component({
tag: 'app-logo',
styleUrl: 'app-logo.scss',
shadow: true
})
export class AppLogo {

render() {
return <div></div>;
}
}
8 changes: 8 additions & 0 deletions remote/src/app/pages/app-about/app-about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ export class AppAbout {
return [
<ion-header>
<ion-toolbar color="primary">
<ion-buttons slot="start">
<ion-menu-toggle>
<ion-button>
<ion-icon slot="icon-only" name="menu"></ion-icon>
</ion-button>
</ion-menu-toggle>
</ion-buttons>

<ion-title class="ion-text-uppercase">DeckDeckGo</ion-title>
</ion-toolbar>
</ion-header>,
Expand Down
9 changes: 9 additions & 0 deletions remote/src/app/pages/app-remote/app-remote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,15 @@ export class AppRemote {
<ion-header>
<ion-toolbar color="primary">
<ion-title class="ion-text-uppercase">DeckDeckGo</ion-title>

<ion-buttons slot="start">
<ion-menu-toggle>
<ion-button>
<ion-icon slot="icon-only" name="menu"></ion-icon>
</ion-button>
</ion-menu-toggle>
</ion-buttons>

<ion-buttons slot="end">
<ion-button onClick={() => this.openSettingsModal()}>
<ion-icon name="settings"></ion-icon>
Expand Down
39 changes: 0 additions & 39 deletions remote/src/app/pages/app-tabs/app-tabs.tsx

This file was deleted.

8 changes: 8 additions & 0 deletions remote/src/app/pages/app-timer/app-timer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ export class AppTimer {
return [
<ion-header>
<ion-toolbar color="primary">
<ion-buttons slot="start">
<ion-menu-toggle>
<ion-button>
<ion-icon slot="icon-only" name="menu"></ion-icon>
</ion-button>
</ion-menu-toggle>
</ion-buttons>

<ion-title class="ion-text-uppercase">DeckDeckGo</ion-title>
</ion-toolbar>
</ion-header>,
Expand Down
1 change: 1 addition & 0 deletions remote/src/assets/img/deckdeckgo-logo-invert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions remote/src/assets/img/deckdeckgo-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 328f0ae

Please sign in to comment.