1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 07:39:41 +02:00

feat(frontend): add group permissions (#721)

* style(frontend): 💄 add darktheme custom

* add dummy users in dev mode

* feat(frontend):  add group permissions editor UI

* feat(backend):  add group permissions setters

* test(backend):  tests for basic permission get/set (WIP)

Needs more testing

* remove old test

* chore(backend): copy template.env on setup

* feat(frontend):  enable send invitation via email

* feat(backend):  enable send invitation via email

* feat:  add app config checker for site-settings

* refactor(frontend): ♻️ consolidate bool checks

Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-10-04 20:16:37 -08:00 committed by GitHub
parent b7b8aa9a08
commit 5d43fac7c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 652 additions and 106 deletions

View file

@ -1,6 +1,6 @@
<template>
<v-app dark>
<!-- <TheSnackbar /> -->
<TheSnackbar />
<AppSidebar
v-model="sidebar"
@ -35,6 +35,16 @@
</template>
</v-list>
</v-menu>
<template #bottom>
<v-list-item @click="toggleDark">
<v-list-item-icon>
<v-icon>
{{ $vuetify.theme.dark ? $globals.icons.weatherSunny : $globals.icons.weatherNight }}
</v-icon>
</v-list-item-icon>
<v-list-item-title> {{ $vuetify.theme.dark ? "Light Mode" : "Dark Mode" }} </v-list-item-title>
</v-list-item>
</template>
</AppSidebar>
<AppHeader>
@ -55,19 +65,25 @@
import { computed, defineComponent, useContext } from "@nuxtjs/composition-api";
import AppHeader from "@/components/Layout/AppHeader.vue";
import AppSidebar from "@/components/Layout/AppSidebar.vue";
import TheSnackbar from "@/components/Layout/TheSnackbar.vue";
import { useCookbooks } from "~/composables/use-group-cookbooks";
export default defineComponent({
components: { AppHeader, AppSidebar },
components: { AppHeader, AppSidebar, TheSnackbar },
// @ts-ignore
middleware: "auth",
setup() {
const { cookbooks } = useCookbooks();
// @ts-ignore
const { $globals, $auth } = useContext();
const { $globals, $auth, $vuetify } = useContext();
const isAdmin = computed(() => $auth.user?.admin);
function toggleDark() {
$vuetify.theme.dark = !$vuetify.theme.dark;
console.log("toggleDark");
}
const cookbookLinks = computed(() => {
if (!cookbooks.value) return [];
return cookbooks.value.map((cookbook) => {
@ -78,7 +94,7 @@ export default defineComponent({
};
});
});
return { cookbookLinks, isAdmin };
return { cookbookLinks, isAdmin, toggleDark };
},
data() {
return {