From 4bc6ff846d5ec8db6934603eeb6cf06bb5853226 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sat, 20 Mar 2021 02:03:30 +0100 Subject: [PATCH] Added public visibility toggle to user page stashes. --- assets/components/container/container.vue | 1 - assets/components/footer/footer.vue | 1 + assets/components/form/toggle.vue | 102 ++++++++++++++++++++++ assets/components/header/menu.vue | 4 +- assets/components/users/user.vue | 91 +++++++++++++++---- assets/css/_theme.scss | 2 +- assets/js/api.js | 14 ++- assets/js/stashes/actions.js | 15 +++- src/stashes.js | 23 ++++- src/web/server.js | 3 + src/web/stashes.js | 8 ++ 11 files changed, 240 insertions(+), 24 deletions(-) create mode 100644 assets/components/form/toggle.vue diff --git a/assets/components/container/container.vue b/assets/components/container/container.vue index 259f2771..67341ff9 100644 --- a/assets/components/container/container.vue +++ b/assets/components/container/container.vue @@ -150,7 +150,6 @@ export default { flex-grow: 1; overflow-y: auto; overflow-x: hidden; - box-shadow: 0 0 3px var(--shadow-weak); z-index: 1; } diff --git a/assets/components/footer/footer.vue b/assets/components/footer/footer.vue index dc736090..87cf0346 100644 --- a/assets/components/footer/footer.vue +++ b/assets/components/footer/footer.vue @@ -16,6 +16,7 @@ font-size: .8rem; font-weight: bold; text-align: center; + box-shadow: inset -3px 0 3px var(--shadow-hint); } .segment { diff --git a/assets/components/form/toggle.vue b/assets/components/form/toggle.vue new file mode 100644 index 00000000..9baeea69 --- /dev/null +++ b/assets/components/form/toggle.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/assets/components/header/menu.vue b/assets/components/header/menu.vue index 07c85a98..1f5fa39f 100644 --- a/assets/components/header/menu.vue +++ b/assets/components/header/menu.vue @@ -164,10 +164,10 @@ export default { .menu-username { display: block; font-weight: bold; - color: var(--shadow-strong); + color: var(--darken-strong); font-size: .9rem; padding: .75rem 1rem; - border-bottom: solid 1px var(--shadow-hint); + border-bottom: solid 1px var(--darken-hint); text-align: center; text-decoration: none; } diff --git a/assets/components/users/user.vue b/assets/components/users/user.vue index 2ce84c53..5f68e19e 100644 --- a/assets/components/users/user.vue +++ b/assets/components/users/user.vue @@ -19,12 +19,36 @@ :key="stash.id" class="stash" > - -

{{ stash.name }}

-
+
+ +

{{ stash.name }}

+
+ + +