mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-13 23:21:00 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0b3f4eee9 | ||
|
|
6f65bcf2d5 | ||
|
|
8a97928d1d |
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -8,7 +8,6 @@
|
|||||||
<meta http-equiv="Cache-control" content="no-cache">
|
<meta http-equiv="Cache-control" content="no-cache">
|
||||||
<meta http-equiv="Cache" content="no-cache">
|
<meta http-equiv="Cache" content="no-cache">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
||||||
<title><%= webpackConfig.name %></title>
|
<title><%= webpackConfig.name %></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
@@ -207,7 +207,7 @@ export default {
|
|||||||
if (!d) {
|
if (!d) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
if (!itemColData || !itemColData.length) {
|
if (typeof itemColData !== 'number' && (!itemColData || !itemColData.length)) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
return itemColData.length
|
return itemColData.length
|
||||||
|
|||||||
@@ -2,13 +2,10 @@
|
|||||||
<div class="sidebar-logo-container" :class="{'collapse':collapse}">
|
<div class="sidebar-logo-container" :class="{'collapse':collapse}">
|
||||||
<transition name="sidebarLogoFade">
|
<transition name="sidebarLogoFade">
|
||||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||||
<img v-if="logo" :src="logo" class="sidebar-logo">
|
<img :src="logoSrc" class="sidebar-logo">
|
||||||
<h1 v-else class="sidebar-title">{{ title }}</h1>
|
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||||
<img :src="logoSrc" class="sidebar-logo-text">
|
<img :src="logoTextSrc" class="sidebar-logo-text">
|
||||||
<!-- <img v-else-if="logoText" :src="logoText" class="sidebar-logo-text">-->
|
|
||||||
<!-- <h1 class="sidebar-title">{{ title }}</h1>-->
|
|
||||||
</router-link>
|
</router-link>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,10 +23,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: 'JumpServer',
|
|
||||||
logoText: require('@/assets/img/logo-text.png'),
|
|
||||||
logo: require('@/assets/img/logo.png'),
|
|
||||||
xpackData: {}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -37,16 +30,14 @@ export default {
|
|||||||
'publicSettings'
|
'publicSettings'
|
||||||
]),
|
]),
|
||||||
// eslint-disable-next-line vue/return-in-computed-property
|
// eslint-disable-next-line vue/return-in-computed-property
|
||||||
logoSrc() {
|
logoTextSrc() {
|
||||||
if (this.publicSettings.LOGO_URLS.logo_index !== '/static/img/logo_text.png') {
|
|
||||||
return this.publicSettings.LOGO_URLS.logo_index
|
return this.publicSettings.LOGO_URLS.logo_index
|
||||||
} else {
|
},
|
||||||
return this.logoText
|
logoSrc() {
|
||||||
}
|
return this.publicSettings.LOGO_URLS.logo_logout
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
title: '.',
|
||||||
title: 'JumpServer',
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {boolean} true | false
|
* @type {boolean} true | false
|
||||||
|
|||||||
@@ -35,15 +35,18 @@ const actions = {
|
|||||||
getPublicSettings({ commit, state }) {
|
getPublicSettings({ commit, state }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getPublicSettings().then(response => {
|
getPublicSettings().then(response => {
|
||||||
const link = document.querySelector("link[rel*='icon']") || document.createElement('link')
|
const faviconURL = response.data.LOGO_URLS.favicon
|
||||||
|
let link = document.querySelector("link[rel*='icon']")
|
||||||
|
if (!link) {
|
||||||
|
link = document.createElement('link')
|
||||||
link.type = 'image/x-icon'
|
link.type = 'image/x-icon'
|
||||||
link.rel = 'shortcut icon'
|
link.rel = 'shortcut icon'
|
||||||
link.href = response.data.LOGO_URLS.favicon
|
|
||||||
document.getElementsByTagName('head')[0].appendChild(link)
|
document.getElementsByTagName('head')[0].appendChild(link)
|
||||||
|
}
|
||||||
|
link.href = faviconURL
|
||||||
|
|
||||||
// 动态修改Title
|
// 动态修改Title
|
||||||
if (response.data.LOGIN_TITLE) { document.title = response.data.LOGIN_TITLE }
|
document.title = response.data.LOGIN_TITLE
|
||||||
|
|
||||||
commit('SET_PUBLIC_SETTINGS', response.data)
|
commit('SET_PUBLIC_SETTINGS', response.data)
|
||||||
resolve(response)
|
resolve(response)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import getPageTitle from '@/utils/get-page-title'
|
// import getPageTitle from '@/utils/get-page-title'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import { Message } from 'element-ui'
|
import { Message } from 'element-ui'
|
||||||
@@ -15,9 +15,9 @@ function reject(msg) {
|
|||||||
return new Promise((resolve, reject) => reject(msg))
|
return new Promise((resolve, reject) => reject(msg))
|
||||||
}
|
}
|
||||||
|
|
||||||
function setHeadTitle({ to, from, next }) {
|
// function setHeadTitle({ to, from, next }) {
|
||||||
document.title = getPageTitle(to.meta.title)
|
// document.title = getPageTitle(to.meta.title)
|
||||||
}
|
// }
|
||||||
|
|
||||||
async function checkLogin({ to, from, next }) {
|
async function checkLogin({ to, from, next }) {
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
@@ -145,7 +145,7 @@ export async function startup({ to, from, next }) {
|
|||||||
|
|
||||||
// set page title
|
// set page title
|
||||||
await getPublicSetting({ to, from, next })
|
await getPublicSetting({ to, from, next })
|
||||||
await setHeadTitle({ to, from, next })
|
// await setHeadTitle({ to, from, next })
|
||||||
await checkLogin({ to, from, next })
|
await checkLogin({ to, from, next })
|
||||||
await changeCurrentOrgIfNeed({ to, from, next })
|
await changeCurrentOrgIfNeed({ to, from, next })
|
||||||
await changeCurrentRoleIfNeed({ to, from, next })
|
await changeCurrentRoleIfNeed({ to, from, next })
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export default {
|
|||||||
password: {
|
password: {
|
||||||
component: UserPassword,
|
component: UserPassword,
|
||||||
hidden: (formValue) => {
|
hidden: (formValue) => {
|
||||||
if (formValue.password_strategy) {
|
if (formValue.password_strategy === 'custom') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return !formValue.update_password
|
return !formValue.update_password
|
||||||
@@ -81,7 +81,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
hidden: (formValue) => {
|
hidden: (formValue) => {
|
||||||
if (formValue.password_strategy) {
|
if (formValue.password_strategy === 'custom') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return !formValue.update_password || !this.user.can_public_key_auth
|
return !formValue.update_password || !this.user.can_public_key_auth
|
||||||
@@ -148,7 +148,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
cleanFormValue(value) {
|
cleanFormValue(value) {
|
||||||
const method = this.getMethod()
|
const method = this.getMethod()
|
||||||
if (method === 'post' && !value.password_strategy) {
|
if (method === 'post' && value.password_strategy === 'email') {
|
||||||
delete value['password']
|
delete value['password']
|
||||||
if (this.currentOrgIsRoot) {
|
if (this.currentOrgIsRoot) {
|
||||||
delete value['groups']
|
delete value['groups']
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ const defaultSettings = require('./src/settings.js')
|
|||||||
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||||
const productionGzipExtensions = /\.(js|css|json|txt|ico|svg)(\?.*)?$/i
|
const productionGzipExtensions = /\.(js|css|json|txt|ico|svg)(\?.*)?$/i
|
||||||
|
|
||||||
|
|
||||||
function resolve(dir) {
|
function resolve(dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
const name = defaultSettings.title || 'JumpServer' // page title
|
const name = '' // page title
|
||||||
|
|
||||||
// If your port is set to 80,
|
// If your port is set to 80,
|
||||||
// use administrator privileges to execute the command line.
|
// use administrator privileges to execute the command line.
|
||||||
|
|||||||
Reference in New Issue
Block a user