1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-23 07:09:41 +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

@ -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.`
);
},
},
});