@ibiz-template/vue3-components 0.7.41-alpha.121 → 0.7.41-alpha.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-YGY0RKUR.js → index-BoohvOk8.js} +13 -13
- package/dist/{index.es-AEZP6Fvy.js → index.es-DRy77DO2.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-zpJYuJGU.js → wang-editor-B_LobLwM.js} +1 -1
- package/dist/{xlsx-util-Crzb5rtS.js → xlsx-util-Zj1X0MzV.js} +1 -1
- package/es/common/data-import/data-import.mjs +1 -1
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.mjs +3 -2
- package/es/editor/map-picker/map-picker-editor.controller.mjs +1 -1
- package/es/editor/text-box/input/input.mjs +1 -1
- package/es/panel-component/auth-userinfo/auth-userinfo.mjs +1 -1
- package/es/panel-component/user-action/user-action.mjs +3 -3
- package/es/panel-component/user-message/user-message.mjs +1 -1
- package/es/util/ai-chat-util/ai-chat-util.mjs +11 -0
- package/es/view/403-view/403-view.mjs +1 -1
- package/es/view/404-view/404-view.mjs +1 -1
- package/es/view/login-view/login-view.mjs +2 -3
- package/es/view/share-view/share-view.mjs +1 -1
- package/es/view/unauthorized-view/unauthorized-view.mjs +1 -1
- package/es/web-app/guard/auth-guard/auth-guard.mjs +3 -1
- package/es/web-app/guard/auth-guard/dyna-auth-guard.mjs +7 -1
- package/lib/common/data-import/data-import.cjs +1 -1
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +3 -2
- package/lib/editor/map-picker/map-picker-editor.controller.cjs +1 -1
- package/lib/editor/text-box/input/input.cjs +1 -1
- package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +1 -1
- package/lib/panel-component/user-action/user-action.cjs +3 -3
- package/lib/panel-component/user-message/user-message.cjs +1 -1
- package/lib/util/ai-chat-util/ai-chat-util.cjs +11 -0
- package/lib/view/403-view/403-view.cjs +1 -1
- package/lib/view/404-view/404-view.cjs +1 -1
- package/lib/view/login-view/login-view.cjs +2 -3
- package/lib/view/share-view/share-view.cjs +1 -1
- package/lib/view/unauthorized-view/unauthorized-view.cjs +1 -1
- package/lib/web-app/guard/auth-guard/auth-guard.cjs +3 -1
- package/lib/web-app/guard/auth-guard/dyna-auth-guard.cjs +7 -1
- package/package.json +5 -5
- package/src/common/data-import/data-import.tsx +1 -1
- package/src/editor/ai-chat/embed-ai-chat/embed-ai-chat.tsx +7 -2
- package/src/editor/map-picker/map-picker-editor.controller.ts +1 -1
- package/src/editor/text-box/input/input.tsx +1 -1
- package/src/panel-component/auth-userinfo/auth-userinfo.tsx +1 -1
- package/src/panel-component/user-action/user-action.tsx +3 -3
- package/src/panel-component/user-message/user-message.tsx +1 -1
- package/src/util/ai-chat-util/ai-chat-util.ts +17 -0
- package/src/view/403-view/403-view.tsx +1 -1
- package/src/view/404-view/404-view.tsx +1 -4
- package/src/view/login-view/login-view.tsx +3 -3
- package/src/view/share-view/share-view.tsx +1 -1
- package/src/view/unauthorized-view/unauthorized-view.tsx +1 -4
- package/src/web-app/guard/auth-guard/auth-guard.ts +3 -4
- package/src/web-app/guard/auth-guard/dyna-auth-guard.ts +18 -1
|
@@ -25,10 +25,7 @@ export const View404 = defineComponent({
|
|
|
25
25
|
render() {
|
|
26
26
|
return (
|
|
27
27
|
<div class={[this.ns.b(), this.ns.is('top', this.isTop)]}>
|
|
28
|
-
<img
|
|
29
|
-
class={this.ns.b('img')}
|
|
30
|
-
src={`${ibiz.env.assetsUrl}/images/404.png`}
|
|
31
|
-
/>
|
|
28
|
+
<img class={this.ns.b('img')} src={ibiz.config.imageAssets.noFind} />
|
|
32
29
|
<div class={this.ns.b('text')}>
|
|
33
30
|
<div class={this.ns.be('text', 'text1')}>
|
|
34
31
|
{ibiz.i18n.t('view.noResourcesView.noResourcePrompt')}
|
|
@@ -170,7 +170,7 @@ export const LoginView = defineComponent({
|
|
|
170
170
|
await ibiz.hub.config.view.get('AppLoginView');
|
|
171
171
|
if (loginViewConfig) {
|
|
172
172
|
loginView.value = loginViewConfig;
|
|
173
|
-
hasLoginView.value = true;
|
|
173
|
+
// hasLoginView.value = true;
|
|
174
174
|
}
|
|
175
175
|
} catch (err) {
|
|
176
176
|
ibiz.log.warn(err);
|
|
@@ -197,13 +197,13 @@ export const LoginView = defineComponent({
|
|
|
197
197
|
<div class={ns.b()}>
|
|
198
198
|
<div class={ns.b('box')}>
|
|
199
199
|
<header class={ns.b('box-header')}>
|
|
200
|
-
<img src=
|
|
200
|
+
<img src={ibiz.config.imageAssets.loginHeader} />
|
|
201
201
|
<span class={ns.b('box-header-title')}>{appTitle}</span>
|
|
202
202
|
</header>
|
|
203
203
|
<main class={ns.b('box-main')}>
|
|
204
204
|
<img
|
|
205
205
|
class={ns.be('box-main', 'avatar')}
|
|
206
|
-
src=
|
|
206
|
+
src={ibiz.config.imageAssets.loginAvatar}
|
|
207
207
|
/>
|
|
208
208
|
<div class={ns.b('box-main-content')}>
|
|
209
209
|
<el-form model={loginData} rules={rules} ref={formRef}>
|
|
@@ -66,7 +66,7 @@ export const ShareView = defineComponent({
|
|
|
66
66
|
<div class={this.ns.b()}>
|
|
67
67
|
<div class={this.ns.b('box')}>
|
|
68
68
|
<header class={this.ns.b('box-header')}>
|
|
69
|
-
<img src=
|
|
69
|
+
<img src={ibiz.config.imageAssets.loginHeader} />
|
|
70
70
|
<div class={this.ns.b('box-header-title')}>
|
|
71
71
|
<div>{this.shareUser.userName}</div>
|
|
72
72
|
{ibiz.i18n.t('view.shareView.inviting')}
|
|
@@ -61,10 +61,7 @@ export const UnauthorizedView = defineComponent({
|
|
|
61
61
|
})
|
|
62
62
|
) : (
|
|
63
63
|
<div class={ns.b()}>
|
|
64
|
-
<img
|
|
65
|
-
class={ns.e('img')}
|
|
66
|
-
src={`${ibiz.env.assetsUrl}/images/404.png`}
|
|
67
|
-
/>
|
|
64
|
+
<img class={ns.e('img')} src={ibiz.config.imageAssets.noFind} />
|
|
68
65
|
<div class={ns.e('tips')}>
|
|
69
66
|
{ibiz.i18n.t('view.noResourcesView.noResourcePrompt')}
|
|
70
67
|
<br />
|
|
@@ -319,11 +319,10 @@ export class AuthGuard {
|
|
|
319
319
|
const app = ibiz.hub.getApp();
|
|
320
320
|
const uiThemes = app.model.appUIThemes || [];
|
|
321
321
|
if (uiThemes.length > 0) {
|
|
322
|
-
//
|
|
322
|
+
// 加载颜色主题(远程插件 or 主题变量),图标主题优先判断避免带样式变量的图标主题被重复加载
|
|
323
323
|
const colorThemes = uiThemes.filter(uiTheme => {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
);
|
|
324
|
+
const isIconTheme = uiTheme.themeParams?.['icon-theme'] === 'true';
|
|
325
|
+
return !isIconTheme && Boolean(uiTheme.cssStyle || uiTheme.themeParams);
|
|
327
326
|
});
|
|
328
327
|
if (colorThemes.length > 0) {
|
|
329
328
|
for (let index = 0; index < colorThemes.length; index++) {
|
|
@@ -2,6 +2,9 @@ import { ModelHelper } from '@ibiz-template/model-helper';
|
|
|
2
2
|
import { AppHooks } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { AuthGuard } from './auth-guard';
|
|
4
4
|
|
|
5
|
+
// 预定义主题标记(light | dark | blue),样式内置于主题包,无需等待应用主题模型加载即可直接设置
|
|
6
|
+
const PREDEFINED_THEMES = ['light', 'dark', 'blue'];
|
|
7
|
+
|
|
5
8
|
export class DynaAuthGuard extends AuthGuard {
|
|
6
9
|
hasModelInit: boolean = false;
|
|
7
10
|
|
|
@@ -39,9 +42,23 @@ export class DynaAuthGuard extends AuthGuard {
|
|
|
39
42
|
const module = await import('@ibiz-template/web-theme');
|
|
40
43
|
const theme = module.default || module;
|
|
41
44
|
AppHooks.useComponent.callSync(null, theme);
|
|
42
|
-
|
|
45
|
+
// 预定义主题才可直接设置,主要是为了修复用户未授权访问界面时,应用模型appUIThemes暂时未到位,直接设置非预定义主题标记可能会导致界面异常
|
|
46
|
+
if (ibiz.config.theme && PREDEFINED_THEMES.includes(ibiz.config.theme)) {
|
|
47
|
+
ibiz.util.theme.setTheme(ibiz.config.theme);
|
|
48
|
+
}
|
|
43
49
|
if (appModel.appUIThemes) {
|
|
44
50
|
await this.loadTheme();
|
|
51
|
+
// 加载完主题后,仅当配置主题已具备样式来源(预定义或应用主题模型内)时才设置标记,避免设置无样式主题导致界面异常
|
|
52
|
+
const themeTags = appModel.appUIThemes
|
|
53
|
+
.map(uiTheme => uiTheme.themeTag)
|
|
54
|
+
.filter(tag => !!tag) as string[];
|
|
55
|
+
if (
|
|
56
|
+
ibiz.config.theme &&
|
|
57
|
+
(PREDEFINED_THEMES.includes(ibiz.config.theme) ||
|
|
58
|
+
themeTags.includes(ibiz.config.theme))
|
|
59
|
+
) {
|
|
60
|
+
ibiz.util.theme.setTheme(ibiz.config.theme);
|
|
61
|
+
}
|
|
45
62
|
}
|
|
46
63
|
|
|
47
64
|
// 设置浏览器标题
|