Skip to content

Commit

Permalink
chore(release): v1.1.1 (#160)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump eslint-plugin-vue from 9.9.0 to 9.10.0

Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.9.0 to 9.10.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](vuejs/eslint-plugin-vue@v9.9.0...v9.10.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(gh): fix github issue #153
[BUG] Film logo scaled too large
Fixes #153

* fix: improved a11y

title images now use Title slot for alt

* feat: gravatar support

You can now change your profile picture using Gravatar

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
AnnikenYT and dependabot[bot] committed Mar 28, 2023
1 parent c7a3292 commit 70156c9
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
],
"cSpell.words": [
"delorean",
"heroicons",
"lazyload",
"Lazyload",
"outro",
"strapi",
"Strapi",
"Troublecat",
"Watchpage",
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
"vuex": "^4.1.0"
},
"dependencies": {
"@types/crypto-js": "^4.1.1",
"crypto-js": "^4.1.1",
"vue-confetti": "^2.3.0"
}
}
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion src/pages/account/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Window>
<Title>Dein Profil</Title>
<div class="w-56 h-56">
<Avatar :image="user.image?.data?.attributes?.url" :loading="mutation.isLoading.value || false" />
<Avatar :email="user.email!" :loading="mutation.isLoading.value || false" />
</div>
<CInput
v-model="user.username"
Expand Down
4 changes: 3 additions & 1 deletion src/stories/atoms/Title/Title.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<template>
<h1 class="text-4xl font-black text-white my-5 leading-8 max-h-40">
<LazyLoadedImgVue v-if="image" :fit="'contain'" class="w-52" :src="image" :alt="image" />
<LazyLoadedImgVue v-if="image" :fit="'contain'" class="w-52" :src="image" :alt="slot[0]?.toString()" />
<slot v-else />
<a :id="id.replace(' ', '-')" />
</h1>
</template>
<script setup lang="ts">
import LazyLoadedImgVue from '@/stories/molecules/LazyLoadedImg.vue';
import { useSlots } from 'vue';
const slot = useSlots();
defineProps({
id: {
type: String,
Expand Down
25 changes: 9 additions & 16 deletions src/stories/molecules/Avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,16 @@
<script setup lang="ts">
import Spinner from '../atoms/Spinner.vue';
import { ExclamationCircleIcon } from '@heroicons/vue/outline';
import { gravatar } from "@/util/paths"
import { computed } from 'vue';
// eslint-disable-next-line no-undef
defineProps({
image: {
type: String,
required: false,
default: 'https://cdn.bergflix.de/logo/light_bg.png',
},
loading: {
type: Boolean,
default: false,
},
error: {
type: Boolean,
default: false,
},
});
const props = defineProps<{
email: string,
loading?: boolean,
error?: boolean,
}>();
const image = computed(() => gravatar(props.email));
// eslint-disable-next-line no-undef
defineEmits(['mouseenter', 'mouseleave', 'click']);
Expand Down
2 changes: 1 addition & 1 deletion src/stories/organisms/Footer/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</li>
<li>
<Link :to="{ name: 'legal', hash: '#terms' }">
Benuzungsbedingungen
Benutzungsbedingungen
</Link>
</li>
</ul>
Expand Down
8 changes: 6 additions & 2 deletions src/stories/organisms/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
>
<SearchOverlay class="mr-2"/>
<div class="w-14 h-14">
<Avatar @mouseenter="setDropdown(true)" />
<Avatar :email="email as string" @mouseenter="setDropdown(true)" />
</div>
<ProfileDropdown
:open="accountOpen"
Expand All @@ -35,8 +35,10 @@
</template>

<script setup lang="ts">
import { strapi } from '@/main';
import { gravatar } from '@/util/paths';
import { HomeIcon, SearchIcon, CogIcon, UserGroupIcon } from '@heroicons/vue/solid';
import { ref } from 'vue';
import { computed, ref } from 'vue';
import { useRoute } from 'vue-router';
import Logo from '../atoms/Logo.vue';
import NavLink from '../atoms/NavLink.vue';
Expand Down Expand Up @@ -72,4 +74,6 @@ const navItems = [
visibleOn: ['mobile', 'desktop'],
}
];
const email = computed(() => strapi.user?.email);
</script>
3 changes: 3 additions & 0 deletions src/util/paths.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
import md5 from 'crypto-js/md5';

export const api = (path: string | undefined, fallback?: string) => path ? `https://api.bergflix.de/${path.replace(/^\//, '')}` : fallback || '';
export const cdn = (path: string | undefined, fallback?: string) => path ? `https://cdn.bergflix.de/${path.replace(/^\//, '')}` : fallback || '';
export const gravatar = (email: string = "user@bergflix.de", opts: {size: number, default: string} = { size: 500, default: 'https://cdn.bergflix.de/logo/light_bg.png' }) => `https://www.gravatar.com/avatar/${md5(email.trim().toLowerCase())}?size=${opts.size}&d=${opts.default}`;

0 comments on commit 70156c9

Please sign in to comment.