Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to explain better user ldap domain and collabora code widget #68

Merged
merged 6 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions ui/public/i18n/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"common": {
"required": "Required",
"work_in_progress": "Work in progress"
"work_in_progress": "Work in progress",
"eg_value": "E.g. {value}"
Copy link
Member

@DavidePrincipi DavidePrincipi Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer using a static label, with a example.com domain suffix that strengthen furthermore the fact that it is just an example...

Suggested change
"eg_value": "E.g. {value}"
"eg_value": "e.g. mynextcloud.example.com"

The purpose of the placeholder is not suggesting a suitable value, but clarify what kind of value the input field expects. In this case it is a FQDN host name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I did it a bit differently, we cannot send to translation a hostname, it could be changed by the translators

},
"status": {
"title": "Status",
Expand Down Expand Up @@ -32,16 +33,18 @@
"instance_configuration": "Configure {instance}",
"configuring": "Configuration in progress...",
"lets_encrypt": "Let's Encrypt certificate",
"domain": "User domain",
"domain": "LDAP User domain",
"no_domain": "No user domain",
"host_string_gte": "The host name can't be empty",
"configure_nextcloud": "Configure Nextcloud",
"host_invalid_type": "Invalid host name",
"collabora_host":"CODE server host name",
"collabora_host_tooltip": "Type the host name of Collabora Online Development Edition server",
"collabora_host_tooltip": "Collabora Online Development Edition (CODE) is a self-hostable LibreOffice Online server. It allows you to edit office documents in a web browser.",
"tls_verify_collabora":"Verify TLS certificate",
"collabora_placeholder": "Type a fully qualified domain name or choose an option",
"admin_password": "Password for user 'admin'"
"collabora_placeholder": "Select a collabora server or leave empty to disable",
"admin_password": "Password for user 'admin'",
"domain_tooltip": "A LDAP domain is used to authenticate users. If none LDAP user domain is listed you probably need to install one",
"choose_ldap_domain": "Select a LDAP user domain"
},
"about": {
"title": "About"
Expand Down
31 changes: 19 additions & 12 deletions ui/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</div>
<cv-text-input
:label="$t('settings.host')"
:placeholder="default_host"
:placeholder="$t('common.eg_value', {value: default_host})"
v-model.trim="host"
class="mg-bottom"
:invalid-message="error.host"
Expand Down Expand Up @@ -63,18 +63,25 @@
$t("settings.enabled")
}}</template>
</cv-toggle>
<cv-combo-box
<NsComboBox
v-model="domain"
:options="domains"
auto-highlight
:title="$t('settings.domain')"
:invalid-message="$t(error.listUserDomains)"
:disabled="loadingUi"
:label="$t('settings.no_domain')"
:label="$t('settings.choose_ldap_domain')"
light
tooltipAlignment="start"
tooltipDirection="top"
ref="domain"
>
</cv-combo-box>
<template slot="tooltip">
{{
$t("settings.domain_tooltip")
}}
</template>
</NsComboBox>
<template v-if="is_collabora && installed">
<NsComboBox
v-model.trim="collabora_host"
Expand All @@ -84,7 +91,7 @@
:label="$t('settings.collabora_placeholder')"
:options="collabora_URL"
:userInputLabel="core.$t('common.user_input_l')"
:acceptUserInput="true"
:acceptUserInput="false"
:showItemType="true"
:invalid-message="$t(error.collabora_host)"
:disabled="loadingUi"
Expand Down Expand Up @@ -173,13 +180,7 @@ export default {
isLetsEncryptEnabled: false,
domain: "",
password: "Nethesis,1234",
domains: [
{
name: "nodomain",
label: "-",
value: "",
},
],
domains: [],
collabora_URL: [],
installed: false,
running: false,
Expand Down Expand Up @@ -303,6 +304,12 @@ export default {
this.focusElement("host");
isValidationOk = false;
}
if (!this.domain) {
// test field cannot be empty
this.error.listUserDomains = this.$t("common.required");
this.focusElement("domain");
isValidationOk = false;
}
// exclude characters not correctly supported by env file
const re = new RegExp("\"|=|'|\\s|\\t");
if (re.test(this.password)) {
Expand Down
Loading