Skip to content
  • Philipp Schaffrath's avatar
    Filetype icons from themes (#26805) · 2e9d4521
    Philipp Schaffrath authored
    * corrected comment
    
    * provide information about the current enabled theme and save it in OC.currentTheme
    
    * *wip*: refactor mimeType icon render process, implement theme-app support
    
    * extracted alias logic into separate method, use core icons if theme has no icon
    
    * extracted comments into readme.md file, that way we don't need to filter them out in our code
    
    * make sure an app-theme uses the app name as its own name
    
    * refactored code, added methods to get filetype icons by directory and get legacy and app theme information
    
    * use the new OC.MimeTypeList.themes object which has icons
    
    * adding directory and icons was unnecessary since js gets the theme directory from the active theme itself
    
    * test app themes get app name as theme name, test theme name setter
    
    * added OC.getRootPath since it might be necessary for some special configurations (and tests suggest this)
    
    * mimetypes now use OC.currentTheme which contains both the name and the directory of the active theme
    also replaced deprecated webroot with getRootPath()
    
    * updated mimetypelist to the latest generated one, since the one in the repository was missing the example theme, an alias and had an error in its comment above
    
    * fixed type annotation
    
    * removed redundant wording, improved grammatic
    
    * return 1 and print error message if file could not be written
    2e9d4521