1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-05 05:25:26 +02:00

feat(backend): refactor/fix group management for admins (#838)

* fix(frontend): 🐛 update dialog implementation to simplify state management

* test(backend):  refactor test fixtures + admin group tests

* chore(backend): 🔨 add launcher.json for python debugging (tests)

* fix typing

* feat(backend):  refactor/fix group management for admins

* feat(frontend):  add/fix admin group management

* add LDAP checker

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-11-25 14:17:02 -09:00 committed by GitHub
parent 0db8a58963
commit 791aa8c610
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 881 additions and 331 deletions

View file

@ -32,6 +32,7 @@
:type="inputField.type === fieldTypes.PASSWORD ? 'password' : 'text'"
rounded
class="rounded-lg"
:autofocus="index === 0"
dense
:label="inputField.label"
:name="inputField.varName"

View file

@ -1,17 +1,18 @@
<template>
<v-card color="background" flat class="pb-2">
<v-card-title class="headline py-0">
<v-card-title class="headline pl-0 py-0">
<v-icon v-if="icon !== ''" left>
{{ icon }}
</v-icon>
{{ title }}
</v-card-title>
<v-card-text v-if="$slots.default" class="pt-2">
<v-card-text v-if="$slots.default" class="pt-2 pl-0">
<p class="pb-0 mb-0">
<slot />
</p>
</v-card-text>
<v-divider class="my-4"></v-divider>
<v-divider class="my-3"></v-divider>
</v-card>
</template>

View file

@ -69,9 +69,14 @@
<script lang="ts">
import { defineComponent } from "@nuxtjs/composition-api";
import { computed } from "vue-demi";
export default defineComponent({
name: "BaseDialog",
props: {
value: {
type: Boolean,
default: false,
},
color: {
type: String,
default: "primary",
@ -105,9 +110,22 @@ export default defineComponent({
type: Boolean,
},
},
setup(props, context) {
const dialog = computed<Boolean>({
get() {
return props.value;
},
set(val) {
context.emit("input", val);
},
});
return {
dialog,
};
},
data() {
return {
dialog: false,
submitted: false,
};
},
@ -122,6 +140,8 @@ export default defineComponent({
watch: {
determineClose() {
this.submitted = false;
// @ts-ignore
this.dialog = false;
},
dialog(val) {
@ -139,10 +159,19 @@ export default defineComponent({
this.submitted = true;
},
open() {
// @ts-ignore
this.dialog = true;
this.logDeprecatedProp("open");
},
close() {
// @ts-ignore
this.dialog = false;
this.logDeprecatedProp("close");
},
logDeprecatedProp(val: string) {
console.warn(
`[BaseDialog] The method '${val}' is deprecated. Please use v-model="value" to manage state instead.`
);
},
},
});