1
0
Fork 0

Update Timeline

This commit is contained in:
Daniel Supernault 2019-05-03 20:01:31 -06:00
parent f92b259232
commit 1b601a91b9
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
2 changed files with 47 additions and 4 deletions

View File

@ -220,10 +220,12 @@
<notification-card></notification-card> <notification-card></notification-card>
</div> </div>
<div v-show="suggestions.length && config.ab && config.ab.rec == true" class="mb-4"> <div v-show="showSuggestions == true && suggestions.length && config.ab && config.ab.rec == true" class="mb-4">
<div class="card"> <div class="card">
<div class="card-header bg-white text-center"> <div class="card-header bg-white d-flex align-items-center justify-content-between">
<div></div>
<div class="small text-dark text-uppercase font-weight-bold">Suggestions</div> <div class="small text-dark text-uppercase font-weight-bold">Suggestions</div>
<div class="small text-muted cursor-pointer" v-on:click="hideSuggestions"><i class="fas fa-times"></i></div>
</div> </div>
<div class="card-body pt-0"> <div class="card-body pt-0">
<div v-for="(rec, index) in suggestions" class="media align-items-center mt-3"> <div v-for="(rec, index) in suggestions" class="media align-items-center mt-3">
@ -386,7 +388,8 @@
following: [], following: [],
followingCursor: 1, followingCursor: 1,
followingMore: true, followingMore: true,
lightboxMedia: false lightboxMedia: false,
showSuggestions: false
} }
}, },
@ -406,6 +409,12 @@
this.modes.dark = true; this.modes.dark = true;
} }
if(localStorage.getItem('pf_metro_ui.exp.rec') == 'false') {
this.showSuggestions = false;
} else {
this.showSuggestions = true;
}
this.$nextTick(function () { this.$nextTick(function () {
$('[data-toggle="tooltip"]').tooltip() $('[data-toggle="tooltip"]').tooltip()
}); });
@ -1006,6 +1015,11 @@
ownerOrAdmin(status) { ownerOrAdmin(status) {
return this.owner(status) || this.admin(); return this.owner(status) || this.admin();
},
hideSuggestions() {
localStorage.setItem('pf_metro_ui.exp.rec', false);
this.showSuggestions = false;
} }
} }
} }

View File

@ -38,6 +38,15 @@
</label> </label>
<p class="text-muted small help-text">Use dark mode theme.</p> <p class="text-muted small help-text">Use dark mode theme.</p>
</div> </div>
@if(config('exp.rec') == true)
<div class="form-check pb-3">
<input class="form-check-input" type="checkbox" name="show_suggestions" id="show_suggestions">
<label class="form-check-label font-weight-bold" for="show_suggestions">
{{__('Profile Suggestions')}}
</label>
<p class="text-muted small help-text">Show Profile Suggestions</p>
</div>
@endif
<div class="py-3"> <div class="py-3">
<p class="font-weight-bold text-muted text-center">Discovery</p> <p class="font-weight-bold text-muted text-center">Discovery</p>
<hr> <hr>
@ -59,3 +68,23 @@
</div> </div>
</form> </form>
@endsection @endsection
@push('scripts')
<script type="text/javascript">
$(document).ready(function() {
let showSuggestions = localStorage.getItem('pf_metro_ui.exp.rec') == 'false' ? false : true;
if(showSuggestions == true) {
$('#show_suggestions').attr('checked', true);
}
$('#show_suggestions').on('change', function(e) {
if(e.target.checked) {
localStorage.removeItem('pf_metro_ui.exp.rec');
} else {
localStorage.setItem('pf_metro_ui.exp.rec', false);
}
})
});
</script>
@endpush