Giter VIP home page Giter VIP logo

Comments (3)

joffrey-bion avatar joffrey-bion commented on July 3, 2024

Interesting proposal. I guess that would be possible if I moved this constant out of the UI (because at the moment it's part of the generated JS, and JavaScript cannot read files because it's in the browser).

At the moment the server is flexible and asks for the bot name in API calls, just like a regular player name. Putting a list of names in the UI was a very quick and easy implementation but technically the server could provide the names as a default if no name is provided when making the call. This way the list could be a replaceable resource file.

from seven-wonders.

bgstack15 avatar bgstack15 commented on July 3, 2024

So I couldn't even just replace this one file in the docker container and get immediate updates, because it's compiled/generated/something, as it is presently implemented?

from seven-wonders.

joffrey-bion avatar joffrey-bion commented on July 3, 2024

At the moment, the whole UI is compiled to JavaScript (from Kotlin), and currently the tooling can only create one big JS file (sw-ui.js) with all the JS code, so you don't have the granularity of the original Kotlin sources.

This JS file is served by the server as a resource, so it is packaged in the jar at BOOT-INF/classes/static/sw-ui.js. So technically you could already modify this file by looking for the list and replacing the names (or adding names), but that's a bit tedious for you. It would be nicer if I made a change so the names are easier to override.

from seven-wonders.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.