feat: use staticBaseUrl for all static resources (#1015)

* feat: modify system image link

* Update App.less

Co-authored-by: Yang Luo <hsluoyz@qq.com>
This commit is contained in:
leoshine
2022-08-15 09:18:21 +08:00
committed by GitHub
parent ca13247572
commit ba732b3075
8 changed files with 19 additions and 12 deletions

View File

@ -1,5 +1,7 @@
@import '~antd/dist/antd.less';
@StaticBaseUrl:"https://cdn.casbin.org";
.App {
text-align: center;
}
@ -46,7 +48,7 @@
}
.language_box {
background: url("https://cdn.casbin.org/img/muti_language.svg");
background: url("@{StaticBaseUrl}/img/muti_language.svg");
background-size: 25px, 25px;
background-position: center;
background-repeat: no-repeat;

View File

@ -30,7 +30,7 @@ class ApplicationListPage extends BaseListPage {
name: `application_${randomName}`,
createdTime: moment().format(),
displayName: `New Application - ${randomName}`,
logo: "https://cdn.casdoor.com/logo/casdoor-logo_1185x256.png",
logo: `${Setting.StaticBaseUrl}/img/casdoor-logo_1185x256.png`,
enablePassword: true,
enableSignUp: true,
enableSigninSession: false,

View File

@ -30,11 +30,11 @@ class OrganizationListPage extends BaseListPage {
createdTime: moment().format(),
displayName: `New Organization - ${randomName}`,
websiteUrl: "https://door.casdoor.com",
favicon: "https://cdn.casdoor.com/static/favicon.png",
favicon: `${Setting.StaticBaseUrl}/img/favicon.png`,
passwordType: "plain",
PasswordSalt: "",
phonePrefix: "86",
defaultAvatar: "https://casbin.org/img/casbin.svg",
defaultAvatar: `${Setting.StaticBaseUrl}/img/casbin.svg`,
tags: [],
masterPassword: "",
enableSoftDeletion: false,

View File

@ -30,7 +30,7 @@ class ProductListPage extends BaseListPage {
name: `product_${randomName}`,
createdTime: moment().format(),
displayName: `New Product - ${randomName}`,
image: "https://cdn.casdoor.com/logo/casdoor-logo_1185x256.png",
image: `${Setting.StaticBaseUrl}/img/casdoor-logo_1185x256.png`,
tag: "Casdoor Summit 2022",
currency: "USD",
price: 300,

View File

@ -49,7 +49,7 @@ class UserListPage extends BaseListPage {
password: "123",
passwordSalt: "",
displayName: `New User - ${randomName}`,
avatar: "https://casbin.org/img/casbin.svg",
avatar: `${Setting.StaticBaseUrl}/img/casbin.svg`,
email: `${randomName}@example.com`,
phone: Setting.getRandomNumber(),
address: [],

View File

@ -56,7 +56,7 @@ class HomePage extends React.Component {
if (filename === "/account") {
filename = "/users";
}
items[i].logo = `https://cdn.casbin.com/static/img${filename}.png`;
items[i].logo = `${Setting.StaticBaseUrl}/img${filename}.png`;
items[i].createdTime = "";
}
} else {