dashboard-shell-shell 0.0.4 → 0.0.1000000000001124
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/assets/images/action.svg +6 -0
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/global/_button.scss +17 -10
- package/assets/styles/global/_form.scss +2 -2
- package/assets/styles/global/_labeled-input.scss +6 -3
- package/assets/styles/global/_select.scss +5 -6
- package/assets/styles/global/_tooltip.scss +8 -1
- package/assets/styles/themes/_dark.scss +2 -0
- package/assets/styles/themes/_light.scss +5 -2
- package/assets/styles/vendor/vue-select.scss +2 -1
- package/components/ActionDropdown.vue +1 -0
- package/components/ActionMenuShell.vue +6 -1
- package/components/BrandImage.vue +21 -0
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +1 -0
- package/components/CruResource.vue +1 -0
- package/components/CruResourceFooter.vue +1 -1
- package/components/IndentedPanel.vue +4 -10
- package/components/PromptRemove.vue +2 -2
- package/components/ResourceDetail/Masthead.vue +161 -232
- package/components/ResourceDetail/index.vue +20 -1
- package/components/ResourceList/Masthead-btn.vue +225 -0
- package/components/ResourceList/Masthead.vue +96 -68
- package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
- package/components/ResourceTable.vue +64 -1
- package/components/SideNav.vue +24 -17
- package/components/SortableTable/THead.vue +6 -0
- package/components/SortableTable/index.vue +474 -366
- package/components/Tabbed/index.vue +4 -5
- package/components/auth/Principal.vue +3 -2
- package/components/auth/RoleDetailEdit.vue +56 -3
- package/components/auth/SelectPrincipal.vue +1 -0
- package/components/form/BannerSettings.vue +18 -16
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +32 -8
- package/components/form/Footer.vue +1 -1
- package/components/form/InputWithSelect.vue +2 -0
- package/components/form/KeyValue.vue +31 -7
- package/components/form/LabeledSelect.vue +178 -178
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +24 -11
- package/components/form/Password.vue +6 -2
- package/components/form/Select.vue +2 -2
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +45 -24
- package/components/nav/Header.vue +103 -14
- package/components/nav/HeaderPageActionMenu.vue +1 -0
- package/components/nav/TopLevelMenu.vue +63 -23
- package/components/nav/Type.vue +24 -5
- package/composables/useClickOutside.ts +1 -1
- package/config/product/auth.js +1 -1
- package/config/product/explorer.js +1 -1
- package/config/product/settings.js +10 -10
- package/detail/management.cattle.io.user.vue +1 -0
- package/edit/management.cattle.io.user.vue +17 -4
- package/list/management.cattle.io.user.vue +23 -12
- package/list/provisioning.cattle.io.cluster.vue +6 -7
- package/mixins/brand.js +17 -0
- package/package.json +1 -1
- package/pages/auth/login.vue +8 -22
- package/pages/c/_cluster/auth/roles/index.vue +48 -14
- package/pages/c/_cluster/settings/banners.vue +164 -101
- package/pages/c/_cluster/settings/brand.vue +338 -301
- package/pages/c/_cluster/settings/performance.vue +53 -38
- package/pages/home.vue +64 -8
- package/pages/prefs.vue +23 -21
- package/rancher-components/Banner/Banner.vue +4 -0
- package/rancher-components/Card/Card.vue +3 -6
- package/rancher-components/Form/Checkbox/Checkbox.vue +3 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +4 -2
- package/rancher-components/Form/Radio/RadioButton.vue +3 -3
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +0 -4
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +9 -4
- package/rancher-components/RcDropdown/RcDropdownItem.vue +1 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +3 -2
- package/rancher-components/RcDropdown/types.ts +1 -0
- package/scripts/typegen.sh +0 -1
- package/store/i18n.js +5 -5
- package/store/prefs.js +1 -1
- package/store/type-map.js +2 -1
- package/utils/router.js +1 -1
- package/types/resources/fleet.d.ts +0 -57
- package/types/resources/pod-security-admission.ts +0 -36
- package/types/resources/settings.d.ts +0 -93
- package/types/resources/userPreferences.d.ts +0 -13
|
@@ -34,8 +34,8 @@ export default {
|
|
|
34
34
|
uiBannerLightSetting: fetchOrCreateSetting(this.$store, SETTING.BANNER_LIGHT, ''),
|
|
35
35
|
uiLoginBackgroundDarkSetting: fetchOrCreateSetting(this.$store, SETTING.LOGIN_BACKGROUND_DARK, ''),
|
|
36
36
|
uiLoginBackgroundLightSetting: fetchOrCreateSetting(this.$store, SETTING.LOGIN_BACKGROUND_LIGHT, ''),
|
|
37
|
-
uiColorSetting: fetchOrCreateSetting(this.$store, SETTING.PRIMARY_COLOR, ''),
|
|
38
|
-
uiLinkColorSetting: fetchOrCreateSetting(this.$store, SETTING.LINK_COLOR, ''),
|
|
37
|
+
uiColorSetting: fetchOrCreateSetting(this.$store, SETTING.PRIMARY_COLOR, 'rgb(24, 144, 255)'),
|
|
38
|
+
uiLinkColorSetting: fetchOrCreateSetting(this.$store, SETTING.LINK_COLOR, 'rgb(24, 144, 255)'),
|
|
39
39
|
uiFaviconSetting: fetchOrCreateSetting(this.$store, SETTING.FAVICON, ''),
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -249,329 +249,353 @@ export default {
|
|
|
249
249
|
|
|
250
250
|
<template>
|
|
251
251
|
<Loading v-if="$fetchState.pending" />
|
|
252
|
-
<div v-else>
|
|
252
|
+
<div v-else style="padding-bottom:60px;">
|
|
253
253
|
<h1 class="mb-20">
|
|
254
254
|
<TabTitle>{{ t('branding.label') }}</TabTitle>
|
|
255
255
|
</h1>
|
|
256
256
|
<TypeDescription resource="branding" />
|
|
257
257
|
<div>
|
|
258
|
+
<!-- 系统名称 -->
|
|
258
259
|
<div class="row">
|
|
259
|
-
<div class="
|
|
260
|
-
<
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
/>
|
|
266
|
-
</div>
|
|
267
|
-
</div>
|
|
268
|
-
<h3 class="mt-20 mb-5 pb-5">
|
|
269
|
-
{{ t('branding.logos.label') }}
|
|
270
|
-
</h3>
|
|
271
|
-
<label class="text-label">
|
|
272
|
-
{{ t('branding.logos.tip', {}, true) }}
|
|
273
|
-
</label>
|
|
274
|
-
|
|
275
|
-
<div class="row mt-10 mb-20">
|
|
276
|
-
<Checkbox
|
|
277
|
-
v-model:value="customizeLogo"
|
|
278
|
-
:label="t('branding.logos.useCustom')"
|
|
279
|
-
:mode="mode"
|
|
280
|
-
/>
|
|
281
|
-
</div>
|
|
282
|
-
|
|
283
|
-
<div
|
|
284
|
-
v-if="customizeLogo"
|
|
285
|
-
class="row mb-20"
|
|
286
|
-
>
|
|
287
|
-
<div class="col preview-container logo span-6">
|
|
288
|
-
<div class="mb-10">
|
|
289
|
-
<FileImageSelector
|
|
290
|
-
:byte-limit="20000"
|
|
291
|
-
:read-as-data-url="true"
|
|
292
|
-
class="role-secondary"
|
|
293
|
-
:label="t('branding.logos.uploadLight')"
|
|
260
|
+
<div class="mb-20 pl-20 pt-20" style="border: 1px solid var(--nav-border);width: 100%;">
|
|
261
|
+
<h3 class="mb-20">系统名称</h3>
|
|
262
|
+
<div class="col span-6">
|
|
263
|
+
<LabeledInput
|
|
264
|
+
v-model:value="uiPLSetting.value"
|
|
265
|
+
:label="'名称'"
|
|
294
266
|
:mode="mode"
|
|
295
|
-
|
|
296
|
-
@error="setError"
|
|
297
|
-
@update:value="updateBranding($event, 'uiLogoLight')"
|
|
267
|
+
:maxlength="100"
|
|
298
268
|
/>
|
|
299
269
|
</div>
|
|
300
|
-
<SimpleBox
|
|
301
|
-
v-if="uiLogoLight || uiLogoDark"
|
|
302
|
-
class="theme-light mb-10"
|
|
303
|
-
>
|
|
304
|
-
<label class="text-muted">{{ t('branding.logos.lightPreview') }}</label>
|
|
305
|
-
<img
|
|
306
|
-
class="img-preview"
|
|
307
|
-
data-testid="branding-logo-light-preview"
|
|
308
|
-
:src="uiLogoLight ? uiLogoLight : uiLogoDark"
|
|
309
|
-
>
|
|
310
|
-
</SimpleBox>
|
|
311
|
-
</div>
|
|
312
|
-
<div class="col preview-container logo span-6">
|
|
313
|
-
<div class="mb-10">
|
|
314
|
-
<FileImageSelector
|
|
315
|
-
:byte-limit="20000"
|
|
316
|
-
:read-as-data-url="true"
|
|
317
|
-
class="role-secondary"
|
|
318
|
-
:label="t('branding.logos.uploadDark')"
|
|
319
|
-
:mode="mode"
|
|
320
|
-
accept="image/jpeg,image/png,image/svg+xml"
|
|
321
|
-
@error="setError"
|
|
322
|
-
@update:value="updateBranding($event, 'uiLogoDark')"
|
|
323
|
-
/>
|
|
324
|
-
</div>
|
|
325
|
-
<SimpleBox
|
|
326
|
-
v-if="uiLogoDark || uiLogoLight"
|
|
327
|
-
class="theme-dark mb-10"
|
|
328
|
-
>
|
|
329
|
-
<label class="text-muted">{{ t('branding.logos.darkPreview') }}</label>
|
|
330
|
-
<img
|
|
331
|
-
class="img-preview"
|
|
332
|
-
data-testid="branding-logo-dark-preview"
|
|
333
|
-
:src="uiLogoDark ? uiLogoDark : uiLogoLight"
|
|
334
|
-
>
|
|
335
|
-
</SimpleBox>
|
|
336
270
|
</div>
|
|
337
271
|
</div>
|
|
338
272
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
<div
|
|
355
|
-
v-if="customizeBanner"
|
|
356
|
-
class="row mb-20"
|
|
357
|
-
>
|
|
358
|
-
<div class="col preview-container banner span-6">
|
|
359
|
-
<div class="mb-10">
|
|
360
|
-
<FileImageSelector
|
|
361
|
-
:byte-limit="200000"
|
|
362
|
-
:read-as-data-url="true"
|
|
363
|
-
class="role-secondary"
|
|
364
|
-
:label="t('branding.banner.uploadLight')"
|
|
365
|
-
:mode="mode"
|
|
366
|
-
accept="image/jpeg,image/png,image/svg+xml"
|
|
367
|
-
@error="setError"
|
|
368
|
-
@update:value="updateBranding($event, 'uiBannerLight')"
|
|
369
|
-
/>
|
|
370
|
-
</div>
|
|
371
|
-
<SimpleBox
|
|
372
|
-
v-if="uiBannerLight || uiBannerDark"
|
|
373
|
-
class="theme-light mb-10"
|
|
374
|
-
>
|
|
375
|
-
<label class="text-muted">{{ t('branding.banner.lightPreview') }}</label>
|
|
376
|
-
<img
|
|
377
|
-
class="img-preview"
|
|
378
|
-
data-testid="branding-banner-light-preview"
|
|
379
|
-
:src="uiBannerLight ? uiBannerLight : uiBannerDark"
|
|
380
|
-
>
|
|
381
|
-
</SimpleBox>
|
|
273
|
+
<!-- Logo -->
|
|
274
|
+
<div class="mb-20 pl-20" style="border: 1px solid var(--nav-border);">
|
|
275
|
+
<h3 class="mt-20 mb-20">
|
|
276
|
+
{{ t('branding.logos.label') }}
|
|
277
|
+
</h3>
|
|
278
|
+
<label class="text-label">
|
|
279
|
+
{{ t('branding.logos.tip', {}, true) }}
|
|
280
|
+
</label>
|
|
281
|
+
|
|
282
|
+
<div class="row mt-10 mb-20">
|
|
283
|
+
<Checkbox
|
|
284
|
+
v-model:value="customizeLogo"
|
|
285
|
+
:label="t('branding.logos.useCustom')"
|
|
286
|
+
:mode="mode"
|
|
287
|
+
/>
|
|
382
288
|
</div>
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
289
|
+
|
|
290
|
+
<div
|
|
291
|
+
v-if="customizeLogo"
|
|
292
|
+
class="row mb-20"
|
|
293
|
+
>
|
|
294
|
+
<div class="col preview-container logo span-6">
|
|
295
|
+
<div class="mb-10">
|
|
296
|
+
<FileImageSelector
|
|
297
|
+
:byte-limit="20000"
|
|
298
|
+
:read-as-data-url="true"
|
|
299
|
+
class="role-secondary"
|
|
300
|
+
:label="t('branding.logos.uploadLight')"
|
|
301
|
+
:mode="mode"
|
|
302
|
+
accept="image/jpeg,image/png,image/svg+xml"
|
|
303
|
+
@error="setError"
|
|
304
|
+
@update:value="updateBranding($event, 'uiLogoLight')"
|
|
305
|
+
/>
|
|
306
|
+
</div>
|
|
307
|
+
<SimpleBox
|
|
308
|
+
v-if="uiLogoLight || uiLogoDark"
|
|
309
|
+
class="theme-light mb-10"
|
|
310
|
+
>
|
|
311
|
+
<label class="text-muted">{{ t('branding.logos.lightPreview') }}</label>
|
|
312
|
+
<img
|
|
313
|
+
class="img-preview"
|
|
314
|
+
data-testid="branding-logo-light-preview"
|
|
315
|
+
:src="uiLogoLight ? uiLogoLight : uiLogoDark"
|
|
316
|
+
>
|
|
317
|
+
</SimpleBox>
|
|
395
318
|
</div>
|
|
396
|
-
<
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
319
|
+
<div class="col preview-container logo span-6">
|
|
320
|
+
<div class="mb-10">
|
|
321
|
+
<FileImageSelector
|
|
322
|
+
:byte-limit="20000"
|
|
323
|
+
:read-as-data-url="true"
|
|
324
|
+
class="role-secondary"
|
|
325
|
+
:label="t('branding.logos.uploadDark')"
|
|
326
|
+
:mode="mode"
|
|
327
|
+
accept="image/jpeg,image/png,image/svg+xml"
|
|
328
|
+
@error="setError"
|
|
329
|
+
@update:value="updateBranding($event, 'uiLogoDark')"
|
|
330
|
+
/>
|
|
331
|
+
</div>
|
|
332
|
+
<SimpleBox
|
|
333
|
+
v-if="uiLogoDark || uiLogoLight"
|
|
334
|
+
class="theme-dark mb-10"
|
|
405
335
|
>
|
|
406
|
-
|
|
336
|
+
<label class="text-muted">{{ t('branding.logos.darkPreview') }}</label>
|
|
337
|
+
<img
|
|
338
|
+
class="img-preview"
|
|
339
|
+
data-testid="branding-logo-dark-preview"
|
|
340
|
+
:src="uiLogoDark ? uiLogoDark : uiLogoLight"
|
|
341
|
+
>
|
|
342
|
+
</SimpleBox>
|
|
343
|
+
</div>
|
|
407
344
|
</div>
|
|
408
345
|
</div>
|
|
409
346
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
347
|
+
<!-- Banner -->
|
|
348
|
+
<div class="mb-20 pl-20" style="border: 1px solid var(--nav-border);">
|
|
349
|
+
<h3 class="mt-20 mb-20">
|
|
350
|
+
{{ t('branding.banner.label') }}
|
|
351
|
+
</h3>
|
|
352
|
+
<label class="text-label">
|
|
353
|
+
{{ t('branding.banner.tip', {}, true) }}
|
|
354
|
+
</label>
|
|
355
|
+
|
|
356
|
+
<div class="row mt-10 mb-20">
|
|
357
|
+
<Checkbox
|
|
358
|
+
v-model:value="customizeBanner"
|
|
359
|
+
:label="t('branding.banner.useCustom')"
|
|
360
|
+
:mode="mode"
|
|
361
|
+
/>
|
|
362
|
+
</div>
|
|
363
|
+
|
|
364
|
+
<div
|
|
365
|
+
v-if="customizeBanner"
|
|
366
|
+
class="row mb-20"
|
|
367
|
+
>
|
|
368
|
+
<div class="col preview-container banner span-6">
|
|
369
|
+
<div class="mb-10">
|
|
370
|
+
<FileImageSelector
|
|
371
|
+
:byte-limit="200000"
|
|
372
|
+
:read-as-data-url="true"
|
|
373
|
+
class="role-secondary"
|
|
374
|
+
:label="t('branding.banner.uploadLight')"
|
|
375
|
+
:mode="mode"
|
|
376
|
+
accept="image/jpeg,image/png,image/svg+xml"
|
|
377
|
+
@error="setError"
|
|
378
|
+
@update:value="updateBranding($event, 'uiBannerLight')"
|
|
379
|
+
/>
|
|
380
|
+
</div>
|
|
381
|
+
<SimpleBox
|
|
382
|
+
v-if="uiBannerLight || uiBannerDark"
|
|
383
|
+
class="theme-light mb-10"
|
|
384
|
+
>
|
|
385
|
+
<label class="text-muted">{{ t('branding.banner.lightPreview') }}</label>
|
|
386
|
+
<img
|
|
387
|
+
class="img-preview"
|
|
388
|
+
data-testid="branding-banner-light-preview"
|
|
389
|
+
:src="uiBannerLight ? uiBannerLight : uiBannerDark"
|
|
390
|
+
>
|
|
391
|
+
</SimpleBox>
|
|
392
|
+
</div>
|
|
393
|
+
<div class="col preview-container banner span-6">
|
|
394
|
+
<div class="mb-10">
|
|
395
|
+
<FileImageSelector
|
|
396
|
+
:byte-limit="200000"
|
|
397
|
+
:read-as-data-url="true"
|
|
398
|
+
class="role-secondary"
|
|
399
|
+
:label="t('branding.banner.uploadDark')"
|
|
400
|
+
:mode="mode"
|
|
401
|
+
accept="image/jpeg,image/png,image/svg+xml"
|
|
402
|
+
@error="setError"
|
|
403
|
+
@update:value="updateBranding($event, 'uiBannerDark')"
|
|
404
|
+
/>
|
|
405
|
+
</div>
|
|
406
|
+
<SimpleBox
|
|
407
|
+
v-if="uiBannerDark || uiBannerLight"
|
|
408
|
+
class="theme-dark mb-10"
|
|
409
|
+
>
|
|
410
|
+
<label class="text-muted">{{ t('branding.banner.darkPreview') }}</label>
|
|
411
|
+
<img
|
|
412
|
+
class="img-preview"
|
|
413
|
+
data-testid="branding-banner-dark-preview"
|
|
414
|
+
:src="uiBannerDark ? uiBannerDark : uiBannerLight"
|
|
415
|
+
>
|
|
416
|
+
</SimpleBox>
|
|
417
|
+
</div>
|
|
418
|
+
</div>
|
|
419
|
+
</div>
|
|
420
|
+
|
|
421
|
+
<!-- Login Background -->
|
|
422
|
+
<div class="mb-20 pl-20" style="border: 1px solid var(--nav-border);">
|
|
423
|
+
<h3 class="mt-20 mb-20">
|
|
424
|
+
{{ t('branding.loginBackground.label') }}
|
|
425
|
+
</h3>
|
|
426
|
+
<label class="text-label">
|
|
427
|
+
{{ t('branding.loginBackground.tip', {}, true) }}
|
|
428
|
+
</label>
|
|
429
|
+
|
|
430
|
+
<div class="row mt-10 mb-20">
|
|
431
|
+
<Checkbox
|
|
432
|
+
v-model:value="customizeLoginBackground"
|
|
433
|
+
:label="t('branding.loginBackground.useCustom')"
|
|
434
|
+
:mode="mode"
|
|
435
|
+
/>
|
|
436
|
+
</div>
|
|
437
|
+
|
|
438
|
+
<div
|
|
439
|
+
v-if="customizeLoginBackground"
|
|
440
|
+
class="row mb-20"
|
|
441
|
+
>
|
|
442
|
+
<div class="col preview-container login-background span-6">
|
|
443
|
+
<div class="mb-10">
|
|
444
|
+
<FileImageSelector
|
|
445
|
+
:byte-limit="200000"
|
|
446
|
+
:read-as-data-url="true"
|
|
447
|
+
class="role-secondary"
|
|
448
|
+
:label="t('branding.loginBackground.uploadLight')"
|
|
449
|
+
:mode="mode"
|
|
450
|
+
accept="image/jpeg,image/png,image/svg+xml"
|
|
451
|
+
@error="setError"
|
|
452
|
+
@update:value="updateBranding($event, 'uiLoginBackgroundLight')"
|
|
453
|
+
/>
|
|
454
|
+
</div>
|
|
455
|
+
<SimpleBox
|
|
456
|
+
v-if="uiLoginBackgroundLight || uiLoginBackgroundDark"
|
|
457
|
+
class="theme-light mb-10"
|
|
458
|
+
>
|
|
459
|
+
<label class="text-muted">{{ t('branding.loginBackground.lightPreview') }}</label>
|
|
460
|
+
<img
|
|
461
|
+
class="img-preview"
|
|
462
|
+
data-testid="branding-login-background-light-preview"
|
|
463
|
+
:src="uiLoginBackgroundLight ? uiLoginBackgroundLight : uiLoginBackgroundDark"
|
|
464
|
+
>
|
|
465
|
+
</SimpleBox>
|
|
466
|
+
</div>
|
|
467
|
+
<div class="col preview-container login-background span-6">
|
|
468
|
+
<div class="mb-10">
|
|
469
|
+
<FileImageSelector
|
|
470
|
+
:byte-limit="200000"
|
|
471
|
+
:read-as-data-url="true"
|
|
472
|
+
class="role-secondary"
|
|
473
|
+
:label="t('branding.loginBackground.uploadDark')"
|
|
474
|
+
:mode="mode"
|
|
475
|
+
accept="image/jpeg,image/png,image/svg+xml"
|
|
476
|
+
@error="setError"
|
|
477
|
+
@update:value="updateBranding($event, 'uiLoginBackgroundDark')"
|
|
478
|
+
/>
|
|
479
|
+
</div>
|
|
480
|
+
<SimpleBox
|
|
481
|
+
v-if="uiLoginBackgroundDark || uiLoginBackgroundLight"
|
|
482
|
+
class="theme-dark mb-10"
|
|
483
|
+
>
|
|
484
|
+
<label class="text-muted">{{ t('branding.loginBackground.darkPreview') }}</label>
|
|
485
|
+
<img
|
|
486
|
+
class="img-preview"
|
|
487
|
+
data-testid="branding-login-background-dark-preview"
|
|
488
|
+
:src="uiLoginBackgroundDark ? uiLoginBackgroundDark : uiLoginBackgroundLight"
|
|
489
|
+
>
|
|
490
|
+
</SimpleBox>
|
|
491
|
+
</div>
|
|
492
|
+
</div>
|
|
493
|
+
</div>
|
|
494
|
+
|
|
495
|
+
<!-- 网站图标 -->
|
|
496
|
+
<div class="mb-20 pl-20" style="border: 1px solid var(--nav-border);">
|
|
497
|
+
<h3 class="mt-20 mb-20">
|
|
498
|
+
{{ t('branding.favicon.label') }}
|
|
499
|
+
</h3>
|
|
500
|
+
<label class="text-label">
|
|
501
|
+
{{ t('branding.favicon.tip', {}, true) }}
|
|
502
|
+
</label>
|
|
503
|
+
|
|
504
|
+
<div class="row mt-10 mb-20">
|
|
505
|
+
<Checkbox
|
|
506
|
+
v-model:value="customizeFavicon"
|
|
507
|
+
:label="t('branding.favicon.useCustom')"
|
|
508
|
+
:mode="mode"
|
|
509
|
+
/>
|
|
510
|
+
</div>
|
|
511
|
+
|
|
512
|
+
<div
|
|
513
|
+
v-if="customizeFavicon"
|
|
514
|
+
class="row mb-20"
|
|
515
|
+
>
|
|
516
|
+
<div class="col favicon-container span-12">
|
|
517
|
+
<div class="mb-10">
|
|
518
|
+
<FileImageSelector
|
|
519
|
+
:byte-limit="20000"
|
|
520
|
+
:read-as-data-url="true"
|
|
521
|
+
class="role-secondary"
|
|
522
|
+
:label="t('branding.favicon.upload')"
|
|
523
|
+
:mode="mode"
|
|
524
|
+
accept="image/jpeg,image/png,image/svg+xml"
|
|
525
|
+
@error="setError"
|
|
526
|
+
@update:value="updateBranding($event, 'uiFavicon')"
|
|
527
|
+
/>
|
|
528
|
+
</div>
|
|
529
|
+
<SimpleBox v-if="uiFavicon">
|
|
530
|
+
<label class="text-muted">{{ t('branding.favicon.preview') }}</label>
|
|
531
|
+
<img
|
|
532
|
+
class="favicon-preview"
|
|
533
|
+
data-testid="branding-favicon-preview"
|
|
534
|
+
:src="uiFavicon"
|
|
535
|
+
>
|
|
536
|
+
</SimpleBox>
|
|
537
|
+
</div>
|
|
538
|
+
</div>
|
|
539
|
+
</div>
|
|
540
|
+
|
|
541
|
+
<!-- 主题色 -->
|
|
542
|
+
<div class="mb-20 pl-20 pb-20" style="border: 1px solid var(--nav-border);">
|
|
543
|
+
<h3 class="mt-20 mb-20">
|
|
544
|
+
{{ t('branding.color.label') }}
|
|
545
|
+
</h3>
|
|
546
|
+
<label class="text-label">
|
|
547
|
+
{{ t('branding.color.tip', {}, true) }}
|
|
548
|
+
</label>
|
|
549
|
+
<div class="row mt-20">
|
|
550
|
+
<Checkbox
|
|
551
|
+
v-model:value="customizeColor"
|
|
552
|
+
:label="t('branding.color.useCustom')"
|
|
553
|
+
:mode="mode"
|
|
554
|
+
/>
|
|
555
|
+
</div>
|
|
556
|
+
<div
|
|
557
|
+
v-if="customizeColor"
|
|
558
|
+
class="row mt-20 mb-20"
|
|
559
|
+
>
|
|
560
|
+
<ColorInput
|
|
561
|
+
v-model:value="uiColor"
|
|
562
|
+
component-testid="primary"
|
|
563
|
+
/>
|
|
564
|
+
</div>
|
|
565
|
+
</div>
|
|
566
|
+
|
|
567
|
+
<!-- 链接颜色 -->
|
|
568
|
+
<div class="mb-20 pl-20 pb-20" style="border: 1px solid var(--nav-border);">
|
|
569
|
+
<h3 class="mt-20 mb-20">
|
|
570
|
+
{{ t('branding.linkColor.label') }}
|
|
571
|
+
</h3>
|
|
572
|
+
<label class="text-label">
|
|
573
|
+
{{ t('branding.linkColor.tip', {}, true) }}
|
|
574
|
+
</label>
|
|
575
|
+
<div class="row mt-20">
|
|
576
|
+
<Checkbox
|
|
577
|
+
v-model:value="customizeLinkColor"
|
|
578
|
+
:label="t('branding.linkColor.useCustom')"
|
|
436
579
|
:mode="mode"
|
|
437
|
-
accept="image/jpeg,image/png,image/svg+xml"
|
|
438
|
-
@error="setError"
|
|
439
|
-
@update:value="updateBranding($event, 'uiLoginBackgroundLight')"
|
|
440
580
|
/>
|
|
441
581
|
</div>
|
|
442
|
-
<
|
|
443
|
-
v-if="
|
|
444
|
-
class="
|
|
582
|
+
<div
|
|
583
|
+
v-if="customizeLinkColor"
|
|
584
|
+
class="row mt-20 mb-20"
|
|
445
585
|
>
|
|
446
|
-
<
|
|
447
|
-
|
|
448
|
-
class="
|
|
449
|
-
|
|
450
|
-
:src="uiLoginBackgroundLight ? uiLoginBackgroundLight : uiLoginBackgroundDark"
|
|
451
|
-
>
|
|
452
|
-
</SimpleBox>
|
|
453
|
-
</div>
|
|
454
|
-
<div class="col preview-container login-background span-6">
|
|
455
|
-
<div class="mb-10">
|
|
456
|
-
<FileImageSelector
|
|
457
|
-
:byte-limit="200000"
|
|
458
|
-
:read-as-data-url="true"
|
|
459
|
-
class="role-secondary"
|
|
460
|
-
:label="t('branding.loginBackground.uploadDark')"
|
|
461
|
-
:mode="mode"
|
|
462
|
-
accept="image/jpeg,image/png,image/svg+xml"
|
|
463
|
-
@error="setError"
|
|
464
|
-
@update:value="updateBranding($event, 'uiLoginBackgroundDark')"
|
|
465
|
-
/>
|
|
466
|
-
</div>
|
|
467
|
-
<SimpleBox
|
|
468
|
-
v-if="uiLoginBackgroundDark || uiLoginBackgroundLight"
|
|
469
|
-
class="theme-dark mb-10"
|
|
470
|
-
>
|
|
471
|
-
<label class="text-muted">{{ t('branding.loginBackground.darkPreview') }}</label>
|
|
472
|
-
<img
|
|
473
|
-
class="img-preview"
|
|
474
|
-
data-testid="branding-login-background-dark-preview"
|
|
475
|
-
:src="uiLoginBackgroundDark ? uiLoginBackgroundDark : uiLoginBackgroundLight"
|
|
476
|
-
>
|
|
477
|
-
</SimpleBox>
|
|
478
|
-
</div>
|
|
479
|
-
</div>
|
|
480
|
-
|
|
481
|
-
<h3 class="mt-20 mb-5 pb-5">
|
|
482
|
-
{{ t('branding.favicon.label') }}
|
|
483
|
-
</h3>
|
|
484
|
-
<label class="text-label">
|
|
485
|
-
{{ t('branding.favicon.tip', {}, true) }}
|
|
486
|
-
</label>
|
|
487
|
-
|
|
488
|
-
<div class="row mt-10 mb-20">
|
|
489
|
-
<Checkbox
|
|
490
|
-
v-model:value="customizeFavicon"
|
|
491
|
-
:label="t('branding.favicon.useCustom')"
|
|
492
|
-
:mode="mode"
|
|
493
|
-
/>
|
|
494
|
-
</div>
|
|
495
|
-
|
|
496
|
-
<div
|
|
497
|
-
v-if="customizeFavicon"
|
|
498
|
-
class="row mb-20"
|
|
499
|
-
>
|
|
500
|
-
<div class="col favicon-container span-12">
|
|
501
|
-
<div class="mb-10">
|
|
502
|
-
<FileImageSelector
|
|
503
|
-
:byte-limit="20000"
|
|
504
|
-
:read-as-data-url="true"
|
|
505
|
-
class="role-secondary"
|
|
506
|
-
:label="t('branding.favicon.upload')"
|
|
507
|
-
:mode="mode"
|
|
508
|
-
accept="image/jpeg,image/png,image/svg+xml"
|
|
509
|
-
@error="setError"
|
|
510
|
-
@update:value="updateBranding($event, 'uiFavicon')"
|
|
586
|
+
<ColorInput
|
|
587
|
+
v-model:value="uiLinkColor"
|
|
588
|
+
class="col"
|
|
589
|
+
component-testid="link"
|
|
511
590
|
/>
|
|
591
|
+
<span class="col link-example">
|
|
592
|
+
<a :style="customLinkColor">
|
|
593
|
+
{{ t('branding.linkColor.example') }}
|
|
594
|
+
</a>
|
|
595
|
+
</span>
|
|
512
596
|
</div>
|
|
513
|
-
<SimpleBox v-if="uiFavicon">
|
|
514
|
-
<label class="text-muted">{{ t('branding.favicon.preview') }}</label>
|
|
515
|
-
<img
|
|
516
|
-
class="favicon-preview"
|
|
517
|
-
data-testid="branding-favicon-preview"
|
|
518
|
-
:src="uiFavicon"
|
|
519
|
-
>
|
|
520
|
-
</SimpleBox>
|
|
521
597
|
</div>
|
|
522
|
-
</div>
|
|
523
598
|
|
|
524
|
-
<h3 class="mt-40 mb-5 pb-0">
|
|
525
|
-
{{ t('branding.color.label') }}
|
|
526
|
-
</h3>
|
|
527
|
-
<label class="text-label">
|
|
528
|
-
{{ t('branding.color.tip', {}, true) }}
|
|
529
|
-
</label>
|
|
530
|
-
<div class="row mt-20">
|
|
531
|
-
<Checkbox
|
|
532
|
-
v-model:value="customizeColor"
|
|
533
|
-
:label="t('branding.color.useCustom')"
|
|
534
|
-
:mode="mode"
|
|
535
|
-
/>
|
|
536
|
-
</div>
|
|
537
|
-
<div
|
|
538
|
-
v-if="customizeColor"
|
|
539
|
-
class="row mt-20 mb-20"
|
|
540
|
-
>
|
|
541
|
-
<ColorInput
|
|
542
|
-
v-model:value="uiColor"
|
|
543
|
-
component-testid="primary"
|
|
544
|
-
/>
|
|
545
|
-
</div>
|
|
546
|
-
|
|
547
|
-
<!-- <h3 class="mt-40 mb-5 pb-0">
|
|
548
|
-
{{ t('branding.linkColor.label') }}
|
|
549
|
-
</h3>
|
|
550
|
-
<label class="text-label">
|
|
551
|
-
{{ t('branding.linkColor.tip', {}, true) }}
|
|
552
|
-
</label>
|
|
553
|
-
<div class="row mt-20">
|
|
554
|
-
<Checkbox
|
|
555
|
-
v-model:value="customizeLinkColor"
|
|
556
|
-
:label="t('branding.linkColor.useCustom')"
|
|
557
|
-
:mode="mode"
|
|
558
|
-
/>
|
|
559
|
-
</div>
|
|
560
|
-
<div
|
|
561
|
-
v-if="customizeLinkColor"
|
|
562
|
-
class="row mt-20 mb-20"
|
|
563
|
-
>
|
|
564
|
-
<ColorInput
|
|
565
|
-
v-model:value="uiLinkColor"
|
|
566
|
-
class="col"
|
|
567
|
-
component-testid="link"
|
|
568
|
-
/>
|
|
569
|
-
<span class="col link-example">
|
|
570
|
-
<a :style="customLinkColor">
|
|
571
|
-
{{ t('branding.linkColor.example') }}
|
|
572
|
-
</a>
|
|
573
|
-
</span>
|
|
574
|
-
</div> -->
|
|
575
599
|
</div>
|
|
576
600
|
<template
|
|
577
601
|
v-for="(err, i) in errors"
|
|
@@ -582,10 +606,10 @@ export default {
|
|
|
582
606
|
:label="err"
|
|
583
607
|
/>
|
|
584
608
|
</template>
|
|
585
|
-
<div v-if="mode === 'edit'">
|
|
609
|
+
<div class="action-btn" v-if="mode === 'edit'">
|
|
586
610
|
<AsyncButton
|
|
587
611
|
component-testid="branding-apply"
|
|
588
|
-
class="pull-right
|
|
612
|
+
class="pull-right"
|
|
589
613
|
mode="apply"
|
|
590
614
|
@click="save"
|
|
591
615
|
/>
|
|
@@ -594,6 +618,16 @@ export default {
|
|
|
594
618
|
</template>
|
|
595
619
|
|
|
596
620
|
<style scoped lang='scss'>
|
|
621
|
+
.action-btn {
|
|
622
|
+
padding: 10px 30px;
|
|
623
|
+
position: fixed;
|
|
624
|
+
bottom: 0;
|
|
625
|
+
left: 0;
|
|
626
|
+
width: 100%;
|
|
627
|
+
background: var(--body-bg);
|
|
628
|
+
border-top: 1px solid var(--nav-border);
|
|
629
|
+
}
|
|
630
|
+
|
|
597
631
|
.link-example {
|
|
598
632
|
display: flex;
|
|
599
633
|
align-content: center;
|
|
@@ -645,4 +679,7 @@ export default {
|
|
|
645
679
|
left: 10px;
|
|
646
680
|
}
|
|
647
681
|
}
|
|
682
|
+
h3 {
|
|
683
|
+
font-size: 14px;
|
|
684
|
+
}
|
|
648
685
|
</style>
|