forked from directus/directus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
149 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@directus/app': minor | ||
--- | ||
|
||
Added a system interface for showing a password field with visibility toggle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@directus/env': patch | ||
'@directus/api': patch | ||
--- | ||
|
||
Fixed server address undefined for `graphql` and `websocket` logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'docs': patch | ||
--- | ||
|
||
Fixed missing import in auth example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'directus': patch | ||
--- | ||
|
||
Fixed a formatting warning in readme.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { defineInterface } from '@directus/extensions'; | ||
import InputPassword from './input-password.vue'; | ||
|
||
export default defineInterface({ | ||
id: 'system-input-password', | ||
name: '$t:interfaces.input-password.input-password', | ||
description: '$t:interfaces.input-password.description', | ||
icon: 'visibility', | ||
component: InputPassword, | ||
system: true, | ||
types: ['string', 'text'], | ||
group: 'standard', | ||
options: [ | ||
{ | ||
field: 'placeholder', | ||
name: '$t:placeholder', | ||
type: 'string', | ||
meta: { | ||
width: 'half', | ||
interface: 'input', | ||
options: { | ||
placeholder: '$t:enter_a_placeholder', | ||
}, | ||
}, | ||
}, | ||
], | ||
}); |
52 changes: 52 additions & 0 deletions
52
app/src/interfaces/_system/system-input-password/input-password.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
import { useI18n } from 'vue-i18n'; | ||
withDefaults( | ||
defineProps<{ | ||
value?: string | null; | ||
autofocus?: boolean; | ||
autocomplete?: string | null; | ||
placeholder?: string; | ||
disabled?: boolean; | ||
}>(), | ||
{ | ||
value: null, | ||
autofocus: false, | ||
autocomplete: 'new-password', | ||
disabled: false, | ||
}, | ||
); | ||
const emit = defineEmits<{ | ||
input: [value: string]; | ||
}>(); | ||
const { t } = useI18n(); | ||
const hidden = ref<boolean>(true); | ||
function toggleHidePassword() { | ||
hidden.value = !hidden.value; | ||
} | ||
</script> | ||
|
||
<template> | ||
<v-input | ||
:model-value="value" | ||
:type="hidden ? 'password' : 'text'" | ||
:autocomplete="autocomplete" | ||
:autofocus="autofocus" | ||
:placeholder="placeholder ?? t('password')" | ||
:disabled="disabled" | ||
@update:model-value="emit('input', $event)" | ||
> | ||
<template #append> | ||
<v-icon | ||
v-tooltip="hidden ? t('show_password') : t('hide_password')" | ||
:name="hidden ? 'visibility' : 'visibility_off'" | ||
clickable | ||
@click="toggleHidePassword" | ||
/> | ||
</template> | ||
</v-input> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,3 +158,4 @@ | |
- maxsteinwand | ||
- FatumaA | ||
- keesvanbemmel | ||
- HZooly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,6 +154,7 @@ Corepack | |
CORS | ||
CPUs? | ||
create-directus-extension | ||
create-directus-project | ||
cron | ||
Cron | ||
CRON | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters