切换admin路径为dashboard

This commit is contained in:
MarSeventh
2024-09-13 14:30:39 +08:00
parent d72f3d4f4e
commit 4bab2852b5
22 changed files with 62 additions and 7 deletions

View File

@@ -201,7 +201,7 @@
- 进入项目对应`部署`->`所有部署`,选择最新的一个,点击后面更多按钮(`···`),选择`重试部署`
- 部署完成后,访问`http(s)://你的域名/admin`即可进入后台管理页面
- 部署完成后,访问`http(s)://你的域名/dashboard`即可进入后台管理页面
#### 3.1.4图片审查

View File

@@ -34,7 +34,7 @@
position: absolute;
right: 0px;
" v-if="showLogoutButton">
<a href="./admin">
<a href="/dashboard">
<el-button
size="mini"
type="warning"

1
css/244.38c465e0.css Normal file

File diff suppressed because one or more lines are too long

BIN
css/244.38c465e0.css.gz Normal file

Binary file not shown.

1
css/522.3ec27238.css Normal file
View File

@@ -0,0 +1 @@
.login[data-v-45609ed2]{display:flex;justify-content:center;align-items:center;height:100vh;background:linear-gradient(90deg,#ffd7e4,#c8f1ff)}.login-container[data-v-45609ed2]{display:flex;flex-direction:column;justify-content:space-around;align-items:center;height:40vh;width:40vw;border-radius:12px;box-shadow:0 0 12px rgba(0,0,0,.12);background-color:hsla(0,0%,100%,.6);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);transition:all .3s ease}@media (max-width:768px){.login-container[data-v-45609ed2]{width:80vw}}.login-container[data-v-45609ed2]:hover{box-shadow:0 0 12px 4px rgba(0,0,0,.24);transform:translateY(-5px)}.input-container[data-v-45609ed2]{display:flex;align-items:center;width:35vw}@media (max-width:768px){.input-container[data-v-45609ed2]{width:75vw}}.input-name[data-v-45609ed2]{width:12vw}@media (max-width:768px){.input-name[data-v-45609ed2]{width:28vw}}.submit[data-v-45609ed2]{margin-top:10px}

BIN
css/522.3ec27238.css.gz Normal file

Binary file not shown.

View File

@@ -10,7 +10,7 @@ export async function onRequest(context) {
} = context;
//get the request url
const url = new URL(request.url);
//redirect to admin page
return Response.redirect(url.origin+"/admin.html", 302)
//redirect to dashboard page
return Response.redirect(url.origin+"/dashboard", 302)
}

View File

@@ -81,8 +81,8 @@ export async function onRequest(context) { // Contents of context object
});
if (response.ok) {
// Referer header equal to the admin page
if (request.headers.get('Referer') == url.origin + "/admin") {
// Referer header equal to the dashboard page
if (request.headers.get('Referer') == url.origin + "/dashboard") {
//show the image
return newRes;
}

View File

@@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/logo.png"><title>Sanyue ImgHub</title><script defer="defer" src="/js/app.d924cb5f.js"></script><link href="/css/app.def7ef9b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but sanyue_imghub doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/logo.png"><title>Sanyue ImgHub</title><script defer="defer" src="/js/app.4e19a760.js"></script><link href="/css/app.def7ef9b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but sanyue_imghub doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

Binary file not shown.

2
js/244.6a0448bd.js Normal file

File diff suppressed because one or more lines are too long

BIN
js/244.6a0448bd.js.gz Normal file

Binary file not shown.

1
js/244.6a0448bd.js.map Normal file

File diff suppressed because one or more lines are too long

BIN
js/244.6a0448bd.js.map.gz Normal file

Binary file not shown.

2
js/522.61a8dfb4.js Normal file
View File

@@ -0,0 +1,2 @@
"use strict";(self["webpackChunksanyue_imghub"]=self["webpackChunksanyue_imghub"]||[]).push([[522],{9522:function(e,s,a){a.r(s),a.d(s,{default:function(){return k}});var n=a(47),t=(a(5331),a(9648),a(2105)),o=(a(9092),a(6768)),r=a(5130);const i={class:"login"},l={class:"login-container"},u={class:"input-container"},d={class:"input-container"};function c(e,s,a,c,h,m){const p=t.WK,k=n.S2;return(0,o.uX)(),(0,o.CE)("div",i,[(0,o.Lk)("div",l,[s[5]||(s[5]=(0,o.Lk)("h1",null,"AdminLogin",-1)),(0,o.Lk)("div",u,[s[2]||(s[2]=(0,o.Lk)("a",{class:"input-name"},"用户名:",-1)),(0,o.bF)(p,{modelValue:h.username,"onUpdate:modelValue":s[0]||(s[0]=e=>h.username=e),placeholder:"请输入用户名"},null,8,["modelValue"])]),(0,o.Lk)("div",d,[s[3]||(s[3]=(0,o.Lk)("a",{class:"input-name"},"密码:",-1)),(0,o.bF)(p,{modelValue:h.password,"onUpdate:modelValue":s[1]||(s[1]=e=>h.password=e),placeholder:"请输入密码",type:"password","show-password":"",onKeyup:(0,r.jR)(m.login,["enter","native"])},null,8,["modelValue","onKeyup"])]),(0,o.bF)(k,{class:"submit",type:"primary",onClick:m.login},{default:(0,o.k6)((()=>s[4]||(s[4]=[(0,o.eW)("登录")]))),_:1},8,["onClick"])])])}a(4114),a(4979);var h={data(){return{password:"",username:""}},methods:{async login(){const e=btoa(`${this.username}:${this.password}`);try{const s=await fetch("/api/manage/check",{method:"GET",headers:{Authorization:`Basic ${e}`},credentials:"include"});401===s.status?this.$message.error("用户名或密码错误"):200===s.status?(this.$store.commit("setCredentials",e),this.$router.push("/dashboard")):this.$message.error("用户名或密码错误")}catch(s){this.$message.error("服务器错误")}}}},m=a(1241);const p=(0,m.A)(h,[["render",c],["__scopeId","data-v-45609ed2"]]);var k=p}}]);
//# sourceMappingURL=522.61a8dfb4.js.map

BIN
js/522.61a8dfb4.js.gz Normal file

Binary file not shown.

1
js/522.61a8dfb4.js.map Normal file

File diff suppressed because one or more lines are too long

BIN
js/522.61a8dfb4.js.map.gz Normal file

Binary file not shown.

46
js/app.4e19a760.js Normal file

File diff suppressed because one or more lines are too long

BIN
js/app.4e19a760.js.gz Normal file

Binary file not shown.

1
js/app.4e19a760.js.map Normal file

File diff suppressed because one or more lines are too long

BIN
js/app.4e19a760.js.map.gz Normal file

Binary file not shown.