Use Dropdown for the settings menu

This commit is contained in:
Fabio Manganiello 2022-11-25 23:15:41 +01:00
parent 292ed2abff
commit 21c1c96f2e
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -2,10 +2,14 @@
<div class="settings-container"> <div class="settings-container">
<header> <header>
<div class="col-8"> <div class="col-8">
<select title="View" @change="selectedView = $event.target.value"> <Dropdown title="Select a category" icon-class="fa fa-ellipsis-h">
<option value="users" :selected="selectedView === 'users'">Users</option> <DropdownItem text="Users" icon-class="fa fa-user"
<option value="token" :selected="selectedView === 'token'">Generate Token</option> :item-class="{selected: selectedView === 'users'}"
</select> @click="selectedView = 'users'" />
<DropdownItem text="Generate a token" icon-class="fa fa-key"
:item-class="{selected: selectedView === 'token'}"
@click="selectedView = 'token'" />
</Dropdown>
</div> </div>
<div class="col-4 pull-right"> <div class="col-4 pull-right">
@ -25,13 +29,15 @@
</template> </template>
<script> <script>
import Dropdown from "@/components/elements/Dropdown";
import DropdownItem from "@/components/elements/DropdownItem";
import Token from "@/components/panels/Settings/Token"; import Token from "@/components/panels/Settings/Token";
import Users from "@/components/panels/Settings/Users"; import Users from "@/components/panels/Settings/Users";
import Utils from "@/Utils"; import Utils from "@/Utils";
export default { export default {
name: "Settings", name: "Settings",
components: {Users, Token}, components: {Dropdown, DropdownItem, Users, Token},
mixins: [Utils], mixins: [Utils],
data() { data() {