Merge branch 'dev' of /home/macgirvin/z into dev

This commit is contained in:
nobody 2021-08-23 00:11:17 -07:00
commit a6c0c3f580
18 changed files with 30 additions and 12 deletions

View file

@ -50,6 +50,9 @@ This project provides permission control and moderation of comments. By default
'until=2001-01-01T00:00Z' - comments are closed after the date given. This can be supplied on its own or appended to any other commentPolicy string by preceding with a space; for example 'contacts until=2001-01-01T00:00Z'.
Expiring content
Activity objects may include an 'expires' field; after which time they are removed. The removal occurs with a federated Delete, but this is a best faith effort. We automatically delete any local objects we receive with an 'exires' field after it expires regardless of whether or not we receive a Delete activity. We also record external (3rd party) fetches of these items and send Delete activities to them as well. The expiration is specified as an ISO8601 date/time.
Private Media

9
ServiceWorker.js Normal file
View file

@ -0,0 +1,9 @@
// This file should be served from the web root to avoid scope and cookie related issues with some browsers
self.addEventListener('install', function(e) {
console.log('install event');
});
self.addEventListener('fetch', function(e) {
// nothing here yet
return;
});

View file

@ -13,11 +13,13 @@ class Manifest extends Controller {
'name' => System::get_platform_name(),
'short_name' => System::get_platform_name(),
'icons' => [
[ 'src' => System::get_project_icon(), 'sizes' => '64x64' ],
[ 'src' => '/images/' . System::get_platform_name() . '.svg', 'sizes' => '192x192' ],
[ 'src' => '/images/' . System::get_platform_name() . '-64' . '.png', 'sizes' => '64x64' ],
[ 'src' => '/images/' . System::get_platform_name() . '-192' . '.png', 'sizes' => '192x192' ],
[ 'src' => '/images/' . System::get_platform_name() . '-512' . '.png', 'sizes' => '512x512' ],
[ 'src' => '/images/' . System::get_platform_name() . '.svg', 'sizes' => '600x600' ],
],
'scope' => '/',
'start_url' => '/',
'start_url' => z_root(),
'display' => 'fullscreen',
'orientation' => 'any',
'theme_color' => 'blue',
@ -30,7 +32,11 @@ class Manifest extends Controller {
'title' => 'title',
'text' => 'body',
'url' => 'url',
'files' => [ 'name' => 'userfile', 'accept' => '*' ],
'files' => [
[ 'name' => 'userfile',
'accept' => [ 'image/*', 'audio/*', 'video/*', 'text/*', 'application/*' ]
]
]
]
]

View file

@ -72,11 +72,12 @@ class Rpost extends Controller {
if (local_channel() && array_key_exists('userfile',$_FILES)) {
$channel = App::get_channel();
$observer = App::get_observer();
$def_album = get_pconfig($channel['channel_id'],'system','photo_path');
$def_attach = get_pconfig($channel['channel_id'],'system','attach_path');
$r = attach_store($channel, '', '', [
$r = attach_store($channel, (($observer) ? $observer['xchan_hash'] : ''), '', [
'source' => 'editor',
'visible' => 0,
'album' => $def_album,

View file

@ -1151,7 +1151,6 @@ class App {
head_add_link( [ 'rel' => 'manifest', 'href' => z_root() . '/manifest.webmanifest' ] );
self::$meta->set('application-name', System::get_platform_name() );
self::$meta->set('generator', System::get_platform_name());
$i = head_get_icon();

BIN
images/mistpark-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
images/mistpark-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
images/osada-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
images/osada-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
images/redmatrix-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/redmatrix-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
images/roadhouse-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
images/roadhouse-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
images/zap-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
images/zap-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View file

@ -35,8 +35,11 @@ $.ajaxPrefilter(function( options, original_Options, jqXHR ) {
});
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/view/js/sw.js');
console.log('service worker registered.');
navigator.serviceWorker.register('/ServiceWorker.js', { scope: '/' }).then(function(registration) {
console.log('Service worker registered. scope is', registration.scope);
}).catch(function(error) {
console.log('Service worker registration failed because ' + error);
});
}
// Clear the session and local storage if we switch channel or log out

View file

@ -1,3 +0,0 @@
self.addEventListener('install', (e) => {
console.log('install event');
});