Fixed sessions tab for mobile devices

This commit is contained in:
nizune 2021-07-07 22:15:52 +02:00
parent ce67c5acdb
commit 0f0c6cfbae
2 changed files with 44 additions and 21 deletions

View file

@ -312,6 +312,22 @@
display: flex;
align-items: center;
gap: 12px;
flex-direction: row;
.flextest {
display: flex;
gap: 12px;
flex-grow: 1;
}
@media only screen and (max-width: 900px) {
align-items: unset;
flex-direction: column;
> button {
width: 100%;
}
}
}
.entry {

View file

@ -128,29 +128,35 @@ export function Sessions() {
</span>
)}
<div className={styles.session}>
<div className={styles.icon}>
{getIcon(session)}
<div>{getSystemIcon(session)}</div>
</div>
<div className={styles.info}>
<input
type="text"
className={styles.name}
value={session.friendly_name}
autocomplete="off"
/>
<span className={styles.time}>
<Text
id="app.settings.pages.sessions.created"
fields={{
time_ago: dayjs(
session.timestamp,
).fromNow(),
}}
<div className={styles.flextest}>
<div className={styles.icon}>
{getIcon(session)}
<div>{getSystemIcon(session)}</div>
</div>
<div className={styles.info}>
<input
type="text"
className={styles.name}
value={session.friendly_name}
autocomplete="off"
/>
</span>
<span className={styles.time}>
<Text
id="app.settings.pages.sessions.created"
fields={{
time_ago: dayjs(
session.timestamp,
).fromNow(),
}}
/>
</span>
</div>
</div>
{deviceId !== session.id && (
{deviceId !== session.id && (
<Button
onClick={async () => {
setDelete([
@ -173,6 +179,7 @@ export function Sessions() {
<Text id="app.settings.pages.logOut" />
</Button>
)}
</div>
</div>
))}