|
@ -61,7 +61,7 @@ |
|
|
setAppState(APPSTATE.PROFILE); |
|
|
setAppState(APPSTATE.PROFILE); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let profileUsername: string; |
|
|
let profileUsername: string = ""; |
|
|
async function openIdProfile(event: CustomEvent<string>) { |
|
|
async function openIdProfile(event: CustomEvent<string>) { |
|
|
profileUsername = event.detail; |
|
|
profileUsername = event.detail; |
|
|
setAppState(APPSTATE.PROFILE_ID); |
|
|
setAppState(APPSTATE.PROFILE_ID); |
|
@ -71,10 +71,6 @@ |
|
|
setAppState(APPSTATE.HISTORY); |
|
|
setAppState(APPSTATE.HISTORY); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async function openIdHistory() { |
|
|
|
|
|
setAppState(APPSTATE.HISTORY_ID); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async function clickFriends() { |
|
|
async function clickFriends() { |
|
|
setAppState(APPSTATE.FRIENDS); |
|
|
setAppState(APPSTATE.FRIENDS); |
|
|
} |
|
|
} |
|
@ -86,7 +82,6 @@ |
|
|
function clickChannels() { |
|
|
function clickChannels() { |
|
|
setAppState(APPSTATE.CHANNELS); |
|
|
setAppState(APPSTATE.CHANNELS); |
|
|
} |
|
|
} |
|
|
let channels: Array<ChannelsType> = []; |
|
|
|
|
|
let selectedChannel: ChannelsType; |
|
|
let selectedChannel: ChannelsType; |
|
|
const handleSelectChannel = (channel: ChannelsType) => { |
|
|
const handleSelectChannel = (channel: ChannelsType) => { |
|
|
selectedChannel = channel; |
|
|
selectedChannel = channel; |
|
@ -177,7 +172,7 @@ |
|
|
{/if} |
|
|
{/if} |
|
|
{#if appState === APPSTATE.PROFILE} |
|
|
{#if appState === APPSTATE.PROFILE} |
|
|
<div on:click={resetAppState} on:keydown={resetAppState}> |
|
|
<div on:click={resetAppState} on:keydown={resetAppState}> |
|
|
<Profile on:view-history={openIdHistory} /> |
|
|
<Profile on:view-history={() => setAppState(APPSTATE.HISTORY_ID)} /> |
|
|
</div> |
|
|
</div> |
|
|
{/if} |
|
|
{/if} |
|
|
{#if appState === APPSTATE.PROFILE_ID} |
|
|
{#if appState === APPSTATE.PROFILE_ID} |
|
@ -187,7 +182,7 @@ |
|
|
on:keydown={() => |
|
|
on:keydown={() => |
|
|
setAppState(APPSTATE.CHANNELS + "#" + selectedChannel.name)} |
|
|
setAppState(APPSTATE.CHANNELS + "#" + selectedChannel.name)} |
|
|
> |
|
|
> |
|
|
<Profile username={profileUsername} on:view-history={openIdHistory} /> |
|
|
<Profile username={profileUsername} on:view-history={() => setAppState(APPSTATE.HISTORY_ID)} /> |
|
|
</div> |
|
|
</div> |
|
|
{/if} |
|
|
{/if} |
|
|
|
|
|
|
|
|