mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-13 22:54:15 +01:00
Merge pull request #1076 from mozilla/i1059
don't make title a link on android
This commit is contained in:
commit
1bb1e8123f
@ -1,6 +1,7 @@
|
|||||||
const html = require('choo/html');
|
const html = require('choo/html');
|
||||||
const Component = require('choo/component');
|
const Component = require('choo/component');
|
||||||
const Account = require('./account');
|
const Account = require('./account');
|
||||||
|
const { browserName } = require('../utils');
|
||||||
|
|
||||||
class Header extends Component {
|
class Header extends Component {
|
||||||
constructor(name, state, emit) {
|
constructor(name, state, emit) {
|
||||||
@ -16,16 +17,27 @@ class Header extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
createElement() {
|
createElement() {
|
||||||
return html`
|
const title =
|
||||||
<header
|
browserName() === 'android-app'
|
||||||
class="relative flex-none flex flex-row items-center justify-between bg-blue md:bg-white w-full px-6 h-16 md:shadow z-20"
|
? html`
|
||||||
>
|
<a class="header-logo">
|
||||||
|
<h1 class="text-white md:text-black font-normal">
|
||||||
|
Firefox <b>Send</b>
|
||||||
|
</h1>
|
||||||
|
</a>
|
||||||
|
`
|
||||||
|
: html`
|
||||||
<a class="header-logo" href="/">
|
<a class="header-logo" href="/">
|
||||||
<h1 class="text-white md:text-black font-normal">
|
<h1 class="text-white md:text-black font-normal">
|
||||||
Firefox <b>Send</b>
|
Firefox <b>Send</b>
|
||||||
</h1>
|
</h1>
|
||||||
</a>
|
</a>
|
||||||
${this.account.render()}
|
`;
|
||||||
|
return html`
|
||||||
|
<header
|
||||||
|
class="relative flex-none flex flex-row items-center justify-between bg-blue md:bg-white w-full px-6 h-16 md:shadow z-20"
|
||||||
|
>
|
||||||
|
${title} ${this.account.render()}
|
||||||
</header>
|
</header>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
@ -146,6 +146,9 @@ function browserName() {
|
|||||||
if (/safari/i.test(navigator.userAgent)) {
|
if (/safari/i.test(navigator.userAgent)) {
|
||||||
return 'safari';
|
return 'safari';
|
||||||
}
|
}
|
||||||
|
if (/send android/i.test(navigator.userAgent)) {
|
||||||
|
return 'android-app';
|
||||||
|
}
|
||||||
return 'other';
|
return 'other';
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return 'unknown';
|
return 'unknown';
|
||||||
|
Loading…
Reference in New Issue
Block a user