Skip to content

Commit 82ea9af

Browse files
committed
fix: fix messaging app landing page in 'ic_panda_front'
1 parent aca2a27 commit 82ea9af

File tree

8 files changed

+37
-38
lines changed

8 files changed

+37
-38
lines changed

proposals/proposal-192.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_panda_frontend --ic --by-proposal
8+
9+
export BLOB="$(didc encode --format blob '(record {batch_id=61:nat; evidence=blob "\ed\2a\85\42\62\c6\2d\46\34\96\24\f1\80\f9\a4\04\dd\20\3c\dd\a1\de\f5\9f\8a\ea\cb\b7\6d\db\82\53"})')"
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_panda_frontend v2.6.3\";
14+
url = \"https://panda.fans/\";
15+
summary = \"This proposal executes commit_proposed_batch() on c63a7-6yaaa-aaaap-ab3gq-cai to release ic_panda_frontend v2.6.3.\n\n1. fix: fix messaging app landing page in 'ic_panda_front'.\";
16+
action = opt variant {
17+
ExecuteGenericNervousSystemFunction = record {
18+
function_id = 1000 : nat64;
19+
payload = ${BLOB};
20+
}
21+
};
22+
}
23+
)" > proposal-message.json
24+
25+
quill send proposal-message.json

src/ic_panda_frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@
8080
"test": "vitest run"
8181
},
8282
"type": "module",
83-
"version": "2.6.2"
83+
"version": "2.6.3"
8484
}

src/ic_panda_frontend/src/lib/components/messages/Home.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<script lang="ts">
22
import { type UserInfo } from '$lib/canisters/message'
33
import PageFooter from '$lib/components/core/PageFooter.svelte'
4-
import { type MyMessageState } from '$lib/stores/message'
4+
import { MyMessageState } from '$lib/stores/message'
55
import { toastRun } from '$lib/stores/toast'
66
import { Avatar, getToastStore } from '@skeletonlabs/skeleton'
77
import Saos from 'saos'
88
import { onMount, tick } from 'svelte'
99
import { writable, type Writable } from 'svelte/store'
1010
11-
export let myState: MyMessageState
12-
1311
const toastStore = getToastStore()
1412
const latest_users: Writable<UserInfo[]> = writable([])
1513
@@ -20,6 +18,7 @@
2018
2119
onMount(() => {
2220
const { abort } = toastRun(async () => {
21+
const myState = await MyMessageState.load()
2322
users_total = myState.api.state?.users_total || 0n
2423
names_total = myState.api.state?.names_total || 0n
2524
await tick()

src/ic_panda_frontend/src/lib/components/messages/Index.svelte

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/ic_panda_frontend/src/lib/components/ui/Loading.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="m-auto text-primary-500">
1+
<div class="m-auto h-fit w-fit text-primary-500">
22
<svg
33
class="h-5 w-5 animate-spin"
44
xmlns="http://www.w3.org/2000/svg"

src/ic_panda_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.6.2'
3+
export const APP_VERSION = '2.6.3'
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
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<script lang="ts">
2-
import { goto } from '$app/navigation'
32
import { page } from '$app/stores'
43
import Loading from '$lib/components/ui/Loading.svelte'
5-
import { onMount } from 'svelte'
64
7-
$: username = ($page?.params || {})['username'] || ''
8-
onMount(async () => {
9-
goto(`https://dmsg.net/${username}`)
10-
})
5+
const username = ($page?.params || {})['username'] || ''
6+
window.location.assign(`https://dmsg.net/${username}`)
117
</script>
128

13-
<Loading />
9+
<div class="flex h-full w-full flex-col items-center justify-center">
10+
<Loading />
11+
</div>
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
<script lang="ts">
2-
import Index from '$lib/components/messages/Index.svelte'
3-
import { authStore } from '$lib/stores/auth'
4-
5-
$: principal = $authStore.identity.getPrincipal()
2+
import Home from '$lib/components/messages/Home.svelte'
63
</script>
74

85
<div
96
class="mx-auto flex h-full w-full max-w-5xl flex-col flex-nowrap content-center items-center"
107
>
11-
{#key principal.toText()}
12-
<Index />
13-
{/key}
8+
<Home />
149
</div>

0 commit comments

Comments
 (0)