Improved navigation from meet to account + UI for account dev
This commit is contained in:
parent
4a224ff6c1
commit
8fd7855600
|
@ -24,7 +24,7 @@
|
||||||
<span id="acct">-</span>
|
<span id="acct">-</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="back">
|
<div id="back">
|
||||||
<a href="/direct">
|
<a href="javascript:window.history.back()">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 0 24 24" width="40">
|
<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 0 24 24" width="40">
|
||||||
<path d="M0 0h24v24H0V0z" fill="none"/>
|
<path d="M0 0h24v24H0V0z" fill="none"/>
|
||||||
<path d="M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"/>
|
<path d="M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"/>
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
{#if $isUserLoggedIn}
|
{#if $isUserLoggedIn}
|
||||||
<TimelinePage {timeline} >
|
<TimelinePage {timeline} >
|
||||||
<DynamicPageBanner title="" {ariaTitle} />
|
<DynamicPageBanner title="" {ariaTitle} />
|
||||||
{#if !filter}
|
|
||||||
<PinnedStatuses {accountId} />
|
|
||||||
{/if}
|
|
||||||
</TimelinePage>
|
</TimelinePage>
|
||||||
{:else}
|
{:else}
|
||||||
<HiddenFromSSR>
|
<HiddenFromSSR>
|
||||||
|
@ -21,8 +18,6 @@
|
||||||
import HiddenFromSSR from '../HiddenFromSSR'
|
import HiddenFromSSR from '../HiddenFromSSR'
|
||||||
import DynamicPageBanner from '../DynamicPageBanner.html'
|
import DynamicPageBanner from '../DynamicPageBanner.html'
|
||||||
import { updateProfileAndRelationship, clearProfileAndRelationship } from '../../_actions/accounts'
|
import { updateProfileAndRelationship, clearProfileAndRelationship } from '../../_actions/accounts'
|
||||||
import AccountProfile from './AccountProfile.html'
|
|
||||||
import PinnedStatuses from '../timeline/PinnedStatuses.html'
|
|
||||||
import { formatIntl } from '../../_utils/formatIntl'
|
import { formatIntl } from '../../_utils/formatIntl'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -53,9 +48,7 @@
|
||||||
TimelinePage,
|
TimelinePage,
|
||||||
FreeTextLayout,
|
FreeTextLayout,
|
||||||
HiddenFromSSR,
|
HiddenFromSSR,
|
||||||
DynamicPageBanner,
|
DynamicPageBanner
|
||||||
AccountProfile,
|
|
||||||
PinnedStatuses
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="meet-footer">
|
<div class="meet-footer">
|
||||||
<StatusAuthorName {...params} />
|
<StatusAuthorName {...params} />
|
||||||
<!-- <StatusAuthorHandle {...params} />-->
|
<StatusAuthorHandle {...params} />
|
||||||
<StatusRelativeDate {...params} {...timestampParams} />
|
<StatusRelativeDate {...params} {...timestampParams} />
|
||||||
{#if showCard }
|
{#if showCard }
|
||||||
<StatusCard {...params} />
|
<StatusCard {...params} />
|
||||||
|
|
|
@ -254,6 +254,38 @@ div.main-content.chat, div.main-content.meet, div.main-content.account {
|
||||||
|
|
||||||
div.main-content.account {
|
div.main-content.account {
|
||||||
padding-top: 0 !important;
|
padding-top: 0 !important;
|
||||||
|
|
||||||
|
main {
|
||||||
|
width: initial !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.virtual-list {
|
||||||
|
max-width: 100em;
|
||||||
|
margin: auto;
|
||||||
|
|
||||||
|
article.status-article {
|
||||||
|
background: none !important;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
div.status-media {
|
||||||
|
height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
button.inline-media {
|
||||||
|
cursor: initial !important;
|
||||||
|
overflow: visible;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a.status-author-name, span.status-author-handle, a.status-relative-date,
|
||||||
|
div.status-content, div.status-toolbar, div.like-div, a.status-sidebar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div.main-content.meet {
|
div.main-content.meet {
|
||||||
|
@ -268,6 +300,8 @@ div.main-content.meet {
|
||||||
}
|
}
|
||||||
|
|
||||||
div.virtual-list-item {
|
div.virtual-list-item {
|
||||||
|
max-width: 100em;
|
||||||
|
margin: auto;
|
||||||
|
|
||||||
article.status-article {
|
article.status-article {
|
||||||
background-repeat: no-repeat !important;
|
background-repeat: no-repeat !important;
|
||||||
|
|
|
@ -66,7 +66,7 @@ var fediloveUI = {
|
||||||
if (!isRightSwipe && elements.length > 0) {
|
if (!isRightSwipe && elements.length > 0) {
|
||||||
const accId = elements.first().data('account');
|
const accId = elements.first().data('account');
|
||||||
elements.first()[0].style.animation = 'dismissMeet .25s linear 1';
|
elements.first()[0].style.animation = 'dismissMeet .25s linear 1';
|
||||||
setTimeout(function() { elements.first().find('a.status-sidebar > img').click() }, 200);
|
setTimeout(function() { fediloveApi.redirect(`/accounts/${accId}`) }, 200);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scrollChatToLastItem: function() {
|
scrollChatToLastItem: function() {
|
||||||
|
@ -112,6 +112,14 @@ var fediloveUI = {
|
||||||
|
|
||||||
// objects to access from React code
|
// objects to access from React code
|
||||||
var fediloveApi = {
|
var fediloveApi = {
|
||||||
|
redirect: function(url) {
|
||||||
|
const _id = 'link-' + Date.now();
|
||||||
|
var a = document.createElement('a');
|
||||||
|
a.href = url; a.id = _id;
|
||||||
|
document.body.append(a);
|
||||||
|
document.getElementById(_id).click();
|
||||||
|
document.body.removeChild(a);
|
||||||
|
},
|
||||||
getChatMessageId: function() {
|
getChatMessageId: function() {
|
||||||
var parts = window.location.pathname.split('/');
|
var parts = window.location.pathname.split('/');
|
||||||
return parts[parts.length-1];
|
return parts[parts.length-1];
|
||||||
|
@ -396,12 +404,14 @@ function fedilove_customization() {
|
||||||
// we inject this script.js into the React framework at timelines.js
|
// we inject this script.js into the React framework at timelines.js
|
||||||
// Watch for URL changes every 1/2 seconds (this is efficient, don't worry about it!)
|
// Watch for URL changes every 1/2 seconds (this is efficient, don't worry about it!)
|
||||||
// and dispatch a call to "fedilove_customization" to load page customizations depending on URL context
|
// and dispatch a call to "fedilove_customization" to load page customizations depending on URL context
|
||||||
var theurl = null;
|
var __window_url = null;
|
||||||
|
var __window_url_old = null;
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
var newurl = window.location.pathname;
|
const newurl = window.location.pathname;
|
||||||
if (newurl != theurl) {
|
if (newurl != __window_url) {
|
||||||
|
__window_url_old = __window_url;
|
||||||
|
__window_url = newurl;
|
||||||
fedilove_customization();
|
fedilove_customization();
|
||||||
theurl = newurl;
|
|
||||||
}
|
}
|
||||||
}, 250);
|
}, 250);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue