Instead of using spoiler boolean and spoiler_text, simply check for non-blank spoiler_text

Federate spoiler_text using warning attribute on <content /> instead of a <category term="spoiler" />
Clean up schema file from accidental development migrations
This commit is contained in:
Eugen Rochko 2017-01-25 00:49:08 +01:00
parent f8da0dd490
commit 999cde94a6
23 changed files with 159 additions and 173 deletions

View file

@ -1,4 +1,4 @@
attributes :id, :created_at, :in_reply_to_id, :sensitive, :spoiler, :visibility
attributes :id, :created_at, :in_reply_to_id, :sensitive, :spoiler_text, :visibility
node(:uri) { |status| TagManager.instance.uri_for(status) }
node(:content) { |status| Formatter.instance.format(status) }

View file

@ -7,7 +7,10 @@
%strong.p-name.emojify= display_name(status.account)
%span.p-nickname= acct(status.account)
.status__content.e-content.p-name.emojify= Formatter.instance.format(status)
.status__content.e-content.p-name.emojify<
- unless status.spoiler_text.blank?
%p= status.spoiler_text
= Formatter.instance.format(status)
- unless status.media_attachments.empty?
- if status.media_attachments.first.video?

View file

@ -12,7 +12,10 @@
%strong.p-name.emojify= display_name(status.account)
%span.p-nickname= acct(status.account)
.status__content.e-content.p-name.emojify= Formatter.instance.format(status)
.status__content.e-content.p-name.emojify<
- unless status.spoiler_text.blank?
%p= status.spoiler_text
= Formatter.instance.format(status)
- unless status.media_attachments.empty?
.status__attachments