Skip to content

Commit

Permalink
Fixed user info not showing on web
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasionGS committed Feb 4, 2025
1 parent 90270bb commit 6a9587f
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions src/app/components/Sidepanel/Panels/SettingsPanel/SettingsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ export default function SettingsPanel(props: SettingsPanelProps) {
<Tabs.Panel value="Account">
<LoginForm />
<br />
{user && toxenapi.isDesktop() && (() => {
{user && (() => {
const usedQuota = user ?
`${bytesToString(user.storage_used)}/${bytesToString(user.storage_quota)} used (${(user.storage_used / user.storage_quota * 100).toFixed(2)}%)`
: "0B/0B used (0%)";
Expand All @@ -394,18 +394,24 @@ export default function SettingsPanel(props: SettingsPanelProps) {
<>
<p>Expires <code>{user.premium_expire.toDateString()}</code></p>
<p>Remote Library Quota: <b>{usedQuota}</b></p>
<Checkbox onClick={(e) => Settings.apply({ remoteSyncOnStartup: e.currentTarget.checked }, true)} defaultChecked={Settings.get("remoteSyncOnStartup")} name="remoteSyncOnStartup" label="Sync on startup" />
<br />
<sup>
Syncs your local library with the remote library on startup.
<br />
Uploads new songs and updates existing ones. Update is two-way.
</sup>
<Checkbox onClick={(e) => Settings.apply({ remoteSyncOnSongEdit: e.currentTarget.checked }, true)} defaultChecked={Settings.get("remoteSyncOnSongEdit")} name="remoteSyncOnSongEdit" label="Sync on edit" />
<br />
<sup>
Syncs individual songs when you edit them automatically.
</sup>
{
toxenapi.isDesktop() && (
<>
<Checkbox onClick={(e) => Settings.apply({ remoteSyncOnStartup: e.currentTarget.checked }, true)} defaultChecked={Settings.get("remoteSyncOnStartup")} name="remoteSyncOnStartup" label="Sync on startup" />
<br />
<sup>
Syncs your local library with the remote library on startup.
<br />
Uploads new songs and updates existing ones. Update is two-way.
</sup>
<Checkbox onClick={(e) => Settings.apply({ remoteSyncOnSongEdit: e.currentTarget.checked }, true)} defaultChecked={Settings.get("remoteSyncOnSongEdit")} name="remoteSyncOnSongEdit" label="Sync on edit" />
<br />
<sup>
Syncs individual songs when you edit them automatically.
</sup>
</>
)
}
</>
) : (
<p>You are not a premium user.</p>
Expand Down

0 comments on commit 6a9587f

Please sign in to comment.