judgels icon indicating copy to clipboard operation
judgels copied to clipboard

Support custom app logo

Open fushar opened this issue 1 year ago • 0 comments

Description

Support custom app logo in both admin and client interfaces.

Admin Client
image image

(Possible) Implementation Details

  • [ ] Add optional config logo in JudgelsAppConfiguration.

    public interface JudgelsAppConfiguration {
        String getName();
        Optional<String> getLogo();      <-- new config
    
  • [ ] Add the logo config to judgels-server.yml.example (commented out by default):

    judgels:
      baseDataDir: var/data
    
      app:
        name: Judgels
        # logo: var/conf/logo.png      <-- new config
    

Specific for admin interface

  • [ ] Implement a new GET /logo endpoint in Michael's IndexResource.
  • [ ] Point the logo image URL in admin interface to the above new endpoint.

Specific for client interface

  • [ ] Implement a new GET /api/v2/web/logo endpoint in Jophiel. Create a new web.WebResource resource, and implement the endpoint there. Implementation is similar to Michael's endpoint above.
  • [ ] Point the logo image URL in client interface AND favico to the above new endpoint (apiUrl + /logo)
  • [ ] Remove all existing images in judgels-client, because now we fetch the image from the server.

For deployment

  • [ ] Add optional app_logo: config in env-example/vars.yml (commented out by default).

    app_version: xxx
    app_name: xxx
    app_slogan: xxx
    app_title: xxx
    app_description: xxx
    # app_logo: var/conf/logo.png       <-- new config
    
  • [ ] Modify the ansible playbook so that if the config exists, it:

    • copies the file env/logo.png to var/conf/
    • adds the logo config to judgels-server.yml as explained above.

fushar avatar Jul 29 '23 07:07 fushar