UX improvements and bug fixes
--Fixed: pipeline renaming issue
This commit is contained in:
parent
17cee7be81
commit
a0d87fe4cf
11
css/main.css
11
css/main.css
@ -166,9 +166,15 @@ button:not(:disabled),
|
||||
.button--danger .icon {
|
||||
fill: var(--danger-color);
|
||||
}
|
||||
.button--filled {
|
||||
background-color: rgba(var(--text-color), 0.06);
|
||||
}
|
||||
.button--small {
|
||||
padding: 0.4rem 0.6rem;
|
||||
}
|
||||
.button--rounded {
|
||||
border-radius: 4em !important;
|
||||
}
|
||||
.button--outlined {
|
||||
border: solid rgba(var(--text-color), 0.3) 0.1rem;
|
||||
background-color: rgba(var(--foreground-color), 1);
|
||||
@ -201,8 +207,9 @@ button:disabled {
|
||||
.icon-only {
|
||||
padding: 0.5rem;
|
||||
border-radius: 0.3rem;
|
||||
aspect-ratio: 1/1;
|
||||
background-color: transparent;
|
||||
aspect-ratio: 1/1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
a:-webkit-any-link:focus-visible {
|
||||
@ -1594,6 +1601,7 @@ ol li::before {
|
||||
overflow-x: hidden;
|
||||
grid-template-rows: -webkit-max-content 1fr;
|
||||
grid-template-rows: max-content 1fr;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
#contacts .header {
|
||||
display: flex;
|
||||
@ -1691,6 +1699,7 @@ sm-chip .badge {
|
||||
|
||||
#mails {
|
||||
position: relative;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
grid-template-rows: -webkit-max-content 1fr;
|
||||
grid-template-rows: max-content 1fr;
|
||||
}
|
||||
|
||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -174,11 +174,15 @@ button,
|
||||
fill: var(--danger-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--filled {
|
||||
background-color: rgba(var(--text-color), 0.06);
|
||||
}
|
||||
&--small {
|
||||
padding: 0.4rem 0.6rem;
|
||||
}
|
||||
|
||||
&--rounded {
|
||||
border-radius: 4em !important;
|
||||
}
|
||||
&--outlined {
|
||||
border: solid rgba(var(--text-color), 0.3) 0.1rem;
|
||||
background-color: rgba(var(--foreground-color), 1);
|
||||
@ -211,8 +215,9 @@ button:disabled {
|
||||
.icon-only {
|
||||
padding: 0.5rem;
|
||||
border-radius: 0.3rem;
|
||||
aspect-ratio: 1/1;
|
||||
background-color: transparent;
|
||||
aspect-ratio: 1/1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
a:any-link:focus-visible {
|
||||
@ -1639,7 +1644,7 @@ ol {
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
grid-template-rows: max-content 1fr;
|
||||
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -1738,6 +1743,7 @@ sm-chip {
|
||||
|
||||
#mails {
|
||||
position: relative;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
grid-template-rows: max-content 1fr;
|
||||
}
|
||||
|
||||
|
||||
77
index.html
77
index.html
@ -223,14 +223,14 @@
|
||||
</svg>
|
||||
<div class="shadow"></div>
|
||||
<h4 class="page__tag-line margin-block-1">Getting everything ready, Hang on.</h4>
|
||||
<button class="button" onclick="floDapps.clearCredentials()">Reset</button>
|
||||
<button class="button" onclick="clearCredentials()">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
<main id="main_page" class="page grid hidden">
|
||||
<section id="chat_page" class="inner-page">
|
||||
<div id="contacts" class="grid">
|
||||
<div class="header flex flex-direction-column">
|
||||
<div class="grid">
|
||||
<div class="flex gap-0-5">
|
||||
<button class="user-profile-button button--small" onclick="openPopup('profile_popup')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon margin-right-0-5" height="24px"
|
||||
viewBox="0 0 24 24" width="24px" fill="#000000">
|
||||
@ -239,9 +239,20 @@
|
||||
d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z">
|
||||
</path>
|
||||
</svg>
|
||||
<div class="user-profile-id overflow-ellipsis">
|
||||
bc1qd9trd7u8vslcje85m476zwux0j82yqg439n5f9
|
||||
</div>
|
||||
<div class="user-profile-id overflow-ellipsis"> </div>
|
||||
</button>
|
||||
<button class="icon-only button button--rounded button--danger" onclick="signOut()"
|
||||
title="Sign out">
|
||||
<svg class="icon" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24"
|
||||
height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
|
||||
<g>
|
||||
<path d="M0,0h24v24H0V0z" fill="none" />
|
||||
</g>
|
||||
<g>
|
||||
<path
|
||||
d="M17,8l-1.41,1.41L17.17,11H9v2h8.17l-1.58,1.58L17,16l4-4L17,8z M5,5h7V3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h7v-2H5V5z" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<sm-chips id="feature_mode">
|
||||
@ -299,7 +310,7 @@
|
||||
</svg>
|
||||
Create multisig address
|
||||
</button>
|
||||
<div class="flex align-center space-between hidden" style="margin: 0.5rem 0.5rem 0 1rem;">
|
||||
<div class="flex align-center space-between" style="margin: 0.5rem 0.5rem 0 1rem;">
|
||||
Multisig mode
|
||||
<sm-chips id="mutisig_mode_selector" onchange="handleMultisigModeChange(event)">
|
||||
<sm-chip value="btc" selected>BTC</sm-chip>
|
||||
@ -378,8 +389,8 @@
|
||||
</section>
|
||||
<section class="inner-page hidden" id="mail_page">
|
||||
<div id="mails" class="grid">
|
||||
<header class="grid header">
|
||||
<div class="grid gap-0-5 align-center">
|
||||
<header class="flex flex-direction-column gap-0-5 header">
|
||||
<div class="flex gap-0-5">
|
||||
<button class="user-profile-button button--small" onclick="openPopup('profile_popup')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon margin-right-0-5" height="24px"
|
||||
viewBox="0 0 24 24" width="24px" fill="#000000">
|
||||
@ -388,9 +399,20 @@
|
||||
d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z">
|
||||
</path>
|
||||
</svg>
|
||||
<div class="user-profile-id overflow-ellipsis">
|
||||
bc1qd9trd7u8vslcje85m476zwux0j82yqg439n5f9
|
||||
</div>
|
||||
<div class="user-profile-id overflow-ellipsis"> </div>
|
||||
</button>
|
||||
<button class="icon-only button button--rounded button--danger" onclick="signOut()"
|
||||
title="Sign out">
|
||||
<svg class="icon" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24"
|
||||
height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
|
||||
<g>
|
||||
<path d="M0,0h24v24H0V0z" fill="none" />
|
||||
</g>
|
||||
<g>
|
||||
<path
|
||||
d="M17,8l-1.41,1.41L17.17,11H9v2h8.17l-1.58,1.58L17,16l4-4L17,8z M5,5h7V3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h7v-2H5V5z" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex align-center space-between">
|
||||
@ -1084,7 +1106,6 @@
|
||||
|
||||
|
||||
<script src="scripts/components.js"></script>
|
||||
<script src="scripts/script.js"></script>
|
||||
<script type="module" src="https://cdn.jsdelivr.net/npm/emoji-picker-element@^1/index.js"></script>
|
||||
<script>
|
||||
/*jshint esversion: 8 */
|
||||
@ -2257,12 +2278,15 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
async function clearCredentials() {
|
||||
await floDapps.clearCredentials();
|
||||
location.reload();
|
||||
}
|
||||
function signOut() {
|
||||
getConfirmation('Sign out?', { message: 'You are about to sign out of the app, continue?', confirmText: 'Leave', cancelText: 'Stay' })
|
||||
getConfirmation('Sign out?', { message: 'You are about to sign out of the app, continue?', confirmText: 'Leave', cancelText: 'Stay', danger: true })
|
||||
.then(async (res) => {
|
||||
if (res) {
|
||||
await floDapps.clearCredentials();
|
||||
location.reload();
|
||||
clearCredentials()
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -4110,38 +4134,37 @@
|
||||
|
||||
async function changeContactName(name) {
|
||||
const floID = floGlobals.activeFloID
|
||||
const isGroup = messenger.groups.hasOwnProperty(floID)
|
||||
if (isGroup) {
|
||||
const type = getFloIdType(floID)
|
||||
if (type === 'group') {
|
||||
messenger.changeGroupName(floID, name).then(res => {
|
||||
updateChatCards({ name, floID, isGroup: true })
|
||||
updateChatCards({ name, floID })
|
||||
notify('Changed group name', 'success')
|
||||
})
|
||||
.catch(error => notify(error, "error"));
|
||||
} else {
|
||||
messenger.storeContact(floID, name).then(result => {
|
||||
updateChatCards({ name, floID, isGroup: false })
|
||||
updateChatCards({ name, floID })
|
||||
notify('Changed contact name', 'success')
|
||||
})
|
||||
.catch(error => notify(error, "error"));
|
||||
}
|
||||
}
|
||||
|
||||
function updateChatCards({ name, floID, isGroup = false }) {
|
||||
function updateChatCards({ name, floID }) {
|
||||
const type = getFloIdType(floID)
|
||||
if (activeChat.floID && activeChat.floID === clickedContact.floID) {
|
||||
updateChatHeaderName(name)
|
||||
}
|
||||
if (!isGroup) {
|
||||
if (type === 'plain') {
|
||||
getRef('contact_initial').textContent = name.charAt(0)
|
||||
if (activeChat.floID && activeChat.floID === clickedContact.floID) {
|
||||
getRef('receiver_initial').textContent = name.charAt(0)
|
||||
}
|
||||
document.querySelectorAll(`.contact[data-flo-address="${floID}"]`).forEach(contact => {
|
||||
contact.querySelector('.initial').textContent = name.charAt(0)
|
||||
contact.querySelector('.name').textContent = name
|
||||
})
|
||||
}
|
||||
document.querySelectorAll(`.contact[data-flo-address="${floID}"]`).forEach(contact => {
|
||||
if (!isGroup) {
|
||||
contact.children[0].textContent = name.charAt(0)
|
||||
contact.children[1].textContent = name
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getChatCard(floID) {
|
||||
|
||||
@ -1248,7 +1248,6 @@
|
||||
if (_loaded.pipeline[pipeID].disabled)
|
||||
return reject("Pipeline is already closed");
|
||||
getChat(pipeID).then(async result => {
|
||||
console.log(result)
|
||||
let pipeline = _loaded.pipeline[pipeID],
|
||||
tx_hex_latest = Object.keys(result).sort().map(i => result[i].tx_hex).filter(x => x).pop();
|
||||
let privateKey = await floDapps.user.private;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user