Browse Source

* Fake login removed result

* Fixed going back from profile_id
master
vvandenb 2 years ago
parent
commit
c9c946b075
  1. 2
      front/volume/src/App.svelte
  2. 8
      front/volume/src/FakeLogin.svelte

2
front/volume/src/App.svelte

@ -261,7 +261,7 @@
</div>
{/if}
{#if appState === APPSTATE.PROFILE_ID}
<div on:click={resetAppState} on:keydown={resetAppState}>
<div on:click={() => setAppState(APPSTATE.CHANNELS + "#" + selectedChannel.name)} on:keydown={() => setAppState(APPSTATE.CHANNELS + "#" + selectedChannel.name)}>
<Profile user={userProfile} edit={0}
on:view-history={openIdHistory}
/>

8
front/volume/src/FakeLogin.svelte

@ -3,10 +3,9 @@
export let username;
export let ftId;
let result = null;
async function doPost() {
const res = await fetch(API_URL + "/" + ftId, {
await fetch(API_URL + "/" + ftId, {
method: "POST",
credentials: "include",
mode: "cors",
@ -20,10 +19,6 @@
avatar: "no avatar",
}),
});
const json = await res.json();
result = JSON.stringify(json);
console.log(result);
}
</script>
@ -31,5 +26,4 @@
<input bind:value={username} />
<input bind:value={ftId} />
<button type="button" on:click={doPost}> Post it. </button>
<p>Result: {result}</p>
</div>

Loading…
Cancel
Save