Skip to content

Commit

Permalink
chore: improve UI
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Dec 15, 2024
1 parent 969030e commit a00bd09
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 17 deletions.
25 changes: 25 additions & 0 deletions proposals/proposal-277.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

# Load the environment variables
source "$(pwd)"/proposals/env.sh

# build and get batch_id, evidence:
# dfx deploy ic_message_frontend --ic --by-proposal

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"})')"

quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal "(
record {
title = \"Execute commit_proposed_batch() to release ic_message_frontend v2.9.6\";
url = \"https://dMsg.net/\";
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.\";
action = opt variant {
ExecuteGenericNervousSystemFunction = record {
function_id = 1100 : nat64;
payload = ${BLOB};
}
};
}
)" > proposal-message.json

# quill send proposal-message.json
2 changes: 1 addition & 1 deletion src/ic_message_frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@
"test": "vitest run"
},
"type": "module",
"version": "2.9.5"
"version": "2.9.6"
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,24 @@
myID = myState.id
const accounts = await authStore.nameIdentityAPI.get_my_accounts()
hasNameAccounts = !!accounts.length
myAccounts = []
if (!hasNameAccounts) {
myAccounts = []
return
}
const srcId = authStore.srcIdentity?.getPrincipal()!
const srcUser = await myState.tryLoadUser(srcId)
if (!srcUser) {
// should not happen
return
}
const users = await myState.batchLoadUsersInfo(
accounts.map((account) => account.account)
)
const users = await myState.batchLoadUsersInfo([
srcId,
...accounts.map((account) => account.account)
])
const userInfos = users.map(toDisplayUserInfo)
const rt = []
for (const ac of accounts) {
const _id = ac.account.toText()
const info = userInfos.find(
Expand All @@ -110,9 +117,9 @@
info.username = ac.name
}
info.isNameAccount = true
myAccounts.push(info)
rt.push(info)
} else {
myAccounts.push({
rt.push({
_id,
username: ac.name,
name: ac.name,
Expand All @@ -121,7 +128,9 @@
})
}
}
myAccounts.push(userInfos[0] as DisplayUserInfoEx)
rt.push(toDisplayUserInfo(srcUser) as DisplayUserInfoEx)
myAccounts = rt
}
onMount(() => {
Expand Down Expand Up @@ -193,7 +202,7 @@
fill="fill-white"
width="w-8"
/>
<span class="truncate">
<span class="max-w-44 truncate">
{info.name + (info.username ? ' @' + info.username : '')}
</span>
{#if info.isNameAccount && myID !== info._id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
{/snippet}

<ModalCard {parent}>
<div class="!mt-0 text-center text-xl font-bold">Wallet</div>
<div class="!mt-0 text-center text-xl font-bold">dMsg Wallet</div>
<div class="!mt-6 flex flex-col gap-3 rounded-xl bg-surface-500/20 px-4 py-3">
<TextClipboardPopup
textLable="Address:"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,9 @@

<div class="flex flex-col gap-4">
<p>
A <b>username permanent account</b> is a fixed account generated from
the username that does not change. This account supports adding multiple
delegate accounts, allowing multiple users to use it simultaneously,
A <b>username permanent account</b> is a standalone fixed account generated
from the username that does not change. This account supports adding
multiple delegate accounts, allowing multiple users to use it simultaneously,
making it ideal for team collaboration.
</p>
{#if delegators.length > 0}
Expand Down Expand Up @@ -817,7 +817,11 @@
class="flex flex-row items-center space-x-2"
href="https://dmsg.net/PANDA"
>
<Avatar src="/_assets/logo.svg" fill="fill-white" width="w-8" />
<Avatar
src="/_assets/logo_panda.png"
fill="fill-white"
width="w-8"
/>
<span class="ml-1 truncate">ICPanda</span>
<span class="text-neutral-500">@PANDA</span>
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/ic_message_frontend/src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const src = globalThis.location?.href || ''

export const APP_VERSION = '2.9.5'
export const APP_VERSION = '2.9.6'
export const IS_LOCAL = src.includes('localhost') || src.includes('127.0.0.1')
export const ENV = IS_LOCAL ? 'local' : 'ic'
export const APP_ORIGIN = IS_LOCAL
Expand Down
6 changes: 5 additions & 1 deletion src/ic_message_frontend/src/routes/(app)/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,11 @@
href="{APP_ORIGIN}/PANDA"
>
<div class="flex flex-row items-center space-x-2 max-md:max-w-72">
<Avatar src="/_assets/logo.svg" fill="fill-white" width="w-10" />
<Avatar
src="/_assets/logo_panda.png"
fill="fill-white"
width="w-10"
/>
<span class="ml-1 truncate text-neutral-200">ICPanda</span>
<span class="">@PANDA</span>
<p class="truncate max-md:hidden">| Ask me anything</p>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a00bd09

Please sign in to comment.