Studio: more work on studio

This commit is contained in:
Pieter Vander Vennet 2023-10-07 03:07:32 +02:00
parent 81876fc5ed
commit 4e8dfc0026
20 changed files with 1842 additions and 94 deletions

View file

@ -11,7 +11,12 @@ export default class IconValidator extends Validator {
super("icon", "Makes sure that a valid .svg-path is added")
}
reformat(s: string, _?: () => string): string {
return s.trim()
}
getFeedback(s: string, getCountry, sloppy?: boolean): Translation | undefined {
s = this.reformat(s)
if (!s.startsWith("http")) {
if (!IconValidator.allLicenses.has(s)) {
const close = sloppy