Skip to content

Commit 5eae7de

Browse files
committed
Add SUSE banner graphics to login screen
1 parent 619afae commit 5eae7de

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

shell/assets/brand/suse/dark/login-landscape.svg

Lines changed: 1 addition & 0 deletions
Loading

shell/assets/brand/suse/login-landscape.svg

Lines changed: 1 addition & 0 deletions
Loading

shell/assets/brand/suse/metadata.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
"banner": {
44
"bannerClass": "suse-banner-graphic",
55
"textAlign": "left"
6+
},
7+
"login": {
8+
"bannerClass": "suse-login-banner-graphic"
69
}
710
}

shell/assets/styles/themes/_suse.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@
9292
object-position: right;
9393
}
9494
}
95+
96+
// SUSE Theme aligns graphic to left so that the container ship stays visible
97+
.suse-login-banner-graphic {
98+
object-position: left;
99+
}
95100
}
96101

97102
// Ensure that with a small window size, the banner centers, so that the text does not overlay

shell/pages/auth/login.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import loadPlugins from '@shell/plugins/plugin';
3232
import Loading from '@shell/components/Loading';
3333
import { HARVESTER_NAME as HARVESTER } from '@shell/config/features';
3434
import TabTitle from '@shell/components/TabTitle.vue';
35+
import { getBrandMeta } from '@shell/utils/brand';
3536
3637
export default {
3738
name: 'Login',
@@ -134,6 +135,19 @@ export default {
134135
hasLoginMessage() {
135136
return this.errorToDisplay || this.loggedOut || this.timedOut;
136137
},
138+
139+
customizations() {
140+
const globalSettings = this.$store.getters['management/all'](MANAGEMENT.SETTING);
141+
const setting = globalSettings?.find((gs) => gs.id === SETTING.BRAND);
142+
const brandMeta = getBrandMeta(setting?.value);
143+
const login = brandMeta?.login || {};
144+
145+
return login;
146+
},
147+
148+
bannerClass() {
149+
return this.customizations.bannerClass;
150+
}
137151
},
138152
139153
async fetch() {
@@ -524,6 +538,7 @@ export default {
524538
</div>
525539
</div>
526540
<BrandImage
541+
:class="bannerClass"
527542
class="col span-6 landscape"
528543
data-testid="login-landscape__img"
529544
file-name="login-landscape.svg"

0 commit comments

Comments
 (0)