Skip to content

Commit

Permalink
chore(deps): update dependency @types/node to v20.11.27 (#8012)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency @types/node to v20.11.27

* fixes

* fixes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
Co-authored-by: Marty Fuhry <martyfuhry@gmail.com>
  • Loading branch information
3 people committed Mar 18, 2024
1 parent 4aae1da commit 50924f0
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 17 deletions.
6 changes: 3 additions & 3 deletions e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions mobile/assets/immich-logo.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions mobile/lib/shared/providers/immich_logo_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'dart:convert';

import 'package:flutter/services.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'immich_logo_provider.g.dart';

@riverpod
Future<Uint8List> immichLogo(ImmichLogoRef ref) async {
final json = await rootBundle.loadString('assets/immich-logo.json');
final j = jsonDecode(json);
return base64Decode(j['content']);
}
24 changes: 24 additions & 0 deletions mobile/lib/shared/providers/immich_logo_provider.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 25 additions & 8 deletions mobile/lib/shared/ui/immich_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/extensions/build_context_extensions.dart';
import 'package:immich_mobile/shared/models/store.dart';
import 'package:immich_mobile/shared/providers/immich_logo_provider.dart';
import 'package:immich_mobile/shared/ui/app_bar_dialog/app_bar_dialog.dart';
import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';

Expand All @@ -26,6 +27,7 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget {
final bool isEnableAutoBackup =
backupState.backgroundBackup || backupState.autoBackup;
final ServerInfo serverInfoState = ref.watch(serverInfoProvider);
final immichLogo = ref.watch(immichLogoProvider);
final user = Store.tryGet(StoreKey.currentUser);
final isDarkTheme = context.isDarkTheme;
const widgetSize = 30.0;
Expand Down Expand Up @@ -152,14 +154,29 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget {
builder: (BuildContext context) {
return Row(
children: [
Container(
padding: const EdgeInsets.only(top: 3),
height: 30,
child: Image.asset(
context.isDarkTheme
? 'assets/immich-logo-inline-dark.png'
: 'assets/immich-logo-inline-light.png',
),
Builder(
builder: (context) {
final today = DateTime.now();
if (today.month == 4 && today.day == 1) {
if (immichLogo.value == null) {
return const SizedBox.shrink();
}
return Image.memory(
immichLogo.value!,
fit: BoxFit.cover,
height: 80,
);
}
return Padding(
padding: const EdgeInsets.only(top: 3.0),
child: Image.asset(
height: 30,
context.isDarkTheme
? 'assets/immich-logo-inline-dark.png'
: 'assets/immich-logo-inline-light.png',
),
);
},
),
],
);
Expand Down
1 change: 1 addition & 0 deletions web/src/lib/assets/immich-logo.json

Large diffs are not rendered by default.

20 changes: 14 additions & 6 deletions web/src/lib/components/shared-components/immich-logo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
import logoDarkUrl from '$lib/assets/immich-logo-inline-dark.svg';
import logoLightUrl from '$lib/assets/immich-logo-inline-light.svg';
import logoNoText from '$lib/assets/immich-logo.svg';
import { content as alternativeLogo } from '$lib/assets/immich-logo.json';
import { Theme } from '$lib/constants';
import { colorTheme } from '$lib/stores/preferences.store';
import { DateTime } from 'luxon';
import type { HTMLImgAttributes } from 'svelte/elements';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Expand All @@ -14,11 +16,17 @@
export let noText = false;
export let draggable = false;
const today = DateTime.now().toLocal();
</script>

<img
src={noText ? logoNoText : $colorTheme.value == Theme.LIGHT ? logoLightUrl : logoDarkUrl}
alt="Immich Logo"
{draggable}
{...$$restProps}
/>
{#if today.month === 4 && today.day === 1}

This comment has been minimized.

Copy link
@scarpentier

scarpentier Apr 1, 2024

👀

<img src="data:image/png;base64, {alternativeLogo}" alt="Immich Logo" class="h-20" {draggable} />
{:else}
<img
src={noText ? logoNoText : $colorTheme.value == Theme.LIGHT ? logoLightUrl : logoDarkUrl}
alt="Immich Logo"
{draggable}
{...$$restProps}
/>
{/if}

0 comments on commit 50924f0

Please sign in to comment.