mirror of https://github.com/halo-dev/halo
Refactor ThemeService
parent
9f41562620
commit
cc1dcc3ffa
|
@ -25,14 +25,13 @@ import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
public class ThemeServiceImpl implements ThemeService {
|
public class ThemeServiceImpl implements ThemeService {
|
||||||
|
|
||||||
|
private static String[] CAN_EDIT_SUFFIX = {"ftl", "css", "js"};
|
||||||
private final HaloProperties haloProperties;
|
private final HaloProperties haloProperties;
|
||||||
|
|
||||||
public ThemeServiceImpl(HaloProperties haloProperties) {
|
public ThemeServiceImpl(HaloProperties haloProperties) {
|
||||||
this.haloProperties = haloProperties;
|
this.haloProperties = haloProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String[] CAN_EDIT_SUFFIX = {"ftl", "css", "js"};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all themes
|
* Gets all themes
|
||||||
*
|
*
|
||||||
|
@ -106,6 +105,7 @@ public class ThemeServiceImpl implements ThemeService {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException("Failed to get theme template", e);
|
throw new RuntimeException("Failed to get theme template", e);
|
||||||
}
|
}
|
||||||
|
templates.sort(Comparator.comparing(ThemeFile::getIsFile));
|
||||||
return templates;
|
return templates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue