Fixed bio and profile nav overflow, scene page channel name when no logo.

This commit is contained in:
DebaucheryLibrarian 2024-11-03 01:56:51 +01:00
parent cd85e46594
commit 8f5b7e9c45
5 changed files with 44 additions and 9 deletions

2
common

@ -1 +1 @@
Subproject commit 1122b4198f2c5bc27f9f4e3f3aedea6c81f09ba1 Subproject commit 97d7e9cfd0bbf8e507e8fdb87fb2cc78aef6a1a6

View File

@ -297,8 +297,8 @@
<li class="bio-item updated"> <li class="bio-item updated">
<span <span
class="ellipsis" class="ellipsis"
:title="`#${actor.id} Updated ${formatDate(actor.updatedAt, 'yyyy-MM-dd hh:mm')}`" :title="formatDate(actor.updatedAt, 'yyyy-MM-dd hh:mm')"
>#{{ actor.id }} Updated {{ formatDate(actor.updatedAt, 'yyyy-MM-dd') }}</span> >{{ formatDate(actor.updatedAt, 'yyyy-MM-dd') }}</span>
<div class="actor-actions"> <div class="actor-actions">
<a <a
@ -514,7 +514,6 @@ const descriptions = Object.values(Object.fromEntries(props.actor.profiles
} }
.bio-item { .bio-item {
width: calc(50% - 4rem);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
@ -646,10 +645,17 @@ const descriptions = Object.values(Object.fromEntries(props.actor.profiles
.updated { .updated {
color: var(--highlight-weak-10); color: var(--highlight-weak-10);
font-size: .8rem; font-size: .8rem;
text-align: left;
.ellipsis {
width: 0;
flex-grow: 1;
}
} }
.actor-actions { .actor-actions {
display: flex; display: flex;
flex-shrink: 0;
justify-content: flex-start; justify-content: flex-start;
gap: 1rem; gap: 1rem;
margin-right: .5rem; margin-right: .5rem;
@ -778,6 +784,10 @@ const descriptions = Object.values(Object.fromEntries(props.actor.profiles
.descriptions-container { .descriptions-container {
display: none; display: none;
} }
.bio {
margin-right: 1rem;
}
} }
@media(--compact) { @media(--compact) {
@ -797,7 +807,7 @@ const descriptions = Object.values(Object.fromEntries(props.actor.profiles
} }
} }
@media(--small-15) { @media(--small) {
.profile { .profile {
height: auto; height: auto;
max-height: none; max-height: none;

View File

@ -10,13 +10,18 @@
<Link <Link
v-if="scene.channel" v-if="scene.channel"
:href="`/${scene.channel.type}/${scene.channel.slug}`" :href="`/${scene.channel.type}/${scene.channel.slug}`"
class="channel-link entity-link" class="channel-link entity-link nolink"
> >
<img <img
v-if="scene.channel.hasLogo" v-if="scene.channel.hasLogo"
:src="scene.channel.isIndependent || !scene.network ? `/logos/${scene.channel.slug}/thumbs/network.png` : `/logos/${scene.network.slug}/thumbs/${scene.channel.slug}.png`" :src="scene.channel.isIndependent || !scene.network ? `/logos/${scene.channel.slug}/thumbs/network.png` : `/logos/${scene.network.slug}/thumbs/${scene.channel.slug}.png`"
class="channel-logo entity-logo" class="channel-logo entity-logo"
> >
<span
v-else
class="name"
>{{ scene.channel.name }}</span>
</Link> </Link>
<span <span

View File

@ -17,7 +17,8 @@
<nav <nav
v-if="profile.id === user?.id" v-if="profile.id === user?.id"
class="domains" class="domains nobar"
@wheel.prevent="scrollHorizontal"
> >
<a <a
:href="`/user/${profile.username}/stashes`" :href="`/user/${profile.username}/stashes`"
@ -117,6 +118,10 @@ const mockupRelease = {
name: 'Traxxx', name: 'Traxxx',
}, },
}; };
function scrollHorizontal(event) {
event.currentTarget.scrollLeft += event.deltaY; // eslint-disable-line no-param-reassign
}
</script> </script>
<style> <style>
@ -213,6 +218,7 @@ const mockupRelease = {
} }
.domain { .domain {
flex-shrink: 0;
color: var(--glass-strong-20); color: var(--glass-strong-20);
background: var(--background-dark-20); background: var(--background-dark-20);
padding: .5rem 1rem; padding: .5rem 1rem;
@ -257,7 +263,6 @@ const mockupRelease = {
} }
.domains { .domains {
justify-content: center;
padding: .5rem .5rem; padding: .5rem .5rem;
} }

View File

@ -824,6 +824,16 @@ export async function createActorRevision(actorId, {
return null; return null;
} }
if (key === 'originCountry' && edits.originPlace) {
// place overrides country
return null;
}
if (key === 'residenceCountry' && edits.residenceCountry) {
// place overrides country
return null;
}
if (['originPlace', 'residencePlace'].includes(key)) { if (['originPlace', 'residencePlace'].includes(key)) {
if (!value) { if (!value) {
return [ return [
@ -847,10 +857,15 @@ export async function createActorRevision(actorId, {
throw new Error(`Failed to resolve ${key} ${value}`); throw new Error(`Failed to resolve ${key} ${value}`);
} }
const countryKey = key.includes('origin') ? 'originCountry' : 'residenceCountry';
return [ return [
{ {
key: key.includes('origin') ? 'originCountry' : 'residenceCountry', key: countryKey,
value: resolvedLocation.country, value: resolvedLocation.country,
comment: edits[countryKey] && edits[countryKey] !== resolvedLocation.country
? `${countryKey} overridden by resolved ${key}`
: null,
}, },
{ {
key: key.includes('origin') ? 'originState' : 'residenceState', key: key.includes('origin') ? 'originState' : 'residenceState',