From 7aea7506dfda55acc6117fa8ab8f08216b3c1e4c Mon Sep 17 00:00:00 2001 From: Simounet Date: Sat, 8 Dec 2018 13:43:17 +0100 Subject: [PATCH 01/11] Fix private pic display --- app/Http/Controllers/PublicApiController.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index 440effd86..ffda8c546 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -161,6 +161,7 @@ class PublicApiController extends Controller switch ($status->scope) { case 'public': case 'unlisted': + case 'private': $user = Auth::check() ? Auth::user() : false; if($user && $profile->is_private) { $follows = Follower::whereProfileId($user->profile->id) @@ -172,15 +173,6 @@ class PublicApiController extends Controller } break; - case 'private': - $follows = Follower::whereProfileId($user->profile->id) - ->whereFollowingId($profile->id) - ->exists(); - if($follows == false && $profile->id !== $user->profile->id) { - abort(404); - } - break; - case 'direct': abort(404); break; From be081c6427d5b5e9f7b2f4d32beaa39746221a55 Mon Sep 17 00:00:00 2001 From: Urtzi Odriozola Date: Fri, 23 Nov 2018 17:24:12 +0100 Subject: [PATCH 02/11] Basque localization --- resources/lang/eu/auth.php | 20 +++ resources/lang/eu/navmenu.php | 14 ++ resources/lang/eu/notification.php | 8 ++ resources/lang/eu/pagination.php | 19 +++ resources/lang/eu/passwords.php | 22 ++++ resources/lang/eu/profile.php | 8 ++ resources/lang/eu/timeline.php | 5 + resources/lang/eu/validation.php | 122 ++++++++++++++++++ .../lang/vendor/backup/eu/notifications.php | 35 +++++ 9 files changed, 253 insertions(+) create mode 100644 resources/lang/eu/auth.php create mode 100644 resources/lang/eu/navmenu.php create mode 100644 resources/lang/eu/notification.php create mode 100644 resources/lang/eu/pagination.php create mode 100644 resources/lang/eu/passwords.php create mode 100644 resources/lang/eu/profile.php create mode 100644 resources/lang/eu/timeline.php create mode 100644 resources/lang/eu/validation.php create mode 100644 resources/lang/vendor/backup/eu/notifications.php diff --git a/resources/lang/eu/auth.php b/resources/lang/eu/auth.php new file mode 100644 index 000000000..4c2afbf16 --- /dev/null +++ b/resources/lang/eu/auth.php @@ -0,0 +1,20 @@ + 'Sartutako datuek ez dute balio.', + 'throttle' => 'Saiakera gehiegi. Mesedez, saitu zaitez :seconds segundo barru.', + +]; diff --git a/resources/lang/eu/navmenu.php b/resources/lang/eu/navmenu.php new file mode 100644 index 000000000..cfa8903c6 --- /dev/null +++ b/resources/lang/eu/navmenu.php @@ -0,0 +1,14 @@ + 'Ikusi nire profila', + 'myTimeline' => 'Nire denboralerroa', + 'publicTimeline' => 'Denboralerro publikoa', + 'remoteFollow' => 'Urruneko Jarraipena', + 'settings' => 'Ezarpenak', + 'admin' => 'Admin', + 'logout' => 'Irten', + 'directMessages' => 'Mezu zuzenak', + +]; diff --git a/resources/lang/eu/notification.php b/resources/lang/eu/notification.php new file mode 100644 index 000000000..0e3280155 --- /dev/null +++ b/resources/lang/eu/notification.php @@ -0,0 +1,8 @@ + '-(e)k argazkia gustuko du.', + 'startedFollowingYou' => 'jarraitzen hasi zaizu.', + +]; diff --git a/resources/lang/eu/pagination.php b/resources/lang/eu/pagination.php new file mode 100644 index 000000000..466ad1880 --- /dev/null +++ b/resources/lang/eu/pagination.php @@ -0,0 +1,19 @@ + '« Aurrekoa', + 'next' => 'Hurrengoa »', + +]; diff --git a/resources/lang/eu/passwords.php b/resources/lang/eu/passwords.php new file mode 100644 index 000000000..3c113a385 --- /dev/null +++ b/resources/lang/eu/passwords.php @@ -0,0 +1,22 @@ + 'Pasahitzak gutxienez 6 karaktere izan behar ditu, eta konfirmazio pasahitzarekin bat etorri behar da.', + 'reset' => 'Pasahitza aldatu da!', + 'sent' => 'E-postara pasahitza aldatzeko esteka bidali dizugu.', + 'token' => 'Pasahitza aldatzeko "token"-ak ez du balio.', + 'user' => 'Ez dugu aurkitu pasahitz hori duen erabiltzailerik.', + +]; diff --git a/resources/lang/eu/profile.php b/resources/lang/eu/profile.php new file mode 100644 index 000000000..f83e789b1 --- /dev/null +++ b/resources/lang/eu/profile.php @@ -0,0 +1,8 @@ + 'Erabiltzaile honek oraindik ez du ezer bidali!', + 'emptyFollowers' => 'Erabiltzaile honek ez du jarraitzailerik!', + 'emptyFollowing' => 'Erabiltzaile honek oraindik ez du inor jarraitzen', + 'savedWarning' => 'Gordetakoa zuk bakarrik ikusi dezakezu', +]; diff --git a/resources/lang/eu/timeline.php b/resources/lang/eu/timeline.php new file mode 100644 index 000000000..7a157962d --- /dev/null +++ b/resources/lang/eu/timeline.php @@ -0,0 +1,5 @@ + 'Zure denbora lerroa hutsik dago.', +]; diff --git a/resources/lang/eu/validation.php b/resources/lang/eu/validation.php new file mode 100644 index 000000000..58e2c4225 --- /dev/null +++ b/resources/lang/eu/validation.php @@ -0,0 +1,122 @@ + ':attribute onartuak izan behar dira.', + 'active_url' => ':attribute helbideak ez du zuzena.', + 'after' => ':attribute datak :date baino beranduagokoa izan behar du.', + 'after_or_equal' => ':attribute datak :date baino beranduagokoa edo berdina izan behar du.', + 'alpha' => ':attribute -(e)k letrak bakarrik izan ditzake', + 'alpha_dash' => ':attribute -(e)k letrak, zenbakiak eta gidoiak bakarrik onartzen ditu.', + 'alpha_num' => ':attribute -(e)k letrak eta zenbakiak bakarrik onartzen ditu', + 'array' => ':attribute zerrenda izan behar da.', + 'before' => ':attribute datak :date baino lehenagokoa izan behar du.', + 'before_or_equal' => ':attribute datak :date baino lehenagokoa edo berdina izan behar du.', + 'between' => [ + 'numeric' => ':attribute :min eta :max -ren artean izan behar da.', + 'file' => ':attribute :min eta :max kilobytes artean izan behar da.', + 'string' => ':attribute -(e)k :min eta :max karaktere bitartean izan behar ditu.', + 'array' => ':attribute -(e)k :min eta :max elementu bitartean izan behar ditu.', + ], + 'boolean' => ':attribute eremua "True" edo "False" izan behar da.', + 'confirmed' => ':attribute-ren baieztapenak ez datoz bat.', + 'date' => ':attribute ez da data formatu egokia.', + 'date_format' => ':attribute -(e)k ez du :format formatua betetzen.', + 'different' => ':attribute eta :other ezberdinak izan behar dira.', + 'digits' => ':attribute -(e)k :digits zifra izan behar ditu.', + 'digits_between' => ':attribute -(e)k :min eta :max zifra bitartean izan behar ditu.', + 'dimensions' => ':attribute -(e)k onartzen ez diren tamainak ditu.', + 'distinct' => ':attribute eremuak bikoiztutako balorea du.', + 'email' => ':attribute eremua e-posta izan behar da.', + 'exists' => 'Aukeratutako :attribute ez da baliozkoa.', + 'file' => ':attribute eremua fitxategia izan behar da.', + 'filled' => ':attribute eremuak balio egokia izan behar du.', + 'image' => ':attribute eremua irudia izan behar da.', + 'in' => 'Aukeratutako :attribute elementua ez da baliozkoa.', + 'in_array' => ':attribute eremua ez da :other -en existitzen.', + 'integer' => ':attribute zenbaki osoa izen behar da.', + 'ip' => ':attribute eremua IP helbide egokia izan behar da.', + 'ipv4' => ':attribute eremua IPv4 helbide egokia izan behar da.', + 'ipv6' => ':attribute eremua IPv6 helbide egokia izan behar da.', + 'json' => ':attribute eremuak JSON egokia izan behar du.', + 'max' => [ + 'numeric' => ':attribute ezin da :max baino handiagoa izan.', + 'file' => ':attribute -(e)k ezin du :max kilobyte baino gehiago izan.', + 'string' => ':attribute -(e)k ezin ditu :max karaktere baino gehiago izan.', + 'array' => ':attribute -(e)k ezin ditu :max elementu baino gehiago izan.', + ], + 'mimes' => ':attribute :values motatako fitxategia izan behar da.', + 'mimetypes' => ':attribute :values motatako fitxategia izan behar da.', + 'min' => [ + 'numeric' => ':attribute gutxienez :min izan behar da.', + 'file' => ':attribute gutxienez :min kilobyte izan behar ditu.', + 'string' => ':attribute gutxienez :min karaktere izan behar ditu.', + 'array' => ':attribute -(e)k gutxienez :min elementu izan behar ditu.', + ], + 'not_in' => 'Aukeratutako :attribute elementuak ez du balio.', + 'not_regex' => ':attribute formatua ez da zuzena.', + 'numeric' => ':attribute zenbakia izan behar da.', + 'present' => ':attribute eremua egon behar da.', + 'regex' => ':attribute -ren formatua ez da zuzena.', + 'required' => ':attribute eremua derrigorrezkoa da.', + 'required_if' => ':attribute eremua derrigorrezkoa da :other :value denean.', + 'required_unless' => ':attribute eremua derrigorrezkoa da :other :values izan ezean.', + 'required_with' => ':values dagoenean, :attribute eremua derrigorrezkoa da.', + 'required_with_all' => ':values dagoenean, :attribute eremua derrigorrezkoa da.', + 'required_without' => ':attribute eremua derrigorrezkoa da :values eremua ez dagoenean.', + 'required_without_all' => ':attribute eremua beharrezkoa da :values bat bera ere ez dagoenean.', + 'same' => ':attribute eta :other bat etorri behar dira.', + 'size' => [ + 'numeric' => ':attribute :size izan behar da.', + 'file' => ':attribute -(e)k :size kilobyte izan behar ditu.', + 'string' => ':attribute -(e)k :size karaktere izan behar ditu.', + 'array' => ':attribute -(e)k :size elementu izan behar ditu.', + ], + 'string' => ':attribute testua izan behar da.', + 'timezone' => ':attribute ordutegi zuzena izan behar du.', + 'unique' => ':attribute ez dago eskuragarri.', + 'uploaded' => ':attribute igotzerakoan akatsa.', + 'url' => ':attribute -ren formatua ez da egokia.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/lang/vendor/backup/eu/notifications.php b/resources/lang/vendor/backup/eu/notifications.php new file mode 100644 index 000000000..dbc414a02 --- /dev/null +++ b/resources/lang/vendor/backup/eu/notifications.php @@ -0,0 +1,35 @@ + 'Salbuespen mezua: :message', + 'exception_trace' => 'Salbuespen aztarna: :trace', + 'exception_message_title' => 'Salbuespen mezua', + 'exception_trace_title' => 'Salbuespen aztarna', + + 'backup_failed_subject' => 'Akatsa :application_name babeskopia egiterakoan', + 'backup_failed_body' => 'Garrantzitsua: Akatsa gertatu da :application_name babeskopia egiterakoan', + + 'backup_successful_subject' => ':application_name babeskopia arrakastatsua', + 'backup_successful_subject_title' => 'Babeskopia arrakastatsu berria!', + 'backup_successful_body' => 'Berri onak, :application_name -ren babeskopia berria arrakastaz sortu da :disk_name izeneko diskoan.', + + 'cleanup_failed_subject' => ':application_name -ren babeskopiak garbitzean akatsa.', + 'cleanup_failed_body' => 'Akatsa gertatu da :application_name -ren babeskopiak garbitzerakoan', + + 'cleanup_successful_subject' => ':application_name -ren babeskopiak arrakastaz garbituta', + 'cleanup_successful_subject_title' => 'Babeskopien garbitze arrakastatsua!', + 'cleanup_successful_body' => ':application_name -ren babeskopia garbitzea arrakastaz gauzatu da :disk_name izeneko diskoan.', + + 'healthy_backup_found_subject' => ':application_name -rentzat diren babeskopiak osasuntsu daude :disk_name diskoan', + 'healthy_backup_found_subject_title' => ':application_name -rentzat diren babeskopiak osasuntsu daude', + 'healthy_backup_found_body' => ':application_name -rentzat diren babeskopiak osasuntsutzat jotzen dira. Lan bikaina!', + + 'unhealthy_backup_found_subject' => 'Garrantzitsua: :application_name -rentzat diren babeskopiak ez daude osasuntsu', + 'unhealthy_backup_found_subject_title' => 'Garrantzitsua: :application_name -rentzat diren babeskopiak ez daude osasuntsu. :problem', + 'unhealthy_backup_found_body' => ':application_name -rentzat diren babeskopiak ez daude osasuntsu :disk_name diskoan.', + 'unhealthy_backup_found_not_reachable' => 'Babeskopien helburua ezin izan da atzitu. :error', + 'unhealthy_backup_found_empty' => 'Ez dago aplikazio honen babeskopiarik.', + 'unhealthy_backup_found_old' => 'Azkena .date -n egindako babeskopia zaharregitzat jotzen da.', + 'unhealthy_backup_found_unknown' => 'Barkatu, ezin da arrazoi zehatza zehaztu.', + 'unhealthy_backup_found_full' => 'Babeskopiak leku gehiegi erabiltzen ari dira. Egungo erabilera :disk_usage -koa da, non, onartutako :disk_limit muga baino handiagoa den.', +]; From 997a913aa1ac2bb501f7446b016f7d5965a132a3 Mon Sep 17 00:00:00 2001 From: Urtzi Odriozola Date: Tue, 11 Dec 2018 22:44:58 +0100 Subject: [PATCH 03/11] Create site.php --- resources/lang/eu/site.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 resources/lang/eu/site.php diff --git a/resources/lang/eu/site.php b/resources/lang/eu/site.php new file mode 100644 index 000000000..82b481361 --- /dev/null +++ b/resources/lang/eu/site.php @@ -0,0 +1,13 @@ + 'Honi buruz', + 'help' => 'Laguntza', + 'language' => 'Hizkuntza', + 'fediverse' => 'Fedibertsoa', + 'opensource' => 'Kode irekia', + 'terms' => 'Lege oharra', + 'privacy' => 'Pribatutasuna', + 'l10nWip' => 'Oraindik lokalizazioen sustenguan lanean gaude', + 'currentLocale' => 'Uneko hizkuntza', + 'selectLocale' => 'Aukeratu onartutako hizkuntzetako bat', +]; From 8df9e59ba881ec1f200b947de1f601912c5a96bb Mon Sep 17 00:00:00 2001 From: Urtzi Odriozola Date: Tue, 11 Dec 2018 22:46:37 +0100 Subject: [PATCH 04/11] Update site.php --- resources/lang/eu/site.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/eu/site.php b/resources/lang/eu/site.php index 82b481361..10a105e69 100644 --- a/resources/lang/eu/site.php +++ b/resources/lang/eu/site.php @@ -7,7 +7,7 @@ return [ 'opensource' => 'Kode irekia', 'terms' => 'Lege oharra', 'privacy' => 'Pribatutasuna', - 'l10nWip' => 'Oraindik lokalizazioen sustenguan lanean gaude', + 'l10nWip' => 'Oraindik lokalizazioen sustenguan lanean ari gara', 'currentLocale' => 'Uneko hizkuntza', 'selectLocale' => 'Aukeratu onartutako hizkuntzetako bat', ]; From c0794be67e932e5ecb785b423a831537359644cf Mon Sep 17 00:00:00 2001 From: Urtzi Odriozola Date: Tue, 11 Dec 2018 23:00:19 +0100 Subject: [PATCH 05/11] Update site.php --- resources/lang/eu/site.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/eu/site.php b/resources/lang/eu/site.php index 10a105e69..410481ae4 100644 --- a/resources/lang/eu/site.php +++ b/resources/lang/eu/site.php @@ -5,9 +5,9 @@ return [ 'language' => 'Hizkuntza', 'fediverse' => 'Fedibertsoa', 'opensource' => 'Kode irekia', - 'terms' => 'Lege oharra', + 'terms' => 'Baldintzak', 'privacy' => 'Pribatutasuna', 'l10nWip' => 'Oraindik lokalizazioen sustenguan lanean ari gara', - 'currentLocale' => 'Uneko hizkuntza', + 'currentLocale' => 'Uneko lokalizazioa', 'selectLocale' => 'Aukeratu onartutako hizkuntzetako bat', ]; From 857b16e8341316e221b9d32308531046809f3cd6 Mon Sep 17 00:00:00 2001 From: Aditoo17 <42938951+Aditoo17@users.noreply.github.com> Date: Wed, 12 Dec 2018 16:52:53 +0100 Subject: [PATCH 06/11] L10n: Update Czech translation --- resources/lang/cs/site.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 resources/lang/cs/site.php diff --git a/resources/lang/cs/site.php b/resources/lang/cs/site.php new file mode 100644 index 000000000..f02ca5301 --- /dev/null +++ b/resources/lang/cs/site.php @@ -0,0 +1,16 @@ + 'O nás', + 'help' => 'Nápověda', + 'language' => 'Jazyk', + 'fediverse' => 'Fediverse', + 'opensource' => 'Otevřený zdroj', + 'terms' => 'Podmínky', + 'privacy' => 'Soukromí', + 'l10nWip' => 'Pořád pracujeme na podpoře lokalizace', + 'currentLocale' => 'Aktuální překlad', + 'selectLocale' => 'Vyberte si jeden z podporovaných překladů', + +]; From a5929584de51744c93d4257af010011bb48fd092 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 15 Dec 2018 22:20:01 -0700 Subject: [PATCH 07/11] Abstract presenter logic into separate components to reuse across timeline and post views --- resources/assets/js/components.js | 31 ++++++++++ .../presenter/MixedAlbumPresenter.vue | 56 +++++++++++++++++++ .../presenter/PhotoAlbumPresenter.vue | 40 +++++++++++++ .../components/presenter/PhotoPresenter.vue | 24 ++++++++ .../presenter/VideoAlbumPresenter.vue | 44 +++++++++++++++ .../components/presenter/VideoPresenter.vue | 26 +++++++++ 6 files changed, 221 insertions(+) create mode 100644 resources/assets/js/components/presenter/MixedAlbumPresenter.vue create mode 100644 resources/assets/js/components/presenter/PhotoAlbumPresenter.vue create mode 100644 resources/assets/js/components/presenter/PhotoPresenter.vue create mode 100644 resources/assets/js/components/presenter/VideoAlbumPresenter.vue create mode 100644 resources/assets/js/components/presenter/VideoPresenter.vue diff --git a/resources/assets/js/components.js b/resources/assets/js/components.js index 48ad4e922..e1cbe2415 100644 --- a/resources/assets/js/components.js +++ b/resources/assets/js/components.js @@ -58,6 +58,32 @@ require('./components/notifications'); // Initalize Notification Helper window.pixelfed.n = {}; +Vue.component( + 'photo-presenter', + require('./components/presenter/PhotoPresenter.vue') +); + +Vue.component( + 'video-presenter', + require('./components/presenter/VideoPresenter.vue') +); + +Vue.component( + 'photo-album-presenter', + require('./components/presenter/PhotoAlbumPresenter.vue') +); + +Vue.component( + 'video-album-presenter', + require('./components/presenter/VideoAlbumPresenter.vue') +); + + +Vue.component( + 'mixed-album-presenter', + require('./components/presenter/MixedAlbumPresenter.vue') +); + Vue.component( 'follow-suggestions', require('./components/FollowSuggestions.vue') @@ -88,6 +114,11 @@ Vue.component( require('./components/Timeline.vue') ); +// Vue.component( +// 'micro', +// require('./components/Micro.vue') +// ); + Vue.component( 'passport-clients', require('./components/passport/Clients.vue') diff --git a/resources/assets/js/components/presenter/MixedAlbumPresenter.vue b/resources/assets/js/components/presenter/MixedAlbumPresenter.vue new file mode 100644 index 000000000..d3d7bb3a8 --- /dev/null +++ b/resources/assets/js/components/presenter/MixedAlbumPresenter.vue @@ -0,0 +1,56 @@ + + + \ No newline at end of file diff --git a/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue b/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue new file mode 100644 index 000000000..4bf66f790 --- /dev/null +++ b/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue @@ -0,0 +1,40 @@ + + + \ No newline at end of file diff --git a/resources/assets/js/components/presenter/PhotoPresenter.vue b/resources/assets/js/components/presenter/PhotoPresenter.vue new file mode 100644 index 000000000..91ecfa534 --- /dev/null +++ b/resources/assets/js/components/presenter/PhotoPresenter.vue @@ -0,0 +1,24 @@ + + + \ No newline at end of file diff --git a/resources/assets/js/components/presenter/VideoAlbumPresenter.vue b/resources/assets/js/components/presenter/VideoAlbumPresenter.vue new file mode 100644 index 000000000..7dbb0201f --- /dev/null +++ b/resources/assets/js/components/presenter/VideoAlbumPresenter.vue @@ -0,0 +1,44 @@ + + + \ No newline at end of file diff --git a/resources/assets/js/components/presenter/VideoPresenter.vue b/resources/assets/js/components/presenter/VideoPresenter.vue new file mode 100644 index 000000000..0d0038ad4 --- /dev/null +++ b/resources/assets/js/components/presenter/VideoPresenter.vue @@ -0,0 +1,26 @@ + + + \ No newline at end of file From e0d50b15cdeb441a6300d55c8236e4cfd69d9b4e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 15 Dec 2018 22:21:32 -0700 Subject: [PATCH 08/11] Update Timeline.vue component, use presenter sub components --- resources/assets/js/components/Timeline.vue | 162 +------------------- 1 file changed, 6 insertions(+), 156 deletions(-) diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 201289e7f..a748442b1 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -35,168 +35,23 @@
-
-
- -

{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}

-

(click to show)

-
- - - -
-
-
-
- -
-
+
-
-
- -

{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}

-

(click to show)

-
-
- -
-
-
-
- -
+
-
-
- -

{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}

-

(click to show)

-
- - - - - -
-
-
- - - - - -
+
-
-
- -

{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}

-

(click to show)

-
- - - - - -
-
-
- - - - - -
+
-
-
- -

{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}

-

(click to show)

-
- - - - - - - -

Error: Problem rendering preview.

- -
-
-
-
-
- - - - - - - -

Error: Problem rendering preview.

- -
-
-
+
@@ -345,12 +200,7 @@ .postPresenterContainer { display: flex; align-items: center; - background: #000; - } - @media(min-width: 720px) { - .postPresenterContainer { - min-height: 600px; - } + background: #fff; } .cursor-pointer { cursor: pointer; From e54e8727d6283430170802892cfa006cf0bcd20e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 15 Dec 2018 22:25:00 -0700 Subject: [PATCH 09/11] Update PostComponent.vue --- .../assets/js/components/PostComponent.vue | 231 +++--------------- 1 file changed, 30 insertions(+), 201 deletions(-) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index 97bc943d0..c3b9f6258 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -10,10 +10,11 @@ .col-md-4 { background: #fff; } - +.postPresenterContainer { + background: #fff; +} @media(min-width: 720px) { .postPresenterContainer { - background: #000; min-height: 600px; } } @@ -57,8 +58,30 @@
-
+
+
+ +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+

Error: Problem rendering preview.

+
@@ -210,153 +233,6 @@ pixelfed.postComponent = {}; -pixelfed.presenter = { - show: { - image: function(container, media, status) { - $('.status-container') - .removeClass('orientation-unknown') - .addClass('orientation-' + media[0]['orientation']); - let wrapper = $('
'); - container.addClass('d-flex align-items-center'); - if(media[0]['filter_class']) { - wrapper.addClass(media[0]['filter_class']); - } - let el = $(''); - el.attr('src', media[0]['url']); - el.attr('title', media[0]['description']); - el.addClass('img-fluid'); - wrapper.append(el); - if(status.sensitive == true) { - let spoilerText = status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'; - let cw = $('
').addClass('details-animated w-100'); - let summary = $(''); - let text = $('

').addClass('mb-0 lead font-weight-bold').text(spoilerText); - let direction = $('

').addClass('font-weight-light').text('(click to show)'); - summary.append(text, direction); - cw.append(summary, wrapper); - container.append(cw); - } else { - container.append(wrapper); - } - }, - - video: function(container, media, status) { - let wrapper = $('

'); - container.addClass('d-flex align-items-center'); - let el = $('