mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-14 11:05:47 +05:00
fixed String compares
This commit is contained in:
parent
1ff0d5bbda
commit
61cc433064
@ -34,8 +34,8 @@ function loginComponent() {
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
let uname = urlParams.get('Username')||'';
|
||||
let passwd = '';
|
||||
let port = Number(urlParams.get('Port') || window.location.protocol=='file:' ? '9092': window.location.port );
|
||||
let server = urlParams.get('Server')|| window.location.protocol=='file:' ? '127.0.0.1' : window.location.hostname;
|
||||
let port = Number(urlParams.get('Port') || window.location.protocol==='file:' ? '9092': window.location.port );
|
||||
let server = urlParams.get('Server')|| window.location.protocol==='file:' ? '127.0.0.1' : window.location.hostname;
|
||||
return {
|
||||
view: () => {
|
||||
return m(
|
||||
@ -45,17 +45,17 @@ function loginComponent() {
|
||||
src: '../data/retroshare.svg',
|
||||
alt: 'retroshare_icon'
|
||||
}),
|
||||
m('input' + (uname == '' ? '[autofocus]':''), {
|
||||
m('input' + (uname === '' ? '[autofocus]':''), {
|
||||
type: 'text',
|
||||
value: uname,
|
||||
placeholder: 'Username',
|
||||
onchange: e => (uname = e.target.value)
|
||||
}),
|
||||
m('input'+ (uname != '' ? '[autofocus]':''), {
|
||||
m('input'+ (uname !== '' ? '[autofocus]':''), {
|
||||
type: 'password',
|
||||
placeholder: 'Password',
|
||||
onchange: e => (passwd = e.target.value),
|
||||
onkeyup: e => {if (e.code=='Enter') loginBtn.click();}
|
||||
onkeyup: e => {if (e.code==='Enter') loginBtn.click();}
|
||||
}),
|
||||
m('.extra', [
|
||||
'Port:',
|
||||
|
||||
@ -154,9 +154,9 @@ const Identity = () => {
|
||||
m('p', 'Owner node ID:'),
|
||||
m('p', details.mPgpId),
|
||||
m('p', 'Created on:'),
|
||||
m('p', typeof details.mPublishTS =='object' ? new Date(details.mPublishTS.xint64 * 1000).toLocaleString():'undefiend'),
|
||||
m('p', typeof details.mPublishTS ==='object' ? new Date(details.mPublishTS.xint64 * 1000).toLocaleString():'undefiend'),
|
||||
m('p', 'Last used:'),
|
||||
m('p', typeof details.mLastUsageTS =='object' ? new Date(details.mLastUsageTS.xint64 * 1000).toLocaleDateString():'undefiend'),
|
||||
m('p', typeof details.mLastUsageTS ==='object' ? new Date(details.mLastUsageTS.xint64 * 1000).toLocaleDateString():'undefiend'),
|
||||
]),
|
||||
m(
|
||||
'button',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user