|
1 | 1 | <script> |
2 | 2 | import { onMount } from "svelte"; |
3 | 3 | import { page } from "$app/stores"; |
4 | | - import { browser } from '$app/environment'; |
| 4 | + import { browser } from "$app/environment"; |
5 | 5 | import { PUBLIC_API_URL, PUBLIC_STUDIO_URL } from "$env/static/public"; |
6 | 6 | import Authentication from "../../resources/authentication.js"; |
7 | 7 | import LINK from "../../resources/urls.js"; |
|
32 | 32 | let loggedIn = null; |
33 | 33 | let projectIdSelection; |
34 | 34 | let serverStats = []; |
35 | | - const selectForReject = browser ? $page.url.searchParams.get("reject") : null; |
| 35 | + const selectForReject = browser |
| 36 | + ? $page.url.searchParams.get("reject") |
| 37 | + : null; |
36 | 38 |
|
37 | 39 | function kickOut(loggedOut) { |
38 | 40 | const error = loggedOut ? 401 : 403; |
|
158 | 160 | }; |
159 | 161 |
|
160 | 162 | let projectListStyle = ""; |
| 163 | + let reportsLoading = false; |
161 | 164 | const refreshProjectMenu = () => { |
162 | 165 | unapprovedProjects = []; |
163 | 166 | contentWithReports = []; |
|
201 | 204 | function openReportsMenu(type) { |
202 | 205 | unapprovedProjects = []; |
203 | 206 | contentWithReports = []; |
| 207 | + reportsLoading = true; |
204 | 208 | ProjectClient.getTypeWithReports(type, 0).then( |
205 | 209 | (projectsWithReports) => { |
| 210 | + reportsLoading = false; |
206 | 211 | contentWithReports = projectsWithReports; |
207 | 212 | console.log(contentWithReports); |
208 | 213 | }, |
|
1847 | 1852 | > |
1848 | 1853 | </div> |
1849 | 1854 | </div> |
1850 | | - <br> |
1851 | | - <br> |
| 1855 | + <br /> |
| 1856 | + <br /> |
1852 | 1857 | <input |
1853 | 1858 | type="text" |
1854 | 1859 | size="50" |
|
1857 | 1862 | placeholder="New username..." |
1858 | 1863 | bind:value={userSelectionData.newUsername} |
1859 | 1864 | /> |
1860 | | - <br> |
| 1865 | + <br /> |
1861 | 1866 | <label> |
1862 | 1867 | New Profile Picture: |
1863 | 1868 | <input type="file" on:change={setNewPfpInput} /> |
1864 | 1869 | </label> |
1865 | 1870 | <br /> |
1866 | 1871 | <br /> |
1867 | | - <Button color="purple" on:click={renameUser}>Rename User</Button> |
| 1872 | + <Button color="purple" on:click={renameUser}>Rename User</Button |
| 1873 | + > |
1868 | 1874 | <Button color="purple" on:click={changePfpUser} |
1869 | 1875 | >Change User's Profile Picture</Button |
1870 | 1876 | > |
|
2141 | 2147 | <p class="selection-info"> |
2142 | 2148 | No removed projects currently! |
2143 | 2149 | </p> |
| 2150 | + {:else if dropdownSelectMenu.value === "project"} |
| 2151 | + {#if reportsLoading} |
| 2152 | + <p class="selection-info"> |
| 2153 | + Project reports loading... |
| 2154 | + </p> |
| 2155 | + {:else} |
| 2156 | + <p class="selection-info"> |
| 2157 | + No projects reports currently! |
| 2158 | + </p> |
| 2159 | + {/if} |
2144 | 2160 | {:else} |
2145 | | - <p class="selection-info"> |
2146 | | - No project reports currently! |
2147 | | - </p> |
| 2161 | + <p class="selection-info">how did you get here</p> |
2148 | 2162 | {/if} |
2149 | 2163 | {#each unapprovedProjects as project} |
2150 | 2164 | <div> |
|
0 commit comments