Skip to content

Commit d87c20c

Browse files
committed
chore: upgrade ic_message_frontend
1 parent e84b7d8 commit d87c20c

File tree

9 files changed

+46
-13
lines changed

9 files changed

+46
-13
lines changed

canister_ids.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@
5555
"ic": "5szpn-tiaaa-aaaaj-qncoq-cai",
5656
"local": "5szpn-tiaaa-aaaaj-qncoq-cai"
5757
},
58-
"ic_panda_ai": {
59-
"ic": "bwwuq-byaaa-aaaan-qmk4q-cai"
60-
},
58+
"ic_panda_ai": {},
6159
"ic_panda_frontend": {
6260
"ic": "c63a7-6yaaa-aaaap-ab3gq-cai",
6361
"local": "c63a7-6yaaa-aaaap-ab3gq-cai"

proposals/proposal-281.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=49:nat; evidence=blob "\3c\ff\dd\7c\42\8c\af\8e\6a\c7\64\d9\e2\da\62\b6\6b\f6\7f\b2\dd\60\1e\0e\17\f6\f6\ec\11\e0\4b\de"})')"
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.7\";
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.7.\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.6"
87+
"version": "2.9.7"
8888
}

src/ic_message_frontend/src/declarations/ic_panda_frontend/ic_panda_frontend.did

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ type AssetCanisterArgs = variant {
144144
Upgrade: UpgradeArgs;
145145
};
146146

147-
type InitArgs = record {};
147+
type InitArgs = record {
148+
set_permissions: opt SetPermissions;
149+
};
148150

149151
type UpgradeArgs = record {
150152
set_permissions: opt SetPermissions;

src/ic_message_frontend/src/declarations/ic_panda_frontend/ic_panda_frontend.did.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export interface HttpResponse {
6565
'streaming_strategy' : [] | [StreamingStrategy],
6666
'status_code' : number,
6767
}
68-
export type InitArgs = {};
68+
export interface InitArgs { 'set_permissions' : [] | [SetPermissions] }
6969
export type Key = string;
7070
export interface ListPermitted { 'permission' : Permission }
7171
export type Permission = { 'Prepare' : null } |

src/ic_message_frontend/src/declarations/ic_panda_frontend/ic_panda_frontend.did.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const idlFactory = ({ IDL }) => {
77
const UpgradeArgs = IDL.Record({
88
'set_permissions' : IDL.Opt(SetPermissions),
99
});
10-
const InitArgs = IDL.Record({});
10+
const InitArgs = IDL.Record({ 'set_permissions' : IDL.Opt(SetPermissions) });
1111
const AssetCanisterArgs = IDL.Variant({
1212
'Upgrade' : UpgradeArgs,
1313
'Init' : InitArgs,
@@ -287,7 +287,7 @@ export const init = ({ IDL }) => {
287287
const UpgradeArgs = IDL.Record({
288288
'set_permissions' : IDL.Opt(SetPermissions),
289289
});
290-
const InitArgs = IDL.Record({});
290+
const InitArgs = IDL.Record({ 'set_permissions' : IDL.Opt(SetPermissions) });
291291
const AssetCanisterArgs = IDL.Variant({
292292
'Upgrade' : UpgradeArgs,
293293
'Init' : InitArgs,

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import { ErrorLogs, toastRun } from '$lib/stores/toast'
2929
import { errMessage, unwrapOption } from '$lib/types/result'
3030
import { shortId } from '$lib/utils/auth'
31-
import { sleep } from '$lib/utils/helper'
31+
import { getCurrentTimeString, sleep } from '$lib/utils/helper'
3232
import { md } from '$lib/utils/markdown'
3333
import { isNotificationSupported } from '$lib/utils/window'
3434
import LinkItem from '$src/lib/components/ui/LinkItem.svelte'
@@ -57,7 +57,7 @@
5757
5858
type DisplayUserInfoEx = DisplayUserInfo & {
5959
role: number
60-
sign_in_at: number
60+
sign_in_at: bigint
6161
}
6262
6363
// local: gnhwq-7p3rq-chahe-22f7s-btty6-ntken-g6dff-xwbyd-4qfse-37euh-5ae
@@ -123,7 +123,7 @@
123123
) as DisplayUserInfoEx
124124
if (info) {
125125
info.role = user.role
126-
info.sign_in_at = Number(user.sign_in_at)
126+
info.sign_in_at = user.sign_in_at
127127
res.push(info)
128128
} else {
129129
res.push({
@@ -132,7 +132,7 @@
132132
name: 'Unknown',
133133
image: '',
134134
role: user.role,
135-
sign_in_at: Number(user.sign_in_at)
135+
sign_in_at: user.sign_in_at
136136
})
137137
}
138138
}
@@ -639,6 +639,13 @@
639639
><IconUserForbidLine /></span
640640
>
641641
{/if}
642+
{#if member.sign_in_at > 0}
643+
<span class="text-neutral-500"
644+
>(Sign in at {getCurrentTimeString(
645+
member.sign_in_at
646+
)})</span
647+
>
648+
{/if}
642649
</div>
643650
<div class="flex flex-row items-center space-x-2">
644651
{#if isManager && member.role != 1}

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.6'
3+
export const APP_VERSION = '2.9.7'
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/lib/stores/exchange.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export interface TokenPrice {
1111

1212
const priceCache: Record<string, TokenPrice> = {}
1313

14+
// Or get from: https://uvevg-iyaaa-aaaak-ac27q-cai.raw.ic0.app/tickers
1415
export function getTokenPrice(
1516
token: string,
1617
syncing: boolean = false

0 commit comments

Comments
 (0)