Skip to content

Commit

Permalink
Fixed NgxConfigEditor v-model and auto-cert issues
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJacky committed Aug 4, 2022
1 parent 0245413 commit 7849ef7
Show file tree
Hide file tree
Showing 19 changed files with 295 additions and 284 deletions.
20 changes: 16 additions & 4 deletions frontend/src/components/CodeEditor/CodeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,32 @@
import {VAceEditor} from 'vue3-ace-editor'
import 'ace-builds/src-noconflict/mode-nginx'
import 'ace-builds/src-noconflict/theme-monokai'
import {computed} from 'vue'
const {content, defaultHeight} = defineProps<{
content?: string
const props = defineProps<{
content: string
defaultHeight?: string
}>()
const emit = defineEmits(['update:content'])
const value = computed({
get() {
return props.content
},
set(value) {
emit('update:content', value)
}
})
</script>

<template>
<v-ace-editor
v-model:value="content"
v-model:value="value"
lang="nginx"
theme="monokai"
:style="{
minHeight: defaultHeight || '100vh'
minHeight: props.defaultHeight || '100vh'
}"/>
</template>

Expand Down
59 changes: 30 additions & 29 deletions frontend/src/language/en/app.po
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ msgid "Advance Mode"
msgstr "Advance Mode"

#: src/components/StdDataDisplay/StdTable.vue:39
#: src/views/domain/DomainList.vue:20
#: src/views/domain/DomainList.vue:27
#, fuzzy
msgid "Are you sure you want to delete ?"
msgstr "Are you sure you want to remove this directive?"
Expand All @@ -52,15 +52,15 @@ msgstr "Are you sure you want to remove this directive?"
msgid "Are you sure you want to remove this directive?"
msgstr "Are you sure you want to remove this directive?"

#: src/views/domain/cert/IssueCert.vue:84
#: src/views/domain/cert/IssueCert.vue:77
msgid "Auto-renewal disabled for %{name}"
msgstr "Auto-renewal disabled for %{name}"

#: src/views/domain/cert/IssueCert.vue:78
#: src/views/domain/cert/IssueCert.vue:71
msgid "Auto-renewal enabled for %{name}"
msgstr "Auto-renewal enabled for %{name}"

#: src/views/domain/DomainEdit.vue:159
#: src/views/domain/DomainEdit.vue:157
msgid "Back"
msgstr "Back"

Expand Down Expand Up @@ -147,7 +147,7 @@ msgid "Database (Optional, default: database)"
msgstr "Database (Optional, default: database)"

#: src/components/StdDataDisplay/StdTable.vue:216
#: src/views/domain/DomainList.vue:104
#: src/views/domain/DomainList.vue:111
msgid "Delete"
msgstr ""

Expand All @@ -171,16 +171,16 @@ msgstr "Directive"
msgid "Directives"
msgstr "Directives"

#: src/views/domain/cert/IssueCert.vue:86
#: src/views/domain/cert/IssueCert.vue:79
msgid "Disable auto-renewal failed for %{name}"
msgstr "Disable auto-renewal failed for %{name}"

#: src/views/domain/DomainEdit.vue:10 src/views/domain/DomainList.vue:27
#: src/views/domain/DomainEdit.vue:10 src/views/domain/DomainList.vue:17
#: src/views/domain/DomainList.vue:29
msgid "Disabled"
msgstr "Disabled"

#: src/views/domain/DomainEdit.vue:103 src/views/domain/DomainList.vue:64
#: src/views/domain/DomainEdit.vue:101 src/views/domain/DomainList.vue:64
msgid "Disabled successfully"
msgstr "Disabled successfully"

Expand Down Expand Up @@ -208,7 +208,7 @@ msgstr "Edit Site"
msgid "Email (*)"
msgstr "Email (*)"

#: src/views/domain/cert/IssueCert.vue:80
#: src/views/domain/cert/IssueCert.vue:73
msgid "Enable auto-renewal failed for %{name}"
msgstr "Enable auto-renewal failed for %{name}"

Expand All @@ -221,12 +221,12 @@ msgid "Enable TLS"
msgstr "Enable TLS"

#: src/views/domain/DomainEdit.vue:33 src/views/domain/DomainEdit.vue:7
#: src/views/domain/DomainList.vue:16 src/views/domain/DomainList.vue:18
#: src/views/domain/DomainList.vue:26 src/views/domain/DomainList.vue:30
#: src/views/domain/DomainList.vue:12 src/views/domain/DomainList.vue:20
#: src/views/domain/DomainList.vue:26
msgid "Enabled"
msgstr "Enabled"

#: src/views/domain/DomainAdd.vue:46 src/views/domain/DomainEdit.vue:94
#: src/views/domain/DomainAdd.vue:46 src/views/domain/DomainEdit.vue:92
#: src/views/domain/DomainList.vue:54
msgid "Enabled successfully"
msgstr "Enabled successfully"
Expand All @@ -239,11 +239,11 @@ msgstr "Encrypt website with Let's Encrypt"
msgid "Expiration Date: %{date}"
msgstr "Expiration Date: %{date}"

#: src/views/domain/DomainEdit.vue:106 src/views/domain/DomainList.vue:68
#: src/views/domain/DomainEdit.vue:104 src/views/domain/DomainList.vue:68
msgid "Failed to disable %{msg}"
msgstr "Failed to disable %{msg}"

#: src/views/domain/DomainEdit.vue:97 src/views/domain/DomainList.vue:58
#: src/views/domain/DomainEdit.vue:95 src/views/domain/DomainList.vue:58
msgid "Failed to enable %{msg}"
msgstr "Failed to enable %{msg}"

Expand All @@ -255,6 +255,10 @@ msgstr "File Not Found"
msgid "Finished"
msgstr "Finished"

#: src/views/domain/cert/IssueCert.vue:85
msgid "Getting the certificate, please wait..."
msgstr "Getting the certificate, please wait..."

#: src/routes/index.ts:19
msgid "Home"
msgstr "Home"
Expand Down Expand Up @@ -284,7 +288,7 @@ msgstr "Load Averages:"
msgid "Location"
msgstr "Location"

#: src/views/domain/ngx_conf/LocationEditor.vue:40
#: src/views/domain/ngx_conf/LocationEditor.vue:36
msgid "Locations"
msgstr "Locations"

Expand All @@ -300,7 +304,7 @@ msgstr "Login successful"
msgid "Logout successful"
msgstr "Logout successful"

#: src/views/domain/cert/IssueCert.vue:148
#: src/views/domain/cert/IssueCert.vue:172
msgid ""
"Make sure you have configured a reverse proxy for .well-known directory to "
"HTTPChallengePort (default: 9180) before getting the certificate."
Expand Down Expand Up @@ -367,7 +371,7 @@ msgid "Next"
msgstr "Next"

#: src/components/StdDataDisplay/StdTable.vue:37
#: src/views/domain/DomainList.vue:18
#: src/views/domain/DomainList.vue:25
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:17
msgid "No"
msgstr "No"
Expand All @@ -380,7 +384,7 @@ msgstr "Not Found"
msgid "Not Valid Before: %{date}"
msgstr "Not Valid Before: %{date}"

#: src/views/domain/cert/IssueCert.vue:140
#: src/views/domain/cert/IssueCert.vue:164
msgid ""
"Note: The server_name in the current configuration must be the domain name "
"you need to get the certificate."
Expand All @@ -390,7 +394,7 @@ msgstr ""

#: src/components/StdDataDisplay/StdCurd.vue:27
#: src/components/StdDataDisplay/StdTable.vue:38
#: src/views/domain/DomainList.vue:19
#: src/views/domain/DomainList.vue:26
msgid "OK"
msgstr ""

Expand Down Expand Up @@ -443,7 +447,7 @@ msgstr "Receive"
msgid "Reset"
msgstr ""

#: src/views/config/ConfigEdit.vue:52 src/views/domain/DomainEdit.vue:162
#: src/views/config/ConfigEdit.vue:52 src/views/domain/DomainEdit.vue:160
msgid "Save"
msgstr "Save"

Expand Down Expand Up @@ -477,7 +481,7 @@ msgstr "Send"
#: src/components/StdDataDisplay/StdTable.vue:94
#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:44
#: src/views/domain/DomainEdit.vue:56 src/views/domain/DomainEdit.vue:65
#: src/views/domain/DomainEdit.vue:85 src/views/domain/DomainList.vue:78
#: src/views/domain/DomainEdit.vue:83 src/views/domain/DomainList.vue:78
#: src/views/other/Install.vue:71 src/views/other/Login.vue:49
msgid "Server error"
msgstr "Server error"
Expand All @@ -486,16 +490,16 @@ msgstr "Server error"
msgid "Server Info"
msgstr "Server Info"

#: src/views/domain/cert/IssueCert.vue:32
#: src/views/domain/cert/IssueCert.vue:28
msgid "server_name not found in directives"
msgstr "server_name not found in directives"

#: src/views/domain/cert/IssueCert.vue:131 src/views/domain/DomainAdd.vue:112
#: src/views/domain/cert/IssueCert.vue:155 src/views/domain/DomainAdd.vue:112
msgid "server_name parameter is required"
msgstr "server_name parameter is required"

#: src/views/domain/cert/IssueCert.vue:134
#: src/views/domain/cert/IssueCert.vue:38
#: src/views/domain/cert/IssueCert.vue:158
#: src/views/domain/cert/IssueCert.vue:34
msgid "server_name parameters more than one"
msgstr "server_name parameters more than one"

Expand Down Expand Up @@ -532,7 +536,7 @@ msgstr "Enabled"
msgid "Terminal"
msgstr "Terminal"

#: src/views/domain/cert/IssueCert.vue:144
#: src/views/domain/cert/IssueCert.vue:168
msgid ""
"The certificate for the domain will be checked every hour, and will be "
"renewed if it has been more than 1 month since it was last issued."
Expand Down Expand Up @@ -582,8 +586,5 @@ msgstr "License"
#~ msgid "404 Not Found"
#~ msgstr "404 Not Found"

#~ msgid "Getting the certificate, please wait..."
#~ msgstr "Getting the certificate, please wait..."

#~ msgid "Invalid E-mail!"
#~ msgstr "Invalid E-mail!"
Loading

0 comments on commit 7849ef7

Please sign in to comment.