0
0
Fork 0

Add remote interaction dialog for toots (#8202)

* Add remote interaction dialog for toots

* Change AuthorizeFollow into AuthorizeInteraction, support statuses

* Update brakeman.ignore

* Adjust how interaction buttons are display on public pages

* Fix tests
This commit is contained in:
Eugen Rochko 2018-08-18 03:03:12 +02:00 committed by GitHub
parent bf1bde5d6a
commit 78fa926ed5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 347 additions and 195 deletions

View file

@ -67,13 +67,6 @@ function main() {
}, datetime, now, datetime.getFullYear());
});
[].forEach.call(document.querySelectorAll('.modal-button'), (content) => {
content.addEventListener('click', (e) => {
e.preventDefault();
window.open(e.target.href, 'mastodon-intent', 'width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes');
});
});
const reactComponents = document.querySelectorAll('[data-component]');
if (reactComponents.length > 0) {
import(/* webpackChunkName: "containers/media_container" */ '../mastodon/containers/media_container')
@ -119,6 +112,20 @@ function main() {
return false;
});
delegate(document, '.modal-button', 'click', e => {
e.preventDefault();
let href;
if (e.target.nodeName !== 'A') {
href = e.target.parentNode.href;
} else {
href = e.target.href;
}
window.open(href, 'mastodon-intent', 'width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes');
});
delegate(document, '#account_display_name', 'input', ({ target }) => {
const nameCounter = document.querySelector('.name-counter');
const name = document.querySelector('.card .display-name strong');

View file

@ -628,6 +628,7 @@
overflow: hidden;
white-space: pre-wrap;
padding-top: 2px;
color: $primary-text-color;
&:focus {
outline: 0;

View file

@ -3,6 +3,7 @@
border-radius: 4px;
overflow: hidden;
margin-bottom: 10px;
text-align: left;
@media screen and (max-width: $no-gap-breakpoint) {
margin-bottom: 0;
@ -63,6 +64,10 @@
}
}
}
&--highlighted .entry {
background: lighten($ui-base-color, 8%);
}
}
.button.logo-button {