mirror of
https://github.com/styppo/hamstr.git
synced 2024-09-19 08:23:30 +00:00
* Improve username styling
* Minor fixes
This commit is contained in:
parent
666c2faaeb
commit
f471ffe011
@ -48,7 +48,8 @@ export default {
|
|||||||
opacity: .9;
|
opacity: .9;
|
||||||
}
|
}
|
||||||
&-value {
|
&-value {
|
||||||
font-weight: 600;
|
font-weight: 500;
|
||||||
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<div class="menu-profile-items">
|
<div class="menu-profile-items">
|
||||||
<div class="profile-info">
|
<div class="profile-info">
|
||||||
<p>
|
<p>
|
||||||
<UserName :pubkey="pubkey" two-line show-verified />
|
<UserName :pubkey="pubkey" two-line wrap show-verified />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="more">
|
<div class="more">
|
||||||
@ -119,6 +119,8 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.profile-info {
|
.profile-info {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
max-width: 125px;
|
||||||
|
overflow: hidden;
|
||||||
p {
|
p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
& + p {
|
& + p {
|
||||||
@ -134,7 +136,7 @@ export default {
|
|||||||
width: 2rem;
|
width: 2rem;
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
svg {
|
svg {
|
||||||
width: 100%;
|
width: inherit;
|
||||||
fill: #fff;
|
fill: #fff;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ export default {
|
|||||||
padding-bottom: 1rem;
|
padding-bottom: 1rem;
|
||||||
&-author {
|
&-author {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
align-items: center;
|
||||||
padding: 0 1rem;
|
padding: 0 1rem;
|
||||||
&-name {
|
&-name {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
|
@ -128,6 +128,9 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
transition: 100ms ease background-color;
|
transition: 100ms ease background-color;
|
||||||
border-bottom: $border-dark;
|
border-bottom: $border-dark;
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
&.clickable {
|
&.clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&:hover {
|
&:hover {
|
||||||
@ -203,7 +206,7 @@ export default {
|
|||||||
}
|
}
|
||||||
&-body {
|
&-body {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: .5rem;
|
||||||
}
|
}
|
||||||
&-actions {
|
&-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -34,6 +34,7 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.user-card {
|
.user-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
margin: 1rem;
|
margin: 1rem;
|
||||||
* + * {
|
* + * {
|
||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<span
|
<span
|
||||||
class="username"
|
class="username"
|
||||||
:class="{'two-line': twoLine, clickable, header}"
|
:class="{'two-line': twoLine, clickable, header, wrap}"
|
||||||
>
|
>
|
||||||
<span class="name">
|
<span class="name">
|
||||||
<a @click="clickable && goToProfile(pubkey)">
|
<a @click="clickable && goToProfile(pubkey)">
|
||||||
@ -42,6 +42,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
wrap: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
header: {
|
header: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
@ -86,6 +90,17 @@ export default {
|
|||||||
}
|
}
|
||||||
&.two-line {
|
&.two-line {
|
||||||
display: block;
|
display: block;
|
||||||
|
&.wrap {
|
||||||
|
.name {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.verified-badge {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&.clickable {
|
&.clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -103,7 +118,7 @@ export default {
|
|||||||
@media screen and (max-width: $phone-lg) {
|
@media screen and (max-width: $phone-lg) {
|
||||||
.username.two-line {
|
.username.two-line {
|
||||||
.name {
|
.name {
|
||||||
display: block;
|
flex-wrap: wrap;
|
||||||
.verified-badge {
|
.verified-badge {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
$primary : #ee517d;
|
$primary : #ee517d;
|
||||||
$secondary : #26A69A;
|
$secondary : #26A69A;
|
||||||
$accent : #9C27B0;
|
$accent : #ee517d;
|
||||||
|
|
||||||
$dark : #1D1D1D;
|
$dark : #1D1D1D;
|
||||||
$dark-page : #121212;
|
$dark-page : #121212;
|
||||||
|
@ -148,7 +148,7 @@ export default class ReplayPool extends Observable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onOpen(relay) {
|
onOpen(relay) {
|
||||||
console.log(`Connected to ${relay}`, relay)
|
console.log(`[RELAY] Connected to ${relay}`)
|
||||||
|
|
||||||
for (const subId of Object.keys(this.subs)) {
|
for (const subId of Object.keys(this.subs)) {
|
||||||
const sub = this.subs[subId]
|
const sub = this.subs[subId]
|
||||||
|
@ -11,7 +11,7 @@ export default class Nip05 {
|
|||||||
const json = await res.json()
|
const json = await res.json()
|
||||||
return json.names[user]
|
return json.names[user]
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`Failed to fetch NIP05 data for ${nip05Id}`, e)
|
console.warn(`Failed to fetch NIP05 data for ${nip05Id}`, e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user