From 292faa1e487cc0a205959ccc7765e5c637f44e45 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sat, 20 Mar 2021 02:15:31 +0100 Subject: [PATCH] Added public visibility toggle to stash page. --- assets/components/form/toggle.vue | 10 ++++ assets/components/stashes/stash.vue | 74 +++++++++++++++++++++++++---- 2 files changed, 74 insertions(+), 10 deletions(-) diff --git a/assets/components/form/toggle.vue b/assets/components/form/toggle.vue index 9baeea69..89ecddd6 100644 --- a/assets/components/form/toggle.vue +++ b/assets/components/form/toggle.vue @@ -53,6 +53,16 @@ export default { .toggle-container { display: inline-block; cursor: pointer; + + &.light { + .toggle { + background: var(--lighten-weak); + } + + .toggle-input:checked + .toggle { + background: var(--lighten); + } + } } .toggle { diff --git a/assets/components/stashes/stash.vue b/assets/components/stashes/stash.vue index 2d2cdcef..7a8933eb 100644 --- a/assets/components/stashes/stash.vue +++ b/assets/components/stashes/stash.vue @@ -6,11 +6,36 @@

{{ stash.name }}

- {{ stash.user.username }} + + + + {{ stash.user.username }} +
@@ -38,9 +63,20 @@ @@ -71,6 +110,26 @@ export default { align-items: center; background: var(--profile); color: var(--text-light); + + .icon { + fill: var(--text-light); + margin: -.1rem .5rem 0 0; + } +} + +.header-section, +.header-item { + display: flex; + align-items: center; +} + +.header-item:not(:last-child) { + margin: 0 1rem 0 0; +} + +.stash-public .icon { + margin: 0 .75rem 0 0; + cursor: pointer; } .stash-name, @@ -80,11 +139,6 @@ export default { padding: .5rem 1rem; margin: 0; font-weight: bold; - - .icon { - fill: var(--text-light); - margin: -.1rem .5rem 0 0; - } } .stash-section:not(:last-child) {