Change /federated path to a more suited path /meet

This commit is contained in:
Bofh 2021-01-10 23:48:50 +01:00
parent 5c1fc7cb13
commit 55c4ec5ee1
8 changed files with 10 additions and 55 deletions

View File

@ -10,7 +10,7 @@ export default {
<p>
Start your journey to <b>meet your crush</b> !!
</p>`,
logIn: 'Log in <img id="btn-masto" src="/mastoicon.png"/>',
logIn: 'Log in <img alt="mastodon login" id="btn-masto" src="/mastoicon.png"/>',
logInText: 'Log In',
footer: `
<p>

View File

@ -1,4 +1,4 @@
<Shortcut key="g t" on:pressed="goto('/federated')"/>
<Shortcut key="g t" on:pressed="goto('/meet')"/>
<Shortcut key="g f" on:pressed="goto('/favorites')"/>
<Shortcut key="g l" on:pressed="goto('/local')"/>
<Shortcut key="g h" on:pressed="goto('/')"/>

View File

@ -14,7 +14,7 @@
<!-- TODO: this is just a hack so that `sapper export` knows to crawl these files -->
<!-- Note that these links have to be spread out or else they result in ECONNRESET errors during crawling -->
<!-- See also community/index.html -->
<a href="/federated">{intl.federated}</a>
<a href="/meet">{intl.federated}</a>
<a href="/favorites">{intl.favorites}</a>
<a href="/direct">{intl.directMessages}</a>
<a href="/bookmarks">{intl.bookmarks}</a>

View File

@ -20,55 +20,10 @@ export function navComputations (store) {
'navPages',
['pinnedPage', 'pinnedListTitle'],
(pinnedPage, pinnedListTitle) => {
let pinnedPageObject
if (pinnedPage === '/federated') {
pinnedPageObject = {
name: 'federated',
href: '/federated',
svg: '#fa-globe',
label: 'intl.federated'
}
} else if (pinnedPage === '/direct') {
pinnedPageObject = {
name: 'direct',
href: '/direct',
svg: '#fa-envelope',
label: 'intl.directMessages'
}
} else if (pinnedPage === '/favorites') {
pinnedPageObject = {
name: 'favorites',
href: '/favorites',
svg: '#fa-star',
label: 'intl.favorites'
}
} else if (pinnedPage === '/bookmarks') {
pinnedPageObject = {
name: 'bookmarks',
href: '/bookmarks',
svg: '#fa-bookmark',
label: 'intl.bookmarks'
}
} else if (pinnedPage.startsWith('/lists/')) {
pinnedPageObject = {
name: `lists/${pinnedPage.split('/').slice(-1)[0]}`,
href: pinnedPage,
svg: '#fa-bars',
label: pinnedListTitle
}
} else { // local
pinnedPageObject = {
name: 'federated',
href: '/federated',
svg: '#fa-users',
label: 'intl.meet'
}
}
return [
{
name: 'federated',
href: '/federated',
href: '/meet',
svg: '#pinafore-logo',
label: 'intl.meet'
},

View File

@ -3,7 +3,7 @@ import { createStream } from '../../_actions/stream/streaming'
import { store } from '../store'
export function timelineObservers () {
// stream to watch for local/federated/etc. updates. home and notification
// stream to watch for local/meet/etc. updates. home and notification
// updates are handled in timelineObservers.js
let currentTimelineStream

View File

@ -5,7 +5,7 @@
<script>
import Title from './_components/Title.html'
import LazyPage from './_components/LazyPage.html'
import pageComponent from './_pages/federated.html'
import pageComponent from './_pages/meet.html'
export default {
components: {

View File

@ -266,7 +266,7 @@ var fediloveApi = {
if (document.getElementById(window.fediloveData.currentIDMeetTimeline) === undefined)
return undefined;
var accId;
if (window.location.pathname == '/federated')
if (window.location.pathname == '/meet')
accId = $(document.getElementById(window.fediloveData.currentIDMeetTimeline)).data('account');
else if (window.location.pathname.startsWith('/accounts/'))
accId = window.location.pathname.match(/^\/accounts\/(\d+)/)[1];
@ -634,7 +634,7 @@ function fedilove_customization() {
}, 200);
}
else if (window.location.pathname == '/federated')
else if (window.location.pathname == '/meet')
{
$('div.main-content').addClass('meet');
$('body').addClass('meet');
@ -659,14 +659,14 @@ function fedilove_customization() {
var itemsDrawnOnce = false;
const _this = setInterval(function()
{
if (window.location.pathname !== '/federated')
if (window.location.pathname !== '/meet')
return clearInterval(_this);
if ($('div#noone-to-meet').length === 0)
$('div.timeline').parent().append('<div id="noone-to-meet" style="display: none"><span>Nothing to show</span></div>');
// remove discarded accounts from timeline (temporal,
// if /federated is reloaded, blocked accounts won't show either)
// if /meet is reloaded, blocked accounts won't show either)
prevItems = $('div.virtual-list > div.virtual-list-item:visible');
for (var accId of fediloveData.tmpDiscardedAccounts) {