about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-13 21:57:24 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-13 21:57:24 -0600
commit67516a07db44196cc4bb94bf94abe5c6f611cf07 (patch)
treef65b7c79f859329a0438d806e777fa1d7aa7f400 /app/javascript/flavours/glitch
parent1fbe7c340201ddff5232c7931a265136943ffd59 (diff)
add new privacy option to auto-defederate after a given timespan + add options to defederate and/or delete past posts + add `defed_in`/`parent:defed_in`/`thread:defed_in` bangtags + ui indicator for posts marked for auto-defederation
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/components/status_icons.js3
-rw-r--r--app/javascript/flavours/glitch/features/status/components/detailed_status.js11
2 files changed, 13 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/status_icons.js b/app/javascript/flavours/glitch/components/status_icons.js
index f439afbe6..bba2fac87 100644
--- a/app/javascript/flavours/glitch/components/status_icons.js
+++ b/app/javascript/flavours/glitch/components/status_icons.js
@@ -64,6 +64,9 @@ export default class StatusIcons extends React.PureComponent {
         {status.get('delete_after') ? (
           <i className='fa fa-clock-o' title={new Date(status.get('delete_after'))} aria-hidden='true' />
         ) : null}
+        {status.get('defederate_after') ? (
+          <i className='fa fa-calendar-times-o' title={new Date(status.get('defederate_after'))} aria-hidden='true' />
+        ) : null}
         {status.get('reject_replies') ? (
           <i className='fa fa-microphone-slash' title='Rejecting replies' aria-hidden='true' />
         ) : null}
diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.js b/app/javascript/flavours/glitch/features/status/components/detailed_status.js
index cde6e4348..bda5e7152 100644
--- a/app/javascript/flavours/glitch/features/status/components/detailed_status.js
+++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.js
@@ -131,6 +131,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
     let favouriteLink = '';
     let sharekeyLinks = '';
     let destructIcon = '';
+    let defederateIcon = '';
     let rejectIcon = '';
 
     if (this.props.measureHeight) {
@@ -256,6 +257,14 @@ export default class DetailedStatus extends ImmutablePureComponent {
       )
     }
 
+    if (status.get('defederate_after')) {
+      defederateIcon = (
+        <span>
+          <i className='fa fa-calendar-times-o' title={new Date(status.get('defederate_after'))} /> ·
+        </span>
+      )
+    }
+
     if (status.get('reject_replies')) {
       rejectIcon = (
         <span>
@@ -285,7 +294,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
           />
 
           <div className='detailed-status__meta'>
-            {sharekeyLinks} {reblogLink} · {favouriteLink} · {destructIcon} {rejectIcon} <VisibilityIcon visibility={status.get('visibility')} />
+            {sharekeyLinks} {reblogLink} · {favouriteLink} · {defederateIcon} {destructIcon} {rejectIcon} <VisibilityIcon visibility={status.get('visibility')} />
             <a className='detailed-status__datetime' href={status.get('url')} target='_blank' rel='noopener'>
               <FormattedDate value={new Date(status.get('created_at'))} hour12={false} year='numeric' month='short' day='2-digit' hour='2-digit' minute='2-digit' />
             </a>