Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
ref: auth message, design
Browse files Browse the repository at this point in the history
  • Loading branch information
zachferland committed May 26, 2020
1 parent 6cb9064 commit 5b87684
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion iframe/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ button {
}

.promptText {
padding: 15px 30px 25px 30px;
padding: 15px 30px 30px 30px;

.primaryText {
color: #63686d;
Expand Down
4 changes: 2 additions & 2 deletions iframe/html/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const template = (data,isMobile) => `
<div class='${style.promptText}'>
<div class='${style.subText}'>
<p>
This site wants to access your profile${data.request.spaces.length === 0 ? '. ' : ' and ' + data.request.spaces.length + ' data sources.'}
This site wants to access your profile${data.request.spaces.length === 0 ? '. ' : ' and ' + data.request.spaces.length + ' data source'}${data.request.spaces.length > 1 ? 's. ' : '.'}
</p>
</div>
</div>
<div class='${style.actions}' id='action'>
<div class='${style.actions}' id=''>
<button id='accept' class='${style.primaryButton}' ${data.error ? 'style="display:none;"' : ''} >
Continue
</button>
Expand Down
6 changes: 2 additions & 4 deletions src/threeIdConnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const IFRAME_TOP = `top: 10px; right: 10px`
const IFRAME_BOTTOM = `bottom: 0px; left: 0px;`

const hide = (iframe) => () => iframe.style = HIDE_IFRAME_STYLE
const display = (iframe) => (mobile = false, height = '240px', width = '440px') => iframe.style = `${DISPLAY_IFRAME_STYLE} width: ${width}; height: ${height}; ${mobile ? IFRAME_BOTTOM: IFRAME_TOP}`
const display = (iframe) => (mobile = false, height = '245px', width = '440px') => iframe.style = `${DISPLAY_IFRAME_STYLE} width: ${width}; height: ${height}; ${mobile ? IFRAME_BOTTOM: IFRAME_TOP}`
// TODO maybe have some more ui options here, because these can change after iframe loads

/**
Expand Down Expand Up @@ -89,9 +89,7 @@ class ThreeIdConnect {
return this._threeId
}

async authenticate(address) {
// TODO message and move
const message = 'Add this account as a 3ID authentication method'
async authenticate(message, address) {
return this.authProvider.authenticate(message, address)
}

Expand Down
3 changes: 2 additions & 1 deletion src/threeIdConnectService.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ class ThreeIdConnectService {
let threeId
if (type === '3id_auth') {
// TODO IMPLEMENT full migration
return this.authenticate(spaces, address)
const message = 'Add this account as a 3ID authentication method'
return this.authenticate(message, address)
} else if (type === '3id_migration') {
let new3id

Expand Down

0 comments on commit 5b87684

Please sign in to comment.