Sidebar & cleanup 2
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
37ee5fcea6
commit
1cba7bbb5a
11 changed files with 440 additions and 449 deletions
|
|
@ -25,6 +25,7 @@
|
|||
:exact="true"
|
||||
:title="form.title"
|
||||
:to="{ name: 'edit', params: { hash: form.hash } }">
|
||||
<AppNavigationIconBullet slot="icon" :color="bulletColor" />
|
||||
<template #actions>
|
||||
<ActionRouter :close-after-click="true"
|
||||
:exact="true"
|
||||
|
|
@ -48,6 +49,7 @@
|
|||
|
||||
<script>
|
||||
import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
|
||||
import AppNavigationIconBullet from '@nextcloud/vue/dist/Components/AppNavigationIconBullet'
|
||||
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
|
||||
import ActionRouter from '@nextcloud/vue/dist/Components/ActionRouter'
|
||||
import ActionSeparator from '@nextcloud/vue/dist/Components/ActionSeparator'
|
||||
|
|
@ -57,6 +59,7 @@ export default {
|
|||
|
||||
components: {
|
||||
AppNavigationItem,
|
||||
AppNavigationIconBullet,
|
||||
ActionButton,
|
||||
ActionRouter,
|
||||
ActionSeparator,
|
||||
|
|
@ -69,6 +72,21 @@ export default {
|
|||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
/**
|
||||
* Map form state to bullet color
|
||||
*
|
||||
* @returns {string} hex color
|
||||
*/
|
||||
bulletColor() {
|
||||
const style = getComputedStyle(document.body)
|
||||
if (this.form.expired) {
|
||||
return style.getPropertyValue('--color-error').slice(-6)
|
||||
}
|
||||
return style.getPropertyValue('--color-success').slice(-6)
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
async deleteForm() {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
<!--
|
||||
- @copyright Copyright (c) 2018 René Gieling <github@dartcafe.de>
|
||||
-
|
||||
- @author René Gieling <github@dartcafe.de>
|
||||
-
|
||||
- @license GNU AGPL version 3 or any later version
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
- published by the Free Software Foundation, either version 3 of the
|
||||
- License, or (at your option) any later version.
|
||||
-
|
||||
- This program is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- GNU Affero General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU Affero General Public License
|
||||
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="forms-sidebar">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.forms-sidebar {
|
||||
min-width: 300px;
|
||||
border-left: 1px solid var(--color-border);
|
||||
z-index: 500;
|
||||
> ul,
|
||||
> div {
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -65,6 +65,7 @@
|
|||
|
||||
<script>
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
// TODO: replace with same design as core sharing
|
||||
import UserDiv from './_base-UserDiv'
|
||||
import axios from '@nextcloud/axios'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue