-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ember/top-nav): single file component
- Loading branch information
Showing
3 changed files
with
63 additions
and
51 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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { concat } from '@ember/helper'; | ||
import { LinkTo } from '@ember/routing'; | ||
import UkTooltip from 'ember-uikit/modifiers/uk-tooltip'; | ||
|
||
import appVersion from 'outdated/utils/app-version'; | ||
|
||
<template> | ||
<div | ||
class='navbar' | ||
uk-sticky='sel-target: .navbar-container; cls-active: uk-navbar-sticky' | ||
> | ||
<nav class='navbar-container' uk-navbar> | ||
<div class='uk-navbar-left'> | ||
<div class='uk-navbar-item uk-logo uk-visible@m'> | ||
<LinkTo | ||
{{UkTooltip (concat 'v' (appVersion))}} | ||
@route='projects' | ||
class='uk-link-reset' | ||
> | ||
Outdated | ||
</LinkTo> | ||
</div> | ||
|
||
<ul class='button-nav uk-hidden@m'> | ||
<li> | ||
<LinkTo | ||
@route='projects.index' | ||
@current-when='projects.index projects.detailed not-found' | ||
class='uk-hidden@m' | ||
{{UkTooltip (concat 'v' (appVersion)) offset=false}} | ||
>Outdated</LinkTo> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class='uk-navbar-right'> | ||
<ul class='button-nav'> | ||
<li class='uk-visible@m'> | ||
<LinkTo | ||
@route='projects.index' | ||
@current-when='projects.index projects.detailed not-found' | ||
>Overview</LinkTo> | ||
</li> | ||
<li> | ||
<LinkTo @route='projects.add'>Add</LinkTo> | ||
</li> | ||
<li> | ||
<LinkTo @route='dependencies'>Dependencies</LinkTo> | ||
</li> | ||
<li> | ||
<LinkTo @route='versions'>Versions</LinkTo> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
</div> | ||
</template> |
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
import { versionRegExp } from 'ember-cli-app-version/utils/regexp'; | ||
|
||
import config from 'outdated/config/environment'; | ||
|
||
const appVersion = () => config.APP.version.match(versionRegExp); | ||
|
||
export default appVersion; |