mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-18 19:23:40 +00:00
Add route name to document title
This commit is contained in:
parent
6802b411e2
commit
e90170d3de
@ -80,6 +80,8 @@ export const displayPerson = p => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const displayRelay = ({url}) => last(url.split('://'))
|
||||||
|
|
||||||
export const isLike = content => ['', '+', '🤙', '👍', '❤️', '😎', '🏅'].includes(content)
|
export const isLike = content => ['', '+', '🤙', '👍', '❤️', '😎', '🏅'].includes(content)
|
||||||
|
|
||||||
export const isAlert = (e, pubkey) => {
|
export const isAlert = (e, pubkey) => {
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
import {logs} from 'src/util/logger.js'
|
import {logs} from 'src/util/logger.js'
|
||||||
import {formatTimestamp} from 'src/util/misc'
|
import {formatTimestamp} from 'src/util/misc'
|
||||||
import Content from 'src/partials/Content.svelte'
|
import Content from 'src/partials/Content.svelte'
|
||||||
|
|
||||||
|
document.title = "Debug"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Content>
|
<Content>
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
return navigate("/login")
|
return navigate("/login")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
document.title = 'Keys'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div in:fly={{y: 20}}>
|
<div in:fly={{y: 20}}>
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
publishWithToast(getUserWriteRelays(), cmd.updateUser(values))
|
publishWithToast(getUserWriteRelays(), cmd.updateUser(values))
|
||||||
navigate(routes.person(user.getPubkey(), 'profile'))
|
navigate(routes.person(user.getPubkey(), 'profile'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.title = "Profile"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form on:submit={submit} in:fly={{y: 20}}>
|
<form on:submit={submit} in:fly={{y: 20}}>
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
toast.show("info", "Your settings have been saved!")
|
toast.show("info", "Your settings have been saved!")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.title = "Settings"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form on:submit={submit} in:fly={{y: 20}}>
|
<form on:submit={submit} in:fly={{y: 20}}>
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
let notes = null
|
let notes = null
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
document.title = "Notifications"
|
||||||
|
|
||||||
lastChecked.update(assoc('alerts', now()))
|
lastChecked.update(assoc('alerts', now()))
|
||||||
|
|
||||||
return createScroller(async () => {
|
return createScroller(async () => {
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
return event
|
return event
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.title = $room.name
|
||||||
|
|
||||||
lastChecked.update(updateIn(assoc(id, now())))
|
lastChecked.update(updateIn(assoc(id, now())))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
$: search = fuzzy($otherRooms, {keys: ['name', 'about']})
|
$: search = fuzzy($otherRooms, {keys: ['name', 'about']})
|
||||||
$: results = search(q).slice(0, 50)
|
$: results = search(q).slice(0, 50)
|
||||||
|
|
||||||
|
document.title = 'Chat'
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
const sub = network.listen({
|
const sub = network.listen({
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
const pubkeyLogIn = () => {
|
const pubkeyLogIn = () => {
|
||||||
modal.set({type: 'login/pubkey'})
|
modal.set({type: 'login/pubkey'})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.title = "Log In"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div in:fly={{y: 20}}>
|
<div in:fly={{y: 20}}>
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
window.location.href = '/login'
|
window.location.href = '/login'
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.title = "Log Out"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Content size="lg" class="text-center">
|
<Content size="lg" class="text-center">
|
||||||
|
@ -68,6 +68,8 @@
|
|||||||
// Return unencrypted content so we can display it immediately
|
// Return unencrypted content so we can display it immediately
|
||||||
return {...event, content}
|
return {...event, content}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.title = `DMs with ${displayPerson($person)}`
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Channel {loadMessages} {listenForMessages} {sendMessage}>
|
<Channel {loadMessages} {listenForMessages} {sendMessage}>
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
const getDisplay = tab =>
|
const getDisplay = tab =>
|
||||||
({title: toTitle(tab), badge: getContacts(tab).length})
|
({title: toTitle(tab), badge: getContacts(tab).length})
|
||||||
|
|
||||||
|
document.title = 'Direct Messages'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Content>
|
<Content>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import {navigate} from 'svelte-routing'
|
import {navigate} from 'svelte-routing'
|
||||||
|
import {toTitle} from 'hurdak/lib/hurdak'
|
||||||
import Anchor from "src/partials/Anchor.svelte"
|
import Anchor from "src/partials/Anchor.svelte"
|
||||||
import Content from "src/partials/Content.svelte"
|
import Content from "src/partials/Content.svelte"
|
||||||
import Tabs from "src/partials/Tabs.svelte"
|
import Tabs from "src/partials/Tabs.svelte"
|
||||||
@ -11,6 +12,8 @@
|
|||||||
export let activeTab
|
export let activeTab
|
||||||
|
|
||||||
const setActiveTab = tab => navigate(`/notes/${tab}`)
|
const setActiveTab = tab => navigate(`/notes/${tab}`)
|
||||||
|
|
||||||
|
document.title = toTitle(activeTab)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Content>
|
<Content>
|
||||||
|
@ -69,6 +69,8 @@
|
|||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
log('Person', npub, person)
|
log('Person', npub, person)
|
||||||
|
|
||||||
|
document.title = displayPerson(person)
|
||||||
|
|
||||||
// Refresh our person
|
// Refresh our person
|
||||||
network.loadPeople([pubkey], {force: true}).then(() => {
|
network.loadPeople([pubkey], {force: true}).then(() => {
|
||||||
person = database.getPersonWithFallback(pubkey)
|
person = database.getPersonWithFallback(pubkey)
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {last, find, propEq} from 'ramda'
|
import {find, propEq} from 'ramda'
|
||||||
import {onMount} from 'svelte'
|
import {onMount} from 'svelte'
|
||||||
import {poll, stringToColor} from "src/util/misc"
|
import {poll, stringToColor} from "src/util/misc"
|
||||||
|
import {displayRelay} from "src/util/nostr"
|
||||||
import {between} from 'hurdak/lib/hurdak'
|
import {between} from 'hurdak/lib/hurdak'
|
||||||
import Content from "src/partials/Content.svelte"
|
import Content from "src/partials/Content.svelte"
|
||||||
import Anchor from "src/partials/Anchor.svelte"
|
import Anchor from "src/partials/Anchor.svelte"
|
||||||
@ -35,6 +36,8 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
document.title = displayRelay(relay)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Content>
|
<Content>
|
||||||
@ -44,7 +47,7 @@
|
|||||||
<span
|
<span
|
||||||
class="border-b border-solid"
|
class="border-b border-solid"
|
||||||
style={`border-color: ${stringToColor(relay.url)}`}>
|
style={`border-color: ${stringToColor(relay.url)}`}>
|
||||||
{last(relay.url.split('://'))}
|
{displayRelay(relay)}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
on:mouseout={() => {showStatus = false}}
|
on:mouseout={() => {showStatus = false}}
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
import {modal} from "src/app/ui"
|
import {modal} from "src/app/ui"
|
||||||
|
|
||||||
const {relays} = user
|
const {relays} = user
|
||||||
|
|
||||||
|
document.title = 'Relays'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div in:fly={{y: 20}}>
|
<div in:fly={{y: 20}}>
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
export let activeTab
|
export let activeTab
|
||||||
|
|
||||||
const setActiveTab = tab => navigate(`/search/${tab}`)
|
const setActiveTab = tab => navigate(`/search/${tab}`)
|
||||||
|
|
||||||
|
document.title = "Search"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Content>
|
<Content>
|
||||||
|
Loading…
Reference in New Issue
Block a user