Various minor fixes

This commit is contained in:
styppo 2022-12-30 21:32:38 +00:00
parent 6273251130
commit 51cf5b2a83
No known key found for this signature in database
GPG Key ID: 3AAA685C50724C28
4 changed files with 10 additions and 11 deletions

View File

@ -34,8 +34,8 @@
</div> </div>
<hr class="popup-spacing"> <hr class="popup-spacing">
<div class="popup-body"> <div class="popup-body">
<div class="popup-body-item" @click="$store.dispatch('signIn')"> <div class="popup-body-item" @click="$store.dispatch('signIn').catch(() => {})">
<p>Add an existing account</p> <p>Add an account</p>
</div> </div>
<hr class="popup-spacing"> <hr class="popup-spacing">
<div <div

View File

@ -11,7 +11,7 @@
<form @submit="searchProfile"> <form @submit="searchProfile">
<input <input
type="text" type="text"
placeholder="Search Hamstr" placeholder="Search profiles"
v-model="query" v-model="query"
@focus="toggleFocus" @focus="toggleFocus"
@blur="toggleFocus" @blur="toggleFocus"

View File

@ -18,7 +18,6 @@
</div> </div>
<SignUpForm v-if="fragment === 'sign-up'" @complete="onComplete" /> <SignUpForm v-if="fragment === 'sign-up'" @complete="onComplete" />
<SignInForm v-if="fragment === 'sign-in'" @complete="onComplete"/> <SignInForm v-if="fragment === 'sign-in'" @complete="onComplete"/>
<div v-if="fragment === 'complete'" class="complete"> <div v-if="fragment === 'complete'" class="complete">
@ -86,21 +85,21 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
@import "assets/theme/colors.scss"; @import "assets/theme/colors.scss";
.sign-in-dialog { .sign-in-dialog {
position: relative; position: relative;
background-color: $color-bg; background-color: $color-bg;
padding: 2rem; padding: 1rem;
min-width: 440px; min-width: 440px;
text-align: center; text-align: center;
.icon { .icon {
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 16px; height: 16px;
top: 1rem; top: .5rem;
left: 1rem; left: .5rem;
fill: #fff; fill: #fff;
} }
.logo { .logo {

View File

@ -113,11 +113,11 @@ export default {
mentions.mentionEvents.push(eventId) mentions.mentionEvents.push(eventId)
// if repost remove text // if repost remove text
if (match.length === text.length) return '' if (match.length === text.length) return ''
return `[&${shorten(eventId)}](/event/${eventId})` return `[&${shorten(this.hexToBech32(eventId, 'note'))}](/thread/${eventId})`
} else if (tags[Number(index)][0] === 'p') { } else if (tags[Number(index)][0] === 'p') {
const profile = tags[Number(index)][1] const profile = tags[Number(index)][1]
const displayName = this.$store.getters.displayName(profile) const displayName = this.$store.getters.displayName(profile)
return `[@${displayName}](/${profile})` return `[@${displayName}](/profile/${profile})`
} }
} }
const hashtagReplacer = (match, startWhitespace, hashtag) => { const hashtagReplacer = (match, startWhitespace, hashtag) => {
@ -125,7 +125,7 @@ export default {
} }
const untaggedProfileReplacer = (match, profile) => { const untaggedProfileReplacer = (match, profile) => {
const displayName = this.$store.getters.displayName(profile) const displayName = this.$store.getters.displayName(profile)
return `[@${displayName}](/${profile})` return `[@${displayName}](/profile/${profile})`
} }
let replacedText = text.replace(/#\[(\d+)\]/g, replacer) let replacedText = text.replace(/#\[(\d+)\]/g, replacer)