-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-94 Support UI customization and improve configuration loading proc…
…ess (Resolve #94)
- Loading branch information
Showing
19 changed files
with
170 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
reposilite-backend/src/main/java/org/panda_lang/reposilite/api/ConfigDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.panda_lang.reposilite.api; | ||
|
||
import java.io.Serializable; | ||
|
||
final class ConfigDto implements Serializable { | ||
|
||
private final String title; | ||
private final String description; | ||
private final String accentColor; | ||
|
||
ConfigDto(String title, String description, String accentColor) { | ||
this.title = title; | ||
this.description = description; | ||
this.accentColor = accentColor; | ||
} | ||
|
||
public String getAccentColor() { | ||
return accentColor; | ||
} | ||
|
||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...ilite-backend/src/main/java/org/panda_lang/reposilite/api/ConfigurationApiController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.panda_lang.reposilite.api; | ||
|
||
import io.javalin.http.Context; | ||
import org.panda_lang.reposilite.RepositoryController; | ||
import org.panda_lang.reposilite.config.Configuration; | ||
|
||
public final class ConfigurationApiController implements RepositoryController { | ||
|
||
private final Configuration configuration; | ||
|
||
public ConfigurationApiController(Configuration configuration) { | ||
this.configuration = configuration; | ||
} | ||
|
||
@Override | ||
public Context handleContext(Context ctx) { | ||
return ctx.json(new ConfigDto( | ||
configuration.getTitle(), | ||
configuration.getDescription(), | ||
configuration.getAccentColor()) | ||
); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href="data:;base64,iVBORw0KGgo="><title>Reposilite</title><link href="https://fonts.googleapis.com/css2?family=Manrope:wght@300;500&display=swap" rel=stylesheet><script src=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js></script><script>window.REPOSILITE_MESSAGE = '{{message}}'</script><link href=/js/app.js rel=preload as=script></head><body><noscript><strong>We're sorry but reposilite-frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/app.js></script></body></html> | ||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href="data:;base64,iVBORw0KGgo="><title>Reposilite</title><link href="https://fonts.googleapis.com/css2?family=Manrope:wght@300;500&display=swap" rel=stylesheet><script src=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js></script><script>window.REPOSILITE_MESSAGE = '{{message}}';</script><link href=/js/app.js rel=preload as=script></head><body><noscript><strong>We're sorry but reposilite-frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/app.js></script></body></html> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 1 addition & 17 deletions
18
...c/test/workspace/repositories/snapshots/org/panda-lang/reposilite-test/maven-metadata.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1 @@ | ||
<?xml version='1.0' encoding='UTF-8'?><!-- | ||
~ Copyright (c) 2020 Dzikoysk | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<metadata><groupId>org.panda-lang</groupId><artifactId>reposilite-test</artifactId><version/><versioning><release>1.0.0-SNAPSHOT</release><latest>1.0.0-SNAPSHOT</latest><snapshot/><lastUpdated>20200518095524</lastUpdated><versions><version>1.0.0-SNAPSHOT</version></versions></versioning></metadata> | ||
<metadata><groupId>org.panda-lang</groupId><artifactId>reposilite-test</artifactId><versioning><release>1.0.0-SNAPSHOT</release><latest>1.0.0-SNAPSHOT</latest><lastUpdated>20200526104801</lastUpdated><versions><version>1.0.0-SNAPSHOT</version></versions></versioning></metadata> |
2 changes: 1 addition & 1 deletion
2
...st/workspace/repositories/snapshots/org/panda-lang/reposilite-test/maven-metadata.xml.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
d41d8cd98f00b204e9800998ecf8427e | ||
74be16979710d4c4e7c6647856088456 |
2 changes: 1 addition & 1 deletion
2
...t/workspace/repositories/snapshots/org/panda-lang/reposilite-test/maven-metadata.xml.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
10a34637ad661d98ba3344717656fcc76209c2f8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,6 @@ | ||
!!org.panda_lang.reposilite.stats.StatsEntity | ||
"records": | ||
"/releases/org/panda-lang/reposilite/2.5.0/reposilite-2.5.0-sources.jar.md5": !!int "1" | ||
"/releases/org/panda-lang/reposilite-parent/2.5.0/reposilite-parent-2.5.0.pom.sha1": !!int "1" | ||
"/releases/org/panda-lang/reposilite/2.5.0/reposilite-2.5.0-sources.jar": !!int "1" | ||
"/releases/brianbb/jpastebin/1.0.0/jpastebin-1.0.0.jar": !!int "4" | ||
"/releases/org/panda-lang/reposilite/maven-metadata.xml": !!int "3" | ||
"/releases/org/panda-lang/reposilite/2.5.0/reposilite-2.5.0.jar.md5": !!int "1" | ||
"/favicon.ico": !!int "2" | ||
"/": !!int "7" | ||
"/releases/org/panda-lang/reposilite-parent/maven-metadata.xml": !!int "3" | ||
"/releases/org/panda-lang/reposilite-parent/2.5.0/reposilite-parent-2.5.0.pom.md5": !!int "1" | ||
"/releases/org/panda-lang/reposilite/2.5.0/reposilite-2.5.0.pom": !!int "1" | ||
"/api/x": !!int "1" | ||
"/releases/org/panda-lang/reposilite/2.5.0/reposilite-2.5.0.pom.sha1": !!int "1" | ||
"/releases/org/panda-lang/reposilite/maven-metadata.xml.md5": !!int "1" | ||
"/releases/org/panda-lang/reposilite/2.5.0/reposilite-2.5.0.pom.md5": !!int "1" | ||
"/xd": !!int "2" | ||
"/releases/org/panda-lang/reposilite/maven-metadata.xml.sha1": !!int "3" | ||
"/org/panda-lang/reposilite/latest": !!int "1" | ||
"/org/panda-lang/reposilite-test/x/maven-metadata.xml": !!int "1" | ||
"/releases/org/panda-lang/reposilite/2.5.0/reposilite-2.5.0.jar.sha1": !!int "1" | ||
"/org/panda-lang/reposilite/2.4.0/reposilite-2.4.0.jar": !!int "1" | ||
"/releases/org/panda-lang/reposilite-parent/maven-metadata.xml.sha1": !!int "3" | ||
"/releases/org/panda-lang/reposilite/2.5.0/reposilite-2.5.0.jar": !!int "1" | ||
"/releases/org/panda-lang/reposilite-parent/2.5.0/reposilite-parent-2.5.0.pom": !!int "2" | ||
"/releases/org/panda-lang/reposilite-parent/maven-metadata.xml.md5": !!int "1" | ||
"/releases/org/panda-lang/reposilite/2.5.0/reposilite-2.5.0-sources.jar.sha1": !!int "1" | ||
"/api/configuration": !!int "1" | ||
"/": !!int "1" | ||
"/api/": !!int "1" | ||
"/js/app.js": !!int "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.