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