File tree Expand file tree Collapse file tree 6 files changed +32
-4
lines changed Expand file tree Collapse file tree 6 files changed +32
-4
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1
1
<template >
2
+ <div v-if =" dev" class =" dev-header" >
3
+ <p >This is the OpenShock <b >DEVELOPMENT</b > environment. <u >No data is saved</u >, and regularly overwritten by production data</p >
4
+ </div >
2
5
<div id =" app" >
3
6
<router-view />
4
7
</div >
@@ -13,6 +16,27 @@ export default {
13
16
' $store.state.settings.dark' (val, old) {
14
17
$ (' body' ).attr (' data-color-scheme' , val ? ' dark' : ' white' );
15
18
}
19
+ },
20
+ computed: {
21
+ dev () {
22
+ return config .dev === true || config .dev === ' true' ;
23
+ }
16
24
}
17
25
}
18
- </script >
26
+ </script >
27
+
28
+ <style lang="scss">
29
+
30
+ .dev-header {
31
+ top : 0 ;
32
+ left : 0 ;
33
+ right : 0 ;
34
+ height : 25px ;
35
+ background-color : orangered ;
36
+ color : #fff ;
37
+ text-align : center ;
38
+ z-index : 999 ;
39
+ line-height : 25px ;
40
+ }
41
+
42
+ </style >
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ const config = {
2
2
name : "OPENSHOCK_NAME" ,
3
3
webUiUrl : "OPENSHOCK_URL/#/" , // WebUI URL is formatted like "OPENSHOCK_URL/#/"
4
4
apiUrl : "OPENSHOCK_API_URL/" ,
5
- shortUrl : "OPENSHOCK_SHARE_URL/" // No trailing slash since this can be _anything_.
5
+ shortUrl : "OPENSHOCK_SHARE_URL/" , // No trailing slash since this can be _anything_.
6
+ dev : "OPENSHOCK_DEV"
6
7
}
7
8
8
9
global . config = config ;
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ const config = {
2
2
name : "OpenShock" ,
3
3
webUiUrl : "https://localhost:8080/#/" ,
4
4
apiUrl : "https://localhost/" ,
5
- shortUrl : "https://shockl.ink/"
5
+ shortUrl : "https://shockl.ink/" ,
6
+ dev : false
6
7
}
7
8
8
9
global . config = config ;
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ const config = {
2
2
name : "OpenShock" ,
3
3
webUiUrl : "https://openshock.app/#/" ,
4
4
apiUrl : "https://api.openshock.app/" ,
5
- shortUrl : "https://shockl.ink/"
5
+ shortUrl : "https://shockl.ink/" ,
6
+ dev : false
6
7
}
7
8
8
9
global . config = config ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ inject OPENSHOCK_NAME $OPENSHOCK_NAME
31
31
inject OPENSHOCK_URL $OPENSHOCK_URL
32
32
inject OPENSHOCK_API_URL $OPENSHOCK_API_URL
33
33
inject OPENSHOCK_SHARE_URL $OPENSHOCK_SHARE_URL
34
+ inject OPENSHOCK_DEV $OPENSHOCK_DEV
34
35
35
36
# Start nginx as normal.
36
37
# If something breaks, see: https://github.com/nginxinc/docker-nginx/blob/master/mainline/debian/Dockerfile
You can’t perform that action at this time.
0 commit comments