自动更新cookie

This commit is contained in:
2025-11-14 20:10:55 +08:00
parent c6c7496449
commit 710d72aefe
14 changed files with 221 additions and 39 deletions
@@ -178,7 +178,6 @@ onMounted(() => {
<div v-else class="nav-item">
<div class="dropdown">
<div
class="nav-link d-flex lh-1 p-0 px-2"
data-bs-toggle="dropdown"
aria-label="Open user menu"
@@ -194,12 +193,60 @@ onMounted(() => {
</div>
</div>
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<a href="#" class="dropdown-item">Status</a>
<a href="./profile.html" class="dropdown-item">Profile</a>
<a href="#" class="dropdown-item">Feedback</a>
<router-link to="" class="dropdown-item">{{
t("message.user_home")
}}</router-link>
<router-link to="" class="dropdown-item">{{
t("message.user_settings")
}}</router-link>
<router-link to="" class="dropdown-item">{{
t("message.preferences")
}}</router-link>
<div class="dropdown-divider"></div>
<a href="./settings.html" class="dropdown-item">Settings</a>
<div @click="logOut" class="dropdown-item">Logout</div>
<!-- 如何用户是系统管理员这里显示跳转管理的url -->
<router-link to="/admin" class="dropdown-item">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-settings"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"
/>
<path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
</svg>
{{ t("message.administrator") }}</router-link
>
<div @click="logOut" class="dropdown-item">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-logout-2"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M10 8v-2a2 2 0 0 1 2 -2h7a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-2"
/>
<path d="M15 12h-12l3 -3" />
<path d="M6 15l-3 -3" />
</svg>
{{ t("message.logout") }}
</div>
</div>
</div>
</div>