mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
add cluster icon migration code (#673)
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
1 parent
b75cac4546
commit
a12aa8a04f
8 files changed
+143
-34
No files matched your search
@@ -28,7 +28,7 @@ export class ClusterIconSetting extends React.Component<Props> {
|
||||
try {
|
||||
if (file) {
|
||||
const buf = Buffer.from(await file.arrayBuffer());
|
||||
cluster.preferences.icon = `data:image/jpeg;base64, ${buf.toString('base64')}`;
|
||||
cluster.preferences.icon = `data:${file.type};base64, ${buf.toString('base64')}`;
|
||||
} else {
|
||||
// this has to be done as a seperate branch (and not always) because `cluster`
|
||||
// is observable and triggers an update loop.
|
||||
|
||||
Reference in new issue
Block a user