Skip to content

Commit

Permalink
💄 Tags icon on Search and tag page results 🐛 Create link then archive…
Browse files Browse the repository at this point in the history
… it (issue #23)
  • Loading branch information
MarceauKa committed Oct 21, 2019
1 parent be95f16 commit f35a8b3
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/Http/Resources/PostResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function toArray($request)
}

return array_merge($content, [
'id' => $this->postable->id,
'tags' => $this->tags->pluck('name')->toArray(),
'is_private' => $this->is_private,
'created_at' => $this->created_at,
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@

- Password generator with more options
- Better JS dependencies extraction for lighter builds
- Tags icon on Search and tag page results

## Fixed

- Create link then archive it (issue #23)
- DatabaseSeeder for youtube link

# 1.2.19
Expand Down
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/js/app.js": "/js/app.js?id=c3f371e0fc8513327ece",
"/js/app.js": "/js/app.js?id=78b57554587bc36eddde",
"/css/app.css": "/css/app.css?id=076c4b4fab9ab74f3edc",
"/js/manifest.js": "/js/manifest.js?id=3c768977c2574a34506e",
"/js/vendor.js": "/js/vendor.js?id=24c264fe7e2a39bcb572"
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/LinkForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default {
}
if (redirectToArchive === true) {
window.location = `/link/archive/${response.data.id}`;
window.location = `/link/archive/${response.data.post.id}`;
}
}).catch(error => {
this.loading = false;
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="list-group-item"
v-if="hasTagsResults"
>
Tags :
<div><i class="fas fa-tags"></i> {{ __('Tags') }}</div>
<div>
<a v-for="result in results.tags"
class="btn btn-primary btn-sm mr-1"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/tag.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="col-12">
<div class="card-columns column-{{ $columns_count }} {{ $compact ? 'compact' : '' }}">
<div class="card">
<div class="card-header">{{ __('Tag') }} &mdash; {{ $tag->name }}</div>
<div class="card-header"><i class="fas fa-tags"></i> {{ __('Tag') }} &mdash; {{ $tag->name }}</div>
<div class="card-body">
{{ $posts->total() }} {{ Str::plural('élément', $posts->total()) }}
</div>
Expand Down

0 comments on commit f35a8b3

Please sign in to comment.