1
0

Basic implementation for files app

This commit is contained in:
2022-05-06 23:01:23 +02:00
parent 4e12f4805e
commit 7d6c6c6321
54 changed files with 2381 additions and 94 deletions

View File

@@ -0,0 +1,43 @@
package de.nbscloud.webcontainer.shared.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.ui.Model;
@Configuration
@ConfigurationProperties(prefix = "nbs-cloud.web-container.shared")
@PropertySource("classpath:/config/shared-application.properties")
public class WebContainerSharedConfig {
private String version;
private boolean darkMode;
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public boolean isDarkMode() {
return darkMode;
}
public void setDarkMode(boolean darkMode) {
this.darkMode = darkMode;
}
public void addDefaults(Model model) {
addDarkMode(model);
addVersionAttribute(model);
}
private final void addVersionAttribute(Model model) {
model.addAttribute("nbsVersion", this.version);
}
private final void addDarkMode(Model model) {
model.addAttribute("darkMode", this.darkMode);
}
}

View File

@@ -0,0 +1,10 @@
spring.profiles.active=@activeProfiles@
info.app.name=NoBullShit Cloud - web container config
info.app.description=Config for web projects
nbs-cloud.web-container.shared.version=@project.version@
# Whether dark mode should be enabled by default
# Possible values: true|false
nbs-cloud.web-container.shared.darkMode=true