mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
More responsive web frontend (#2245)
* collapsable menu in web, more mobile friendly
* finished sidebar collapsing
* make navigation bar more responsive
* make search bar and admin button more responsive
* fix administration small button coloring
* fix upload button over opened search bar
* open search directly on small devices
* make admin sidebar more responsive
* add small edge to admin content
* server stats more responsive
* fix eslint errors
* server stats flex wrap
* Delete .env
* Revert change in hooks.server.ts
* Revert change in vite.config.js
* little clean up, replace {``} with ""
* remove package-lock.json in root folder
* revert upload button to linkbutton
* show extended sidebar also on focus
* combine changes in side-bar.svelte and
+layout.svelte to side-bar-section
* fix navigation-bar cog color in light theme
---------
Co-authored-by: Paul Paffe <paul.paffe@gmx.net>
This commit is contained in:
parent
2179530084
commit
100866be37
8 changed files with 249 additions and 91 deletions
|
|
@ -14,6 +14,14 @@
|
|||
usageByUser: []
|
||||
};
|
||||
|
||||
$: zeros = (value: number) => {
|
||||
const maxLength = 13;
|
||||
const valueLength = value.toString().length;
|
||||
const zeroLength = maxLength - valueLength;
|
||||
|
||||
return '0'.repeat(zeroLength);
|
||||
};
|
||||
|
||||
$: [statsUsage, statsUsageUnit] = getBytesWithUnit(stats.usage, 0);
|
||||
</script>
|
||||
|
||||
|
|
@ -21,11 +29,62 @@
|
|||
<div>
|
||||
<p class="text-sm dark:text-immich-dark-fg">TOTAL USAGE</p>
|
||||
|
||||
<div class="flex mt-5 justify-between">
|
||||
<div class="mt-5 justify-between lg:flex hidden">
|
||||
<StatsCard logo={CameraIris} title="PHOTOS" value={stats.photos} />
|
||||
<StatsCard logo={PlayCircle} title="VIDEOS" value={stats.videos} />
|
||||
<StatsCard logo={Memory} title="STORAGE" value={statsUsage} unit={statsUsageUnit} />
|
||||
</div>
|
||||
<div class="mt-5 lg:hidden flex">
|
||||
<div
|
||||
class="bg-immich-gray dark:bg-immich-dark-gray rounded-3xl p-5 flex flex-col justify-between"
|
||||
>
|
||||
<div class="flex flex-wrap gap-x-12">
|
||||
<div
|
||||
class="flex place-items-center gap-4 text-immich-primary dark:text-immich-dark-primary"
|
||||
>
|
||||
<CameraIris size="25" />
|
||||
<p>PHOTOS</p>
|
||||
</div>
|
||||
|
||||
<div class="relative text-center font-mono font-semibold text-2xl">
|
||||
<span class="text-[#DCDADA] dark:text-[#525252]">{zeros(stats.photos)}</span><span
|
||||
class="text-immich-primary dark:text-immich-dark-primary">{stats.photos}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-x-12">
|
||||
<div
|
||||
class="flex place-items-center gap-4 text-immich-primary dark:text-immich-dark-primary"
|
||||
>
|
||||
<PlayCircle size="25" />
|
||||
<p>VIDEOS</p>
|
||||
</div>
|
||||
|
||||
<div class="relative text-center font-mono font-semibold text-2xl">
|
||||
<span class="text-[#DCDADA] dark:text-[#525252]">{zeros(stats.videos)}</span><span
|
||||
class="text-immich-primary dark:text-immich-dark-primary">{stats.videos}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-x-7">
|
||||
<div
|
||||
class="flex place-items-center gap-4 text-immich-primary dark:text-immich-dark-primary"
|
||||
>
|
||||
<Memory size="25" />
|
||||
<p>STORAGE</p>
|
||||
</div>
|
||||
|
||||
<div class="relative text-center font-mono font-semibold text-2xl flex">
|
||||
<span class="text-[#DCDADA] dark:text-[#525252]">{zeros(statsUsage)}</span><span
|
||||
class="text-immich-primary dark:text-immich-dark-primary">{statsUsage}</span
|
||||
>
|
||||
<span class="text-center my-auto ml-2 text-base font-light text-gray-400"
|
||||
>{statsUsageUnit}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue