mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add package.json name and version as defines to avoid importing the package.json in code
This commit is contained in:
parent
a34fbadaab
commit
facbda4f2f
6 changed files with 13 additions and 10 deletions
|
@ -1,4 +1,3 @@
|
|||
import Package from '../../package.json';
|
||||
import appSettings from '../scripts/settings/appSettings';
|
||||
import browser from '../scripts/browser';
|
||||
import Events from '../utils/events.ts';
|
||||
|
@ -36,7 +35,7 @@ function getDeviceProfile(item) {
|
|||
let profile;
|
||||
|
||||
if (window.NativeShell) {
|
||||
profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, Package.version);
|
||||
profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, __PACKAGE_JSON_VERSION__);
|
||||
} else {
|
||||
const builderOpts = getBaseProfileOptions(item);
|
||||
profile = profileBuilder(builderOpts);
|
||||
|
@ -378,7 +377,7 @@ export const appHost = {
|
|||
},
|
||||
appVersion: function () {
|
||||
return window.NativeShell?.AppHost?.appVersion ?
|
||||
window.NativeShell.AppHost.appVersion() : Package.version;
|
||||
window.NativeShell.AppHost.appVersion() : __PACKAGE_JSON_VERSION__;
|
||||
},
|
||||
getPushTokenInfo: function () {
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue