Skip to content

Commit a00bd09

Browse files
committed
chore: improve UI
1 parent 969030e commit a00bd09

File tree

9 files changed

+59
-17
lines changed

9 files changed

+59
-17
lines changed

proposals/proposal-277.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
# Load the environment variables
4+
source "$(pwd)"/proposals/env.sh
5+
6+
# build and get batch_id, evidence:
7+
# dfx deploy ic_message_frontend --ic --by-proposal
8+
9+
export BLOB="$(didc encode --format blob '(record {batch_id=48:nat; evidence=blob "\3f\e4\76\71\58\03\88\29\22\6f\84\f5\24\64\99\55\26\e7\53\15\d6\98\51\6d\55\34\25\79\49\2b\19\3e"})')"
10+
11+
quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal "(
12+
record {
13+
title = \"Execute commit_proposed_batch() to release ic_message_frontend v2.9.6\";
14+
url = \"https://dMsg.net/\";
15+
summary = \"This proposal executes commit_proposed_batch() on 2fvu6-tqaaa-aaaap-akksa-cai to release ic_message_frontend v2.9.6.\n\n1. chore: improve dMsg app.\";
16+
action = opt variant {
17+
ExecuteGenericNervousSystemFunction = record {
18+
function_id = 1100 : nat64;
19+
payload = ${BLOB};
20+
}
21+
};
22+
}
23+
)" > proposal-message.json
24+
25+
# quill send proposal-message.json

src/ic_message_frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@
8484
"test": "vitest run"
8585
},
8686
"type": "module",
87-
"version": "2.9.5"
87+
"version": "2.9.6"
8888
}

src/ic_message_frontend/src/lib/components/core/MoreMenuPopup.svelte

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,24 @@
8989
myID = myState.id
9090
const accounts = await authStore.nameIdentityAPI.get_my_accounts()
9191
hasNameAccounts = !!accounts.length
92-
myAccounts = []
9392
if (!hasNameAccounts) {
93+
myAccounts = []
9494
return
9595
}
96+
9697
const srcId = authStore.srcIdentity?.getPrincipal()!
98+
const srcUser = await myState.tryLoadUser(srcId)
99+
if (!srcUser) {
100+
// should not happen
101+
return
102+
}
103+
104+
const users = await myState.batchLoadUsersInfo(
105+
accounts.map((account) => account.account)
106+
)
97107
98-
const users = await myState.batchLoadUsersInfo([
99-
srcId,
100-
...accounts.map((account) => account.account)
101-
])
102108
const userInfos = users.map(toDisplayUserInfo)
109+
const rt = []
103110
for (const ac of accounts) {
104111
const _id = ac.account.toText()
105112
const info = userInfos.find(
@@ -110,9 +117,9 @@
110117
info.username = ac.name
111118
}
112119
info.isNameAccount = true
113-
myAccounts.push(info)
120+
rt.push(info)
114121
} else {
115-
myAccounts.push({
122+
rt.push({
116123
_id,
117124
username: ac.name,
118125
name: ac.name,
@@ -121,7 +128,9 @@
121128
})
122129
}
123130
}
124-
myAccounts.push(userInfos[0] as DisplayUserInfoEx)
131+
132+
rt.push(toDisplayUserInfo(srcUser) as DisplayUserInfoEx)
133+
myAccounts = rt
125134
}
126135
127136
onMount(() => {
@@ -193,7 +202,7 @@
193202
fill="fill-white"
194203
width="w-8"
195204
/>
196-
<span class="truncate">
205+
<span class="max-w-44 truncate">
197206
{info.name + (info.username ? ' @' + info.username : '')}
198207
</span>
199208
{#if info.isNameAccount && myID !== info._id}

src/ic_message_frontend/src/lib/components/core/WalletDetailModal.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
{/snippet}
285285

286286
<ModalCard {parent}>
287-
<div class="!mt-0 text-center text-xl font-bold">Wallet</div>
287+
<div class="!mt-0 text-center text-xl font-bold">dMsg Wallet</div>
288288
<div class="!mt-6 flex flex-col gap-3 rounded-xl bg-surface-500/20 px-4 py-3">
289289
<TextClipboardPopup
290290
textLable="Address:"

src/ic_message_frontend/src/lib/components/messages/MyProfile.svelte

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,9 +680,9 @@
680680

681681
<div class="flex flex-col gap-4">
682682
<p>
683-
A <b>username permanent account</b> is a fixed account generated from
684-
the username that does not change. This account supports adding multiple
685-
delegate accounts, allowing multiple users to use it simultaneously,
683+
A <b>username permanent account</b> is a standalone fixed account generated
684+
from the username that does not change. This account supports adding
685+
multiple delegate accounts, allowing multiple users to use it simultaneously,
686686
making it ideal for team collaboration.
687687
</p>
688688
{#if delegators.length > 0}
@@ -817,7 +817,11 @@
817817
class="flex flex-row items-center space-x-2"
818818
href="https://dmsg.net/PANDA"
819819
>
820-
<Avatar src="/_assets/logo.svg" fill="fill-white" width="w-8" />
820+
<Avatar
821+
src="/_assets/logo_panda.png"
822+
fill="fill-white"
823+
width="w-8"
824+
/>
821825
<span class="ml-1 truncate">ICPanda</span>
822826
<span class="text-neutral-500">@PANDA</span>
823827
</a>

src/ic_message_frontend/src/lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const src = globalThis.location?.href || ''
22

3-
export const APP_VERSION = '2.9.5'
3+
export const APP_VERSION = '2.9.6'
44
export const IS_LOCAL = src.includes('localhost') || src.includes('127.0.0.1')
55
export const ENV = IS_LOCAL ? 'local' : 'ic'
66
export const APP_ORIGIN = IS_LOCAL

src/ic_message_frontend/src/routes/(app)/+page.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,11 @@
412412
href="{APP_ORIGIN}/PANDA"
413413
>
414414
<div class="flex flex-row items-center space-x-2 max-md:max-w-72">
415-
<Avatar src="/_assets/logo.svg" fill="fill-white" width="w-10" />
415+
<Avatar
416+
src="/_assets/logo_panda.png"
417+
fill="fill-white"
418+
width="w-10"
419+
/>
416420
<span class="ml-1 truncate text-neutral-200">ICPanda</span>
417421
<span class="">@PANDA</span>
418422
<p class="truncate max-md:hidden">| Ask me anything</p>
Loading
Loading

0 commit comments

Comments
 (0)