aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/App.scss2
-rw-r--r--src/App.vue3
-rw-r--r--src/components/user_finder/user_finder.js6
-rw-r--r--src/components/user_finder/user_finder.vue20
4 files changed, 24 insertions, 7 deletions
diff --git a/src/App.scss b/src/App.scss
index 3db81537..a5f190cb 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -52,6 +52,8 @@ button{
.item {
flex: 1;
+ line-height: 21px;
+ height: 21px;
}
.gaps > .item {
diff --git a/src/App.vue b/src/App.vue
index d0c6671e..d77c34bb 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,6 +6,7 @@
<router-link :to="{ name: 'root'}">{{sitename}}</router-link>
</div>
<div class='item right'>
+ <user-finder></user-finder>
<router-link :to="{ name: 'settings'}"><i class="icon-cog"></i></router-link>
</div>
</div>
@@ -19,7 +20,7 @@
<div class="sidebar" :class="{ 'mobile-hidden': mobileActivePanel != 'sidebar' }">
<div class="sidebar-container">
<user-panel></user-panel>
- <user-finder></user-finder>
+
<nav-panel></nav-panel>
<notifications v-if="currentUser"></notifications>
</div>
diff --git a/src/components/user_finder/user_finder.js b/src/components/user_finder/user_finder.js
index a6bf08b6..03205382 100644
--- a/src/components/user_finder/user_finder.js
+++ b/src/components/user_finder/user_finder.js
@@ -1,6 +1,7 @@
const UserFinder = {
data: () => ({
- username: undefined
+ username: undefined,
+ hidden: true
}),
methods: {
findUser (username) {
@@ -11,6 +12,9 @@ const UserFinder = {
this.$router.push({name: 'user-profile', params: {id: user.id}})
}
})
+ },
+ toggleHidden () {
+ this.hidden = !this.hidden
}
}
}
diff --git a/src/components/user_finder/user_finder.vue b/src/components/user_finder/user_finder.vue
index 2fbf1693..c23d8ee0 100644
--- a/src/components/user_finder/user_finder.vue
+++ b/src/components/user_finder/user_finder.vue
@@ -1,13 +1,23 @@
<template>
- <div class="user-finder-panel panel panel-default base00-background">
- <input @keyup.enter="findUser(username)" v-model="username" placeholder="Find user" id="user-finder-input" type="text" />
- </div>
+ <a href="#" v-if="hidden"><i class="icon-user-plus user-finder-icon" @click.prevent="toggleHidden"/></a>
+ <span v-else>
+ <input class="user-finder-input base03-border" @keyup.enter="findUser(username)" v-model="username" placeholder="Find user" id="user-finder-input" type="text"/>
+ <i class="icon-cancel user-finder-icon" @click="toggleHidden"/>
+ </span>
</template>
<script src="./user_finder.js"></script>
<style lang="scss">
- .user-finder-panel {
- padding: 10px;
+ .user-finder-icon {
+ margin-right: 0.25em;
+ }
+
+ .user-finder-input {
+ border-width: 1px;
+ border-style: solid;
+ border-color: inherit;
+ border-radius: 5px;
+ padding: 0.1em 0.2em 0.2em 0.2em;
}
</style>