Fix issues with leaderboards
This commit is contained in:
@@ -12,7 +12,7 @@ crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
tauri-build = { version = "2.5.5", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2.10.2", features = ["macos-private-api"] }
|
||||
tauri = { version = "2.10.2", features = [] }
|
||||
tauri-plugin-opener = "2.5.3"
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = "1.0.149"
|
||||
|
||||
@@ -7,6 +7,7 @@ import { GetIconForUser } from '@/lib/BerryDash'
|
||||
import Image from 'next/image'
|
||||
import './styles.css'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { platform } from '@tauri-apps/plugin-os'
|
||||
|
||||
interface BaseEntry {
|
||||
id: number
|
||||
@@ -175,11 +176,17 @@ export default function BerryDashLeaderboards () {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className='box'>
|
||||
<div
|
||||
className={`box ${
|
||||
platform() == 'windows'
|
||||
? 'h-[calc(100vh-116px)]'
|
||||
: 'h-[calc(100vh-84px)]'
|
||||
}`}
|
||||
>
|
||||
{selected == -1 ? (
|
||||
<>
|
||||
<p className='text-center mt-4 text-xl'>Select a Leaderboard</p>
|
||||
<div className='flex flex-col gap-2 mt-4 items-center justify-center'>
|
||||
<p className='text-center mt-2 text-xl'>Select a Leaderboard</p>
|
||||
<div className='flex flex-col gap-2 mt-2 items-center justify-center'>
|
||||
<button
|
||||
className='leaderboard-button'
|
||||
onClick={() => setSelected(0)}
|
||||
@@ -228,7 +235,13 @@ export default function BerryDashLeaderboards () {
|
||||
<>
|
||||
<div
|
||||
className={`flex flex-col gap-2 overflow-y-auto ${
|
||||
selected == 1 ? 'h-[calc(100vh-128px)]' : 'h-[calc(100vh-96px)]'
|
||||
selected == 1
|
||||
? platform() == 'windows'
|
||||
? 'h-[calc(100vh-168px)]'
|
||||
: 'h-[calc(100vh-136px)]'
|
||||
: platform() == 'windows'
|
||||
? 'h-[calc(100vh-128px)]'
|
||||
: 'h-[calc(100vh-96px)]'
|
||||
} px-1`}
|
||||
>
|
||||
{entries.map((item, index) => {
|
||||
@@ -288,7 +301,7 @@ export default function BerryDashLeaderboards () {
|
||||
<select
|
||||
value={selectedBerryOption}
|
||||
onChange={e => setSelectedBerryOption(Number(e.target.value))}
|
||||
className='leaderboard-select mt-2'
|
||||
className='leaderboard-select mt-0.75'
|
||||
>
|
||||
<option value='0'>Normal Berry</option>
|
||||
<option value='1'>Poison Berry</option>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
.box {
|
||||
@apply bg-(--col1) border border-(--col3) rounded-lg w-auto p-1 h-[calc(100vh-84px)];
|
||||
@apply bg-(--col1) border border-(--col3) rounded-lg w-auto p-1;
|
||||
}
|
||||
|
||||
.leaderboard-button,
|
||||
.leaderboard-select {
|
||||
@apply bg-(--col2) hover:bg-(--col4) border border-(--col4) hover:border-(--col6) rounded-lg px-4 py-2 inline-block transition-all duration-200;
|
||||
@apply bg-(--col2) hover:bg-(--col4) border border-(--col4) hover:border-(--col6) rounded-lg px-4 py-2 inline-block transition-all duration-200 cursor-pointer;
|
||||
}
|
||||
|
||||
.leaderboard-entry {
|
||||
|
||||
Reference in New Issue
Block a user