Skip to content

Commit

Permalink
GH-92 Release 2.5.0 (Resolve #92)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzikoysk committed May 29, 2020
1 parent 794b203 commit 6e6e20f
Show file tree
Hide file tree
Showing 15 changed files with 912 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $ docker run -e JAVA_OPTS='-Xmx128M -Dreposilite.port="8080"' reposilite
List of available management commands

```bash
Reposilite 2.4.4 Commands:
Reposilite 2.5.0 Commands:
help - List available commands
status - Display summary status of app health
stats [<limiter>/<pattern>] - Display collected metrics and (optional) filter them using the given limiter or pattern
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<groupId>org.panda-lang</groupId>
<artifactId>reposilite</artifactId>
<packaging>pom</packaging>
<version>2.4.4</version>
<version>2.5.0</version>
<modules>
<module>reposilite-backend</module>
</modules>
Expand Down
2 changes: 1 addition & 1 deletion reposilite-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>reposilite</artifactId>
<groupId>org.panda-lang</groupId>
<version>2.4.4</version>
<version>2.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

public final class ReposiliteConstants {

public static final String VERSION = "2.4.4";
public static final String VERSION = "2.5.0";

public static final String REMOTE_VERSION = "https://repo.panda-lang.org/org/panda-lang/reposilite/latest";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void start(Configuration configuration, Runnable onStart) {
private void config(JavalinConfig config) {
config.server(() -> new Server(new QueuedThreadPool(2 * Runtime.getRuntime().availableProcessors())));
config.showJavalinBanner = false;
config.enableCorsForOrigin("http://localhost:8080/");
// config.enableCorsForOrigin("http://localhost:8080/");
}

void stop() {
Expand All @@ -83,4 +83,4 @@ public Collection<Pair<String, Exception>> getExceptions() {
return exceptions;
}

}
}
9 changes: 9 additions & 0 deletions reposilite-frontend/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const autoprefixer = require('autoprefixer')
const tailwindcss = require('tailwindcss')

module.exports = {
plugins: [
tailwindcss('./tailwind.config.js'),
autoprefixer
]
}
3 changes: 3 additions & 0 deletions reposilite-frontend/src/assets/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
37 changes: 37 additions & 0 deletions reposilite-frontend/src/components/FileEntry.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<template lang="pug">
.file-preview.w-full
a(v-if="file.type === 'file'" :href="getUri()" target="_blank" )
FileEntryContent(:file="file")
router-link(v-else :to="getUri()")
FileEntryContent(:file="file")
</template>

<script>
import FileEntryContent from './FileEntryContent'
export default {
props: [ 'file' ],
components: {
FileEntryContent
},
data: () => ({
uri: undefined
}),
mounted() {
this.uri = this.$route.params['qualifier']
if (this.uri.length > 0) {
this.uri += '/'
}
},
methods: {
getUri() {
return '/' + this.uri + this.file.name
}
}
}
</script>

<style lang="stylus">
</style>
16 changes: 16 additions & 0 deletions reposilite-frontend/src/components/FileEntryContent.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template lang="pug">
.py-2.px-6.border.flex
.pr-5
i(v-if="file.type === 'directory'").fas.fa-folder
i(v-if="file.type === 'file'").fas.fa-file
.flex.justify-between.w-full
h1(v-if="file.type === 'file'") {{ file.name }}
h1(v-else).font-bold {{ file.name }}
p(v-if="file.type === 'file'") {{ (file.contentLength) }} bytes
</template>

<script>
export default {
props: [ 'file' ]
}
</script>
23 changes: 23 additions & 0 deletions reposilite-frontend/src/components/Wave.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template lang="pug">
svg.w-full.h-264.lg_h-168(viewBox="0 0 1080 640" preserveAspectRatio="none")
path(
fill="#009890"
fill-opacity="1"
d=" \
M 0,260 \
C 640,330 650,0 1080,170 \
L 1440 0 \
L 0,0 \
Z \
")
path(
fill="#212121"
fill-opacity="1"
d=" \
M 0,230 \
C 620,310 650,50 1080,150 \
L 1440 0 \
L 0,0 \
Z \
")
</template>
17 changes: 17 additions & 0 deletions reposilite-frontend/src/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Vue from 'vue'
import Router from 'vue-router'
import Index from './views/Index.vue'

Vue.use(Router)

export default new Router({
mode: 'history',
base: process.env.BASE_URL,
routes: [
{
path: '/:qualifier(.*)',
name: 'Index',
component: Index
}
]
})
87 changes: 87 additions & 0 deletions reposilite-frontend/src/views/Index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<template lang="pug">
#app
header
Wave.absolute.w-full
.flex.text-white.h-56.flex-col.justify-center.px-8.container.mx-auto
.w-full
h1.text-5xl.segoe.text-grey.font-bold.pt-1 #onlypanda
.w-full
p.text-lg.w-96.md_w-full
| Public Maven repository hosted through the Reposilite
main.mt-64.lg_mt-24
.container.mx-auto
.mx-4
.flex.justify-between.py-4
h1.text-xl Index of {{ this.qualifier }}
router-link(
v-if="this.qualifier != undefined && this.qualifier.length > 1"
:to='getParentPath()'
) ← Back
FileEntry(
v-if="response.files != undefined"
v-for="file in response.files"
:key="file.name"
:file="file"
)
h1(v-else) {{window.REPOSILITE_MESSAGE}}

</template>

<script>
import Wave from '../components/Wave'
import FileEntry from '../components/FileEntry'
export default {
data: () => ({
qualifier: undefined,
response: []
}),
components: {
Wave,
FileEntry
},
mounted() {
this.updateEntities()
},
watch: {
$route() {
this.updateEntities()
}
},
methods: {
updateEntities() {
this.qualifier = this.$route.params['qualifier']
console.log('/api/' + this.qualifier)
const server = (process.env.NODE_ENV == 'production') ? '/' : 'http://localhost:80/'
this.$http
.get(server + 'api/' + this.qualifier)
.then(response => (this.response = response.data))
},
getParentPath() {
const elements = ('/' + this.qualifier).split('/')
elements.pop()
const path = elements.join('/')
return path.length == 0 ? '/' : path
}
}
}
</script>

<style lang="stylus">
html
background-color: #f8f8f8
#app
font-family 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif
-webkit-font-smoothing antialiased
-moz-osx-font-smoothing grayscale
color #2c3e50
height 100%
width 100%
.blue
background-color #0077dd
svg
z-index -1
.segoe
font-family 'Segoe UI'
</style>
Loading

0 comments on commit 6e6e20f

Please sign in to comment.