Compare commits
8 commits
0.2.0-pre1
...
master
Author | SHA1 | Date | |
---|---|---|---|
ae316bfbe9 | |||
54e8017289 | |||
2d2ce3c45d | |||
88a8273ebc | |||
f7bd710fc0 | |||
97be00a3b6 | |||
71e64815ef | |||
56bcbc6be3 |
9 changed files with 29 additions and 12 deletions
15
Dockerfile
15
Dockerfile
|
@ -1,13 +1,18 @@
|
|||
FROM node:lts
|
||||
RUN npm install -g http-server
|
||||
FROM node:lts AS source-code
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
|
||||
FROM nginx:1.17
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
COPY --from=source-code /app/dist /usr/share/nginx/html
|
||||
|
||||
COPY docker/start.sh /start.sh
|
||||
RUN chmod uog+rwx /start.sh
|
||||
|
||||
EXPOSE 8080
|
||||
EXPOSE 80
|
||||
CMD [ "/start.sh"]
|
||||
|
|
2
build.sh
2
build.sh
|
@ -1,2 +1,2 @@
|
|||
docker build -t docker.keks.cloud/keksaccount/gui:latest .
|
||||
docker push docker.keks.cloud/keksaccount/gui:latest
|
||||
docker push docker.keks.cloud/keksaccount/gui:latest
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
echo $VUE_APP_API_URL > dist/apiurl
|
||||
http-server dist
|
||||
echo $VUE_APP_API_URL > /usr/share/nginx/html/apiurl
|
||||
nginx -g 'daemon off;'
|
||||
|
|
|
@ -12,12 +12,14 @@
|
|||
label="Username"
|
||||
value=""
|
||||
v-model="username"
|
||||
v-on:keyup.enter="login"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
label="Password"
|
||||
value=""
|
||||
type="password"
|
||||
v-model="password"
|
||||
v-on:keyup.enter="login"
|
||||
></v-text-field>
|
||||
<div v-if="recaptcha"><vue-recaptcha @verify="onCaptchaVerified" :sitekey="captchaCode"></vue-recaptcha></div>
|
||||
<v-checkbox
|
||||
|
|
|
@ -5,7 +5,7 @@ export default {
|
|||
return Api().get('/v1/app')
|
||||
},
|
||||
getAppImage(id) {
|
||||
return process.env.VUE_APP_API_URL+"gui/apps/"+id+"/icon";
|
||||
return localStorage.getItem("apiURL")+"v1/app/"+id+"/icon";
|
||||
},
|
||||
getApp(id) {
|
||||
return Api().get('/v1/app/'+id)
|
||||
|
@ -19,8 +19,8 @@ export default {
|
|||
getAccess(id) {
|
||||
return Api().get('/v1/app/'+id+'/access?create=1')
|
||||
},
|
||||
allowAccess(id, redirect_uri, scope) {
|
||||
return Api().post('/v1/app/'+id+'/access/allow', {redirect_uri: redirect_uri, scope:scope});
|
||||
allowAccess(id, redirect_uri, scope, state) {
|
||||
return Api().post('/v1/app/'+id+'/access/allow', {redirect_uri: redirect_uri, scope:scope, state:state});
|
||||
},
|
||||
updateApp(app) {
|
||||
return Api().put("/v1/app/"+app.id, app);
|
||||
|
|
|
@ -13,6 +13,9 @@ export default {
|
|||
},
|
||||
getAPIUrl () {
|
||||
return new Promise((resolve, reject) => {
|
||||
if(localStorage.getItem("apiURL")) {
|
||||
resolve();
|
||||
}
|
||||
axios.get('/apiurl')
|
||||
.then(function (response) {
|
||||
// handle success
|
||||
|
|
|
@ -71,12 +71,18 @@ export default new Vuex.Store({
|
|||
actions: {
|
||||
getSettings: function (context) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if(localStorage.getItem("settings")) {
|
||||
context.commit('setSettings', localStorage.getItem("settings"))
|
||||
resolve();
|
||||
}
|
||||
ServerService.getPublicSettings().then((res) => {
|
||||
localStorage.setItem("settings", res.data.data)
|
||||
context.commit('setSettings', res.data.data)
|
||||
resolve()
|
||||
}).catch((res) => {
|
||||
context.commit('setError')
|
||||
});
|
||||
|
||||
})
|
||||
},
|
||||
checkAccount: function(context) {
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
UserService.getInviteCodeInfo(this.code).then((res) => {
|
||||
if(res.data.data.usable) {
|
||||
this.errorMsg = "";
|
||||
this.$router.push({name: 'Register', query: {code: this.code}});
|
||||
} else {
|
||||
this.errorMsg = "Invite code not valide";
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
},
|
||||
allowAccess: function () {
|
||||
console.log(this.$route.query);
|
||||
AppsService.allowAccess(this.appId, this.$route.query.redirect_uri, this.$route.query.scope).then((res) => {
|
||||
AppsService.allowAccess(this.appId, this.$route.query.redirect_uri, this.$route.query.scope, this.$route.query.state).then((res) => {
|
||||
console.log("App Access", res);
|
||||
location.href=res.data.data.redirectUrl
|
||||
});
|
||||
|
|
Reference in a new issue