parent
31b19725b7
commit
d1d4839a09
@ -14,6 +14,7 @@
|
||||
- [VIF] Ability for admins to set any allowed IPs, including IPv6 and IPs that are not in an IP pool [#2535](https://github.com/vatesfr/xen-orchestra/issues/2535) [#1872](https://github.com/vatesfr/xen-orchestra/issues/1872) (PR [#5367](https://github.com/vatesfr/xen-orchestra/pull/5367))
|
||||
- [Proxy] Ability to restore a file from VM backup (PR [#5359](https://github.com/vatesfr/xen-orchestra/pull/5359))
|
||||
- [Web Hooks] `backupNg.runJob` is now triggered by scheduled runs [#5205](https://github.com/vatesfr/xen-orchestra/issues/5205) (PR [#5360](https://github.com/vatesfr/xen-orchestra/pull/5360))
|
||||
- [Licensing] Add trial end information banner (PR [#5374](https://github.com/vatesfr/xen-orchestra/pull/5374))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -2303,6 +2303,8 @@ const messages = {
|
||||
starterLicense: 'Starter license',
|
||||
enterpriseLicense: 'Enterprise license',
|
||||
premiumLicense: 'Premium license',
|
||||
trialLicenseInfo:
|
||||
'You are currently in a {edition} trial period that will end on {date, date, medium}',
|
||||
|
||||
// ----- proxies -----
|
||||
forgetProxyApplianceTitle: 'Forget prox{n, plural, one {y} other {ies}}',
|
||||
|
@ -9,9 +9,10 @@ import React from 'react'
|
||||
import Shortcuts from 'shortcuts'
|
||||
import themes from 'themes'
|
||||
import _, { IntlProvider } from 'intl'
|
||||
import { blockXoaAccess } from 'xoa-updater'
|
||||
import { blockXoaAccess, isTrialRunning } from 'xoa-updater'
|
||||
import { connectStore, getXoaPlan, routes } from 'utils'
|
||||
import { Notification } from 'notification'
|
||||
import { productId2Plan } from 'xoa-plans'
|
||||
import { ShortcutManager } from 'react-shortcuts'
|
||||
import { ThemeProvider } from 'styled-components'
|
||||
import { TooltipViewer } from 'tooltip'
|
||||
@ -124,6 +125,7 @@ export default class XoApp extends Component {
|
||||
|
||||
state = {
|
||||
dismissedSourceBanner: Boolean(cookies.get('dismissedSourceBanner')),
|
||||
dismissedTrialBanner: Boolean(cookies.get('dismissedTrialBanner')),
|
||||
}
|
||||
|
||||
displayOpenSourceDisclaimer() {
|
||||
@ -153,6 +155,11 @@ export default class XoApp extends Component {
|
||||
this.setState({ dismissedSourceBanner: true })
|
||||
}
|
||||
|
||||
dismissTrialBanner = () => {
|
||||
cookies.set('dismissedTrialBanner', true, { expires: 1 })
|
||||
this.setState({ dismissedTrialBanner: true })
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.refs.bodyWrapper.style.minHeight = this.refs.menu.getWrappedInstance().height + 'px'
|
||||
if (+process.env.XOA_PLAN === 5) {
|
||||
@ -259,6 +266,17 @@ export default class XoApp extends Component {
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
{isTrialRunning(trial.trial) && !this.state.dismissedTrialBanner && (
|
||||
<div className='alert alert-info mb-0'>
|
||||
{_('trialLicenseInfo', {
|
||||
edition: getXoaPlan(productId2Plan[trial.trial.productId]),
|
||||
date: new Date(trial.trial.end),
|
||||
})}
|
||||
<button className='close' onClick={this.dismissTrialBanner}>
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
<div style={CONTAINER_STYLE}>
|
||||
<Shortcuts
|
||||
name='XoApp'
|
||||
|
Loading…
Reference in New Issue
Block a user