Skip to content

Commit

Permalink
[Improve]: header bar add Qrcode image & add language header (#3562)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangsizhu0504 authored Feb 18, 2024
1 parent ae9c88b commit f65a877
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@
</a-button>
<Divider type="vertical" />

<Icon icon="ant-design:qrcode-outlined" :class="`${prefixCls}-action__item`" />
<Popover
placement="bottom"
trigger="hover"
arrow-point-at-center
>
<template #content>
<img src="/@/assets/images/join_wechat.png" alt="qrcode" class="h-150px w-150px"/>
</template>
<Icon icon="ant-design:qrcode-outlined" :class="`${prefixCls}-action__item`" />
</Popover>

<!-- Github info -->
<Github :class="`${prefixCls}-action__item github-item`" />
Expand Down Expand Up @@ -69,7 +78,7 @@
import { defineComponent, unref, computed } from 'vue';
import { propTypes } from '/@/utils/propTypes';
import { Layout, Divider } from 'ant-design-vue';
import { Layout, Divider, Popover } from 'ant-design-vue';
import { AppLogo } from '/@/components/Application';
import LayoutMenu from '../menu/index.vue';
import LayoutTrigger from '../trigger/index.vue';
Expand Down Expand Up @@ -121,6 +130,7 @@
LockScreen,
Divider,
AppDarkModeToggle,
Popover
},
props: {
fixed: propTypes.bool,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { useErrorLogStoreWithOut } from '/@/store/modules/errorLog';
import { useI18n } from '/@/hooks/web/useI18n';
import { joinTimestamp, formatRequestDate } from './helper';
import { useUserStoreWithOut } from '/@/store/modules/user';
import { useLocaleStoreWithOut } from '/@/store/modules/locale';
import { AxiosRetry } from '/@/utils/http/axios/axiosRetry';
import { errorHandler } from './errorHandle';

Expand Down Expand Up @@ -93,6 +94,8 @@ const transform: AxiosTransform = {
const data = config.data || false;
formatDate && data && !isString(data) && formatRequestDate(data);
const teamId = getUserTeamId();
const localStore = useLocaleStoreWithOut();
config.headers = Object.assign(config.headers || {}, { 'language': localStore.getLocale });
if (config.method?.toUpperCase() === RequestEnum.GET) {
if (!isString(params)) {
// Add a timestamp parameter to the get request to avoid taking data from the cache.
Expand Down

0 comments on commit f65a877

Please sign in to comment.