mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02:00
commit
82f2e5ec2e
9 changed files with 51 additions and 28 deletions
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/timeline.js
vendored
2
public/js/timeline.js
vendored
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@
|
||||||
"/js/vendor.js": "/js/vendor.js?id=d2e140b2d43a9b4d085d",
|
"/js/vendor.js": "/js/vendor.js?id=d2e140b2d43a9b4d085d",
|
||||||
"/js/ace.js": "/js/ace.js?id=a575b37c2085b5003666",
|
"/js/ace.js": "/js/ace.js?id=a575b37c2085b5003666",
|
||||||
"/js/activity.js": "/js/activity.js?id=028cbbe598f925bb3414",
|
"/js/activity.js": "/js/activity.js?id=028cbbe598f925bb3414",
|
||||||
"/js/app.js": "/js/app.js?id=4d381018bf6754a22602",
|
"/js/app.js": "/js/app.js?id=360dc653e947aa970981",
|
||||||
"/css/app.css": "/css/app.css?id=293968cda6f2d640178a",
|
"/css/app.css": "/css/app.css?id=293968cda6f2d640178a",
|
||||||
"/css/appdark.css": "/css/appdark.css?id=cc58358d958b0496f87e",
|
"/css/appdark.css": "/css/appdark.css?id=cc58358d958b0496f87e",
|
||||||
"/css/landing.css": "/css/landing.css?id=9af4c611557edf0f7e31",
|
"/css/landing.css": "/css/landing.css?id=9af4c611557edf0f7e31",
|
||||||
|
@ -24,5 +24,5 @@
|
||||||
"/js/search.js": "/js/search.js?id=22e8bccee621e57963d9",
|
"/js/search.js": "/js/search.js?id=22e8bccee621e57963d9",
|
||||||
"/js/status.js": "/js/status.js?id=11f714d45fa9163b5346",
|
"/js/status.js": "/js/status.js?id=11f714d45fa9163b5346",
|
||||||
"/js/theme-monokai.js": "/js/theme-monokai.js?id=68116b72a65e5437af52",
|
"/js/theme-monokai.js": "/js/theme-monokai.js?id=68116b72a65e5437af52",
|
||||||
"/js/timeline.js": "/js/timeline.js?id=95639ac63dcbfdae97d5"
|
"/js/timeline.js": "/js/timeline.js?id=1360934527079b965055"
|
||||||
}
|
}
|
||||||
|
|
26
resources/assets/js/app.js
vendored
26
resources/assets/js/app.js
vendored
|
@ -33,6 +33,32 @@ window.App.boot = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
window.App.util = {
|
window.App.util = {
|
||||||
|
compose: {
|
||||||
|
post: (function() {
|
||||||
|
let path = window.location.pathname;
|
||||||
|
let whitelist = [
|
||||||
|
'/',
|
||||||
|
'/timeline/public'
|
||||||
|
];
|
||||||
|
if(whitelist.includes(path)) {
|
||||||
|
$('#composeModal').modal('show');
|
||||||
|
} else {
|
||||||
|
window.location.href = '/?a=co';
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
circle: (function() {
|
||||||
|
console.log('Unsupported method.');
|
||||||
|
}),
|
||||||
|
collection: (function() {
|
||||||
|
console.log('Unsupported method.');
|
||||||
|
}),
|
||||||
|
loop: (function() {
|
||||||
|
console.log('Unsupported method.');
|
||||||
|
}),
|
||||||
|
story: (function() {
|
||||||
|
console.log('Unsupported method.');
|
||||||
|
}),
|
||||||
|
},
|
||||||
time: (function() {
|
time: (function() {
|
||||||
return new Date;
|
return new Date;
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
<div class="card-header bg-white">
|
<div class="card-header bg-white">
|
||||||
<p class="mb-0 d-flex align-items-center justify-content-between">
|
<p class="mb-0 d-flex align-items-center justify-content-between">
|
||||||
<span><i class="far fa-bell fa-lg text-white"></i></span>
|
<span><i class="far fa-bell fa-lg text-white"></i></span>
|
||||||
<span class="small text-dark text-uppercase font-weight-bold">Notifications</span>
|
<span class="small text-dark text-uppercase font-weight-bold">Alerts</span>
|
||||||
<a class="text-decoration-none text-muted" href="/account/activity"><i class="fas fa-inbox fa-lg"></i></a>
|
<a class="text-decoration-none text-muted" href="/account/activity"><i class="fas fa-inbox fa-lg"></i></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body loader text-center" style="height: 230px;">
|
<div class="card-body loader text-center" style="height: 200px;">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
<span class="sr-only">Loading...</span>
|
<span class="sr-only">Loading...</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body pt-2 px-0 py-0 contents" style="max-height: 230px; overflow-y: scroll;">
|
<div class="card-body pt-2 px-0 py-0 contents" style="max-height: 200px; overflow-y: scroll;">
|
||||||
<div v-if="notifications.length > 0" class="media align-items-center px-3 py-2 border-bottom border-light" v-for="(n, index) in notifications">
|
<div v-if="notifications.length > 0" class="media align-items-center px-3 py-2 border-bottom border-light" v-for="(n, index) in notifications">
|
||||||
<img class="mr-2 rounded-circle" style="border:1px solid #ccc" :src="n.account.avatar" alt="" width="32px" height="32px" onerror="this.onerror=null;this.src='/storage/avatars/default.png';">
|
<img class="mr-2 rounded-circle" style="border:1px solid #ccc" :src="n.account.avatar" alt="" width="32px" height="32px" onerror="this.onerror=null;this.src='/storage/avatars/default.png';">
|
||||||
<div class="media-body font-weight-light small">
|
<div class="media-body font-weight-light small">
|
||||||
|
|
|
@ -280,6 +280,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-4">
|
||||||
|
<a class="btn btn-light btn-block btn-sm font-weight-bold text-dark mb-3 border" href="/i/compose" data-toggle="modal" data-target="#composeModal"><i class="far fa-plus-square pr-3 fa-lg pt-1"></i> Compose Post</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="showTips" class="mb-4 card-tips">
|
<div v-if="showTips" class="mb-4 card-tips">
|
||||||
<div class="card border shadow-none mb-3" style="max-width: 18rem;">
|
<div class="card border shadow-none mb-3" style="max-width: 18rem;">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
@ -561,6 +565,7 @@
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
this.fetchProfile();
|
this.fetchProfile();
|
||||||
this.fetchTimelineApi();
|
this.fetchTimelineApi();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -591,7 +596,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
$('[data-toggle="tooltip"]').tooltip()
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
let u = new URLSearchParams(window.location.search);
|
||||||
|
if(u.has('a') && u.get('a') == 'co') {
|
||||||
|
$('#composeModal').modal('show');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
'search' => 'Search',
|
'search' => 'Search',
|
||||||
'home' => 'Home',
|
'home' => 'Home',
|
||||||
'local' => 'Local',
|
'local' => 'Local',
|
||||||
|
@ -16,5 +15,5 @@ return [
|
||||||
'admin' => 'Admin',
|
'admin' => 'Admin',
|
||||||
'logout' => 'Logout',
|
'logout' => 'Logout',
|
||||||
'directMessages' => 'Direct Messages',
|
'directMessages' => 'Direct Messages',
|
||||||
|
'composePost' => 'Compose Post',
|
||||||
];
|
];
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<a class="nav-link {{request()->is('discover')?'text-dark':'text-lighter'}}" href="/discover"><i class="fas fa-search fa-lg"></i></a>
|
<a class="nav-link {{request()->is('discover')?'text-dark':'text-lighter'}}" href="/discover"><i class="fas fa-search fa-lg"></i></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<div class="nav-link text-lighter cursor-pointer" data-toggle="modal" data-target="#composeModal"><i class="fas fa-camera fa-lg"></i></div>
|
<div class="nav-link text-lighter cursor-pointer" onclick="App.util.compose.post()"><i class="fas fa-camera fa-lg"></i></div>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link {{request()->is('account/activity')?'text-dark':'text-lighter'}}" href="/account/activity"><i class="far fa-heart fa-lg"></i></a>
|
<a class="nav-link {{request()->is('account/activity')?'text-dark':'text-lighter'}}" href="/account/activity"><i class="far fa-heart fa-lg"></i></a>
|
||||||
|
|
|
@ -47,26 +47,21 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-none d-md-block">
|
|
||||||
<li class="nav-item px-md-2">
|
|
||||||
<div title="Create new post" data-toggle="tooltip" data-placement="bottom">
|
|
||||||
<a href="{{route('compose')}}" class="nav-link" data-toggle="modal" data-target="#composeModal">
|
|
||||||
<i class="fas fa-camera-retro fa-lg text-muted"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</div>
|
|
||||||
<li class="nav-item dropdown ml-2">
|
<li class="nav-item dropdown ml-2">
|
||||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="User Menu" data-toggle="tooltip" data-placement="bottom">
|
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="User Menu" data-toggle="tooltip" data-placement="bottom">
|
||||||
<i class="far fa-user fa-lg text-muted"></i>
|
<i class="far fa-user fa-lg text-muted"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
||||||
|
<div class="dropdown-item font-weight-bold cursor-pointer" onclick="App.util.compose.post()">
|
||||||
|
<span class="fas fa-camera-retro pr-1"></span>
|
||||||
|
{{__('navmenu.composePost')}}
|
||||||
|
</div>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item font-weight-bold" href="/i/me">
|
<a class="dropdown-item font-weight-bold" href="/i/me">
|
||||||
<span class="far fa-user pr-1"></span>
|
<span class="far fa-user pr-1"></span>
|
||||||
{{__('navmenu.myProfile')}}
|
{{__('navmenu.myProfile')}}
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="d-block d-md-none dropdown-item font-weight-bold" href="{{route('discover')}}">
|
<a class="d-block d-md-none dropdown-item font-weight-bold" href="{{route('discover')}}">
|
||||||
<span class="far fa-compass pr-1"></span>
|
<span class="far fa-compass pr-1"></span>
|
||||||
{{__('navmenu.discover')}}
|
{{__('navmenu.discover')}}
|
||||||
|
@ -75,16 +70,10 @@
|
||||||
<span class="far fa-bell pr-1"></span>
|
<span class="far fa-bell pr-1"></span>
|
||||||
Notifications
|
Notifications
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item font-weight-bold" href="{{route('timeline.personal')}}">
|
|
||||||
<span class="fas fa-home pr-1"></span>
|
|
||||||
{{__('navmenu.myTimeline')}}
|
|
||||||
</a>
|
|
||||||
<a class="dropdown-item font-weight-bold" href="{{route('timeline.public')}}">
|
<a class="dropdown-item font-weight-bold" href="{{route('timeline.public')}}">
|
||||||
<span class="far fa-map pr-1"></span>
|
<span class="far fa-map pr-1"></span>
|
||||||
{{__('navmenu.publicTimeline')}}
|
{{__('navmenu.publicTimeline')}}
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item font-weight-bold" href="{{route('settings')}}">
|
<a class="dropdown-item font-weight-bold" href="{{route('settings')}}">
|
||||||
<span class="fas fa-cog pr-1"></span>
|
<span class="fas fa-cog pr-1"></span>
|
||||||
{{__('navmenu.settings')}}
|
{{__('navmenu.settings')}}
|
||||||
|
@ -94,8 +83,8 @@
|
||||||
<span class="fas fa-cogs pr-1"></span>
|
<span class="fas fa-cogs pr-1"></span>
|
||||||
{{__('navmenu.admin')}}
|
{{__('navmenu.admin')}}
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
@endif
|
@endif
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item font-weight-bold" href="{{ route('logout') }}"
|
<a class="dropdown-item font-weight-bold" href="{{ route('logout') }}"
|
||||||
onclick="event.preventDefault();
|
onclick="event.preventDefault();
|
||||||
document.getElementById('logout-form').submit();">
|
document.getElementById('logout-form').submit();">
|
||||||
|
|
Loading…
Add table
Reference in a new issue