Skip to content

Commit

Permalink
Move logo to somewhere more sensible
Browse files Browse the repository at this point in the history
  • Loading branch information
NHAS committed Nov 28, 2024
1 parent 027d067 commit ea93c39
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 50 deletions.
4 changes: 2 additions & 2 deletions adminui/frontend/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var (
//go:embed dist/assets/*
adminResources embed.FS

//go:embed dist/index.html dist/favicon.ico dist/WagLogo.png
//go:embed dist/index.html dist/favicon.ico dist/logo.png
index embed.FS

distFiles = must(fs.Sub(adminResources, "dist"))
Expand Down Expand Up @@ -49,7 +49,7 @@ func Favicon(w http.ResponseWriter, r *http.Request) {

func Logo(w http.ResponseWriter, r *http.Request) {

f, err := index.Open("dist/WagIcon.png")
f, err := index.Open("dist/logo.png")
if err != nil {
panic(err)
}
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion adminui/frontend/src/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async function logout() {
<label for="my-drawer" aria-label="close sidebar" class="drawer-overlay"></label>
<aside class="flex min-h-full w-72 flex-col p-4 bg-neutral text-neutral-content">
<RouterLink to="/dashboard">
<h2 class="btn btn-ghost w-full text-center text-3xl">Wag<img class="h-14" src="/WagLogo.png" /></h2>
<h2 class="btn btn-ghost w-full text-center text-3xl">Wag<img class="h-14" src="/logo.png" /></h2>
<div class="w-full text-center" v-if="info.serverInfo.version != ''">
<small class="text-center font-mono text-xs">{{ info.serverInfo.version }}</small>
</div>
Expand Down
28 changes: 18 additions & 10 deletions adminui/frontend/src/pages/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ref, computed, watch } from 'vue'
import { useToast } from 'vue-toastification'
import PageLoading from '@/components/PageLoading.vue'
import ConfirmModal from '@/components/ConfirmModal.vue'
import { useToastError } from '@/composables/useToastError'
import { useApi } from '@/composables/useApi'
Expand All @@ -25,7 +26,6 @@ import {
getWebservers,
editWebserver
} from '@/api'
import ConfirmModal from '@/components/ConfirmModal.vue'
const toast = useToast()
const { catcher } = useToastError()
Expand Down Expand Up @@ -225,11 +225,11 @@ function serverCanHaveTLS(domain: string): boolean {
}
function doesTunnelHaveDomain() {
return webserversSettingsData.value.some((x) => x.server_name == 'tunnel' && x.domain.length > 0)
return webserversSettingsData.value.some(x => x.server_name == 'tunnel' && x.domain.length > 0)
}
function doesTunnelHaveTLS() {
return webserversSettingsData.value.some((x) => x.server_name == 'tunnel' && x.tls)
return webserversSettingsData.value.some(x => x.server_name == 'tunnel' && x.tls)
}
</script>

Expand Down Expand Up @@ -346,7 +346,10 @@ function doesTunnelHaveTLS() {
class="toggle toggle-primary"
:value="method.method"
v-model="loginSettingsData.enabled_mfa_methods"
:disabled="!doesTunnelHaveDomain() && (method.method == 'oidc' || method.method == 'webauthn') || (!doesTunnelHaveTLS() && method.method == 'webauthn')"
:disabled="
(!doesTunnelHaveDomain() && (method.method == 'oidc' || method.method == 'webauthn')) ||
(!doesTunnelHaveTLS() && method.method == 'webauthn')
"
:checked="loginSettingsData.enabled_mfa_methods.indexOf(method.method) != -1"
/>
</label>
Expand Down Expand Up @@ -492,7 +495,7 @@ function doesTunnelHaveTLS() {
</p>
</div>
</div>
<div >
<div>
<div role="tablist" class="tabs tabs-bordered">
<template v-for="(server, index) in webserversSettingsData" :key="'webserver-' + server.server_name">
<input
Expand Down Expand Up @@ -550,11 +553,16 @@ function doesTunnelHaveTLS() {
</template>
</div>
</div>
<ConfirmModal v-if="getModifiedServers().some(s => s.server_name == 'management')" @on-cancel="refreshWebservers" @on-confirm="saveServerSettings" body="Editing the management interface may stop you from being able to manage wag, are you sure you want to proceed?">
<button type="submit" class="btn btn-primary w-full">
<span class="loading loading-spinner loading-md" v-if="isLoadingWebserverSettings"></span>
Save
</button>
<ConfirmModal
v-if="getModifiedServers().some(s => s.server_name == 'management')"
@on-cancel="refreshWebservers"
@on-confirm="saveServerSettings"
body="Editing the management interface may stop you from being able to manage wag, are you sure you want to proceed?"
>
<button type="submit" class="btn btn-primary w-full">
<span class="loading loading-spinner loading-md" v-if="isLoadingWebserverSettings"></span>
Save
</button>
</ConfirmModal>
<button v-else type="submit" class="btn btn-primary w-full" @click="saveServerSettings">
<span class="loading loading-spinner loading-md" v-if="isLoadingWebserverSettings"></span>
Expand Down
82 changes: 45 additions & 37 deletions docker-test-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,57 @@
"100-500/tcp"
],
"NAT": true,
"HelpMail": "[email protected]",
"Lockout": 5,
"ExternalAddress": "192.168.121.61",
"MaxSessionLifetimeMinutes": 2,
"SessionInactivityTimeoutMinutes": 1,
"DownloadConfigFileName": "wg0.conf",
"ManagementUI": {
"ListenAddress": "127.0.0.1:4433",
"Enabled": true,
"Password": {
"Enabled": true
},
"OIDC": {
"IssuerURL": "",
"ClientSecret": "",
"ClientID": "",
"Enabled": false
}
},

"Webserver": {
"Public": {
"ListenAddress": ":8081"
},
"Lockout": 5,

"Tunnel": {
"Domain": "http://vpn.test:8080",
"Port": "8080"
}
},
"Authenticators": {
"DefaultMethod": "totp",
"Issuer": "vpn.test",
"Methods": [
"totp"
],
"OIDC": {
"IssuerURL": "",
"ClientSecret": "",
"ClientID": ""
"Port": "8080",

"MaxSessionLifetimeMinutes": 2,
"SessionInactivityTimeoutMinutes": 1,

"HelpMail": "[email protected]",

"DefaultMethod": "totp",
"Issuer": "vpn.test",
"Methods": [
"totp"
],
"OIDC": {
"IssuerURL": "",
"ClientSecret": "",
"ClientID": ""
},
"PAM": {
"ServiceName": ""
}
},
"PAM": {
"ServiceName": ""

"Public": {
"ListenAddress": ":8081",


"ExternalAddress": "192.168.121.61",
"DownloadConfigFileName": "wg0.conf"

},
"Management": {
"Enabled": true,
"ListenAddress": "127.0.0.1:4433",
"Password": {
"Enabled": true
},
"OIDC": {
"IssuerURL": "",
"ClientSecret": "",
"ClientID": "",
"Enabled": false
}
}
},

"Wireguard": {
"DevName": "wg1",
"ListenPort": 53230,
Expand Down

0 comments on commit ea93c39

Please sign in to comment.