Compare commits
18 Commits
0da21ca392
...
3e747da811
Author | SHA1 | Date |
---|---|---|
Jonathan Bout | 3e747da811 | |
Jonathan Bout | b69d3703d5 | |
Jonathan Bout | 8386cda448 | |
Jonathan Bout | ab5a6e4bf4 | |
Jonathan Bout | b1c368177e | |
Jonathan Bout | b13c118b06 | |
Oleg Lobanov | 6b094e10cb | |
Jonathan Bout | 86fef39a40 | |
Jonathan Bout | 869eb1cbac | |
Jonathan Bout | 8307232ed5 | |
Jonathan Bout | 1d2d7ce72b | |
Jonathan Bout | adc83ddb12 | |
Jonathan Bout | 35a4738fb0 | |
Jonathan Bout | 3ea3603e5e | |
Jonathan Bout | 09c1619be9 | |
Jonathan Bout | 18b624d9d7 | |
Jonathan Bout | 3335b6f812 | |
Jonathan Bout | 1909312b89 |
|
@ -1,5 +1,9 @@
|
|||
<template>
|
||||
<nav :class="{ active }">
|
||||
<button v-if="user.username" @click="toAccountSettings" class="action">
|
||||
<i class="material-icons">person</i>
|
||||
<span>{{ user.username }}</span>
|
||||
</button>
|
||||
<template v-if="isLoggedIn">
|
||||
<button
|
||||
class="action"
|
||||
|
@ -33,7 +37,7 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div v-if="user.perm.admin">
|
||||
<button
|
||||
class="action"
|
||||
@click="toSettings"
|
||||
|
@ -43,19 +47,18 @@
|
|||
<i class="material-icons">settings_applications</i>
|
||||
<span>{{ $t("sidebar.settings") }}</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
v-if="canLogout"
|
||||
@click="logout"
|
||||
class="action"
|
||||
id="logout"
|
||||
:aria-label="$t('sidebar.logout')"
|
||||
:title="$t('sidebar.logout')"
|
||||
>
|
||||
<i class="material-icons">exit_to_app</i>
|
||||
<span>{{ $t("sidebar.logout") }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
v-if="canLogout"
|
||||
@click="logout"
|
||||
class="action"
|
||||
id="logout"
|
||||
:aria-label="$t('sidebar.logout')"
|
||||
:title="$t('sidebar.logout')"
|
||||
>
|
||||
<i class="material-icons">exit_to_app</i>
|
||||
<span>{{ $t("sidebar.logout") }}</span>
|
||||
</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<router-link
|
||||
|
@ -180,8 +183,12 @@ export default {
|
|||
this.$router.push({ path: "/files" });
|
||||
this.closeHovers();
|
||||
},
|
||||
toAccountSettings() {
|
||||
this.$router.push({ path: "/settings/profile" });
|
||||
this.$store.commit("closeHovers");
|
||||
},
|
||||
toSettings() {
|
||||
this.$router.push({ path: "/settings" });
|
||||
this.$router.push({ path: "/settings/global" });
|
||||
this.closeHovers();
|
||||
},
|
||||
help() {
|
||||
|
|
|
@ -30,6 +30,7 @@ type userInfo struct {
|
|||
LockPassword bool `json:"lockPassword"`
|
||||
HideDotfiles bool `json:"hideDotfiles"`
|
||||
DateFormat bool `json:"dateFormat"`
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
type authToken struct {
|
||||
|
@ -195,6 +196,7 @@ func printToken(w http.ResponseWriter, _ *http.Request, d *data, user *users.Use
|
|||
Commands: user.Commands,
|
||||
HideDotfiles: user.HideDotfiles,
|
||||
DateFormat: user.DateFormat,
|
||||
Username: user.Username,
|
||||
},
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
IssuedAt: jwt.NewNumericDate(time.Now()),
|
||||
|
|
Loading…
Reference in New Issue