mirror of
https://github.com/wekan/wekan.git
synced 2026-02-17 05:28:06 +01:00
Admin Panel/Settings/Layout, for PWA: Custom head meta, link, icons, assetlinks.json, site.webmanifest.
Thanks to xet7 !
This commit is contained in:
parent
dace6b78c0
commit
b5a13f0206
16 changed files with 1016 additions and 3 deletions
|
|
@ -1,4 +1,10 @@
|
|||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import {
|
||||
DEFAULT_ASSETLINKS,
|
||||
DEFAULT_HEAD_LINKS,
|
||||
DEFAULT_HEAD_META,
|
||||
DEFAULT_SITE_MANIFEST,
|
||||
} from '/imports/lib/customHeadDefaults';
|
||||
import { Blaze } from 'meteor/blaze';
|
||||
import { Session } from 'meteor/session';
|
||||
import {
|
||||
|
|
@ -42,6 +48,38 @@ Blaze.registerHelper('currentSetting', () => {
|
|||
return ret;
|
||||
});
|
||||
|
||||
Blaze.registerHelper('customHeadMetaTagsValue', () => {
|
||||
const setting = ReactiveCache.getCurrentSetting();
|
||||
if (setting && typeof setting.customHeadMetaTags === 'string') {
|
||||
return setting.customHeadMetaTags;
|
||||
}
|
||||
return DEFAULT_HEAD_META;
|
||||
});
|
||||
|
||||
Blaze.registerHelper('customHeadLinkTagsValue', () => {
|
||||
const setting = ReactiveCache.getCurrentSetting();
|
||||
if (setting && typeof setting.customHeadLinkTags === 'string') {
|
||||
return setting.customHeadLinkTags;
|
||||
}
|
||||
return DEFAULT_HEAD_LINKS;
|
||||
});
|
||||
|
||||
Blaze.registerHelper('customManifestContentValue', () => {
|
||||
const setting = ReactiveCache.getCurrentSetting();
|
||||
if (setting && typeof setting.customManifestContent === 'string') {
|
||||
return setting.customManifestContent;
|
||||
}
|
||||
return DEFAULT_SITE_MANIFEST;
|
||||
});
|
||||
|
||||
Blaze.registerHelper('customAssetLinksContentValue', () => {
|
||||
const setting = ReactiveCache.getCurrentSetting();
|
||||
if (setting && typeof setting.customAssetLinksContent === 'string') {
|
||||
return setting.customAssetLinksContent;
|
||||
}
|
||||
return DEFAULT_ASSETLINKS;
|
||||
});
|
||||
|
||||
Blaze.registerHelper('currentUser', () => {
|
||||
const ret = ReactiveCache.getCurrentUser();
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue