mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-04-30 13:11:37 +03:00
+ client: add isVersionGreater helper
This commit is contained in:
parent
0a26ee4224
commit
59a635f3f2
3 changed files with 9 additions and 5 deletions
client/src/helpers
|
@ -7,6 +7,7 @@ import subDays from 'date-fns/sub_days';
|
|||
import round from 'lodash/round';
|
||||
import axios from 'axios';
|
||||
import i18n from 'i18next';
|
||||
import versionCompare from './versionCompare';
|
||||
|
||||
import {
|
||||
STANDARD_DNS_PORT,
|
||||
|
@ -279,3 +280,7 @@ export const secondsToMilliseconds = (seconds) => {
|
|||
};
|
||||
|
||||
export const normalizeRulesTextarea = text => text && text.replace(/^\n/g, '').replace(/\n\s*\n/g, '\n');
|
||||
|
||||
export const isVersionGreater = (currentVersion, previousVersion) => (
|
||||
versionCompare(currentVersion, previousVersion) === -1
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue