diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-16 11:33:22 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 6702a1b2ccd666285dee9c72b5bace641d2fce8b (patch) | |
tree | 78b7125d664b6f6b6c993c4e8483e1bdd24a0a30 /client/src/app/shared | |
parent | 503c6f440abc8f5924c38c4bd63591cb6cefacec (diff) | |
download | PeerTube-6702a1b2ccd666285dee9c72b5bace641d2fce8b.tar.gz PeerTube-6702a1b2ccd666285dee9c72b5bace641d2fce8b.tar.zst PeerTube-6702a1b2ccd666285dee9c72b5bace641d2fce8b.zip |
Add ability to search available plugins
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/images/global-icon.component.ts | 1 | ||||
-rw-r--r-- | client/src/app/shared/misc/utils.ts | 18 |
2 files changed, 1 insertions, 18 deletions
diff --git a/client/src/app/shared/images/global-icon.component.ts b/client/src/app/shared/images/global-icon.component.ts index 5a3db4531..5b525dec1 100644 --- a/client/src/app/shared/images/global-icon.component.ts +++ b/client/src/app/shared/images/global-icon.component.ts | |||
@@ -45,6 +45,7 @@ const icons = { | |||
45 | 'administration': require('../../../assets/images/menu/administration.html'), | 45 | 'administration': require('../../../assets/images/menu/administration.html'), |
46 | 'subscriptions': require('../../../assets/images/menu/subscriptions.html'), | 46 | 'subscriptions': require('../../../assets/images/menu/subscriptions.html'), |
47 | 'users': require('../../../assets/images/global/users.html'), | 47 | 'users': require('../../../assets/images/global/users.html'), |
48 | 'search': require('../../../assets/images/global/search.html'), | ||
48 | 'refresh': require('../../../assets/images/global/refresh.html') | 49 | 'refresh': require('../../../assets/images/global/refresh.html') |
49 | } | 50 | } |
50 | 51 | ||
diff --git a/client/src/app/shared/misc/utils.ts b/client/src/app/shared/misc/utils.ts index 098496d45..85fc1c3a0 100644 --- a/client/src/app/shared/misc/utils.ts +++ b/client/src/app/shared/misc/utils.ts | |||
@@ -134,23 +134,6 @@ function scrollToTop () { | |||
134 | window.scroll(0, 0) | 134 | window.scroll(0, 0) |
135 | } | 135 | } |
136 | 136 | ||
137 | // Thanks https://stackoverflow.com/a/16187766 | ||
138 | function compareSemVer (a: string, b: string) { | ||
139 | const regExStrip0 = /(\.0+)+$/ | ||
140 | const segmentsA = a.replace(regExStrip0, '').split('.') | ||
141 | const segmentsB = b.replace(regExStrip0, '').split('.') | ||
142 | |||
143 | const l = Math.min(segmentsA.length, segmentsB.length) | ||
144 | |||
145 | for (let i = 0; i < l; i++) { | ||
146 | const diff = parseInt(segmentsA[ i ], 10) - parseInt(segmentsB[ i ], 10) | ||
147 | |||
148 | if (diff) return diff | ||
149 | } | ||
150 | |||
151 | return segmentsA.length - segmentsB.length | ||
152 | } | ||
153 | |||
154 | export { | 137 | export { |
155 | sortBy, | 138 | sortBy, |
156 | durationToString, | 139 | durationToString, |
@@ -161,7 +144,6 @@ export { | |||
161 | getAbsoluteAPIUrl, | 144 | getAbsoluteAPIUrl, |
162 | dateToHuman, | 145 | dateToHuman, |
163 | immutableAssign, | 146 | immutableAssign, |
164 | compareSemVer, | ||
165 | objectToFormData, | 147 | objectToFormData, |
166 | objectLineFeedToHtml, | 148 | objectLineFeedToHtml, |
167 | removeElementFromArray, | 149 | removeElementFromArray, |