Compare commits

..

No commits in common. "f9f66e71726c0637b915ca1753832d4eec22a99f" and "b2c70a66573caafb21a530b2a4aa40b559969e6b" have entirely different histories.

3 changed files with 17 additions and 53 deletions

View File

@ -1,46 +0,0 @@
<template>
<q-avatar>
<slot :avatarURL="avatarURL(modelValue)">
<q-img :src="avatarURL(modelValue)" style="min-width: 100%; min-height: 100%">
<template #error>
<img :src="fallback" style="height: 100%" />
</template>
</q-img>
</slot>
</q-avatar>
</template>
<script lang="ts">
import { PropType, defineComponent } from 'vue';
import { avatarURL } from '@flaschengeist/api';
/**
* Display an avatar for an user
*
* Slots:
* default - scope: {avatarURL}
*/
export default defineComponent({
name: 'UserAvatar',
props: {
modelValue: {
type: [Object, String] as PropType<FG.User | string>,
required: true,
},
showZoom: {
type: Boolean,
default: false,
},
fallback: {
type: String,
default: 'no-image.svg',
},
},
emits: ['error'],
setup() {
return {
avatarURL,
};
},
});
</script>

View File

@ -1,5 +1,4 @@
import IsoDateInput from './IsoDateInput.vue';
import PasswordInput from './PasswordInput.vue';
import UserAvatar from './UserAvatar.vue';
export { IsoDateInput, PasswordInput, UserAvatar };
export { IsoDateInput, PasswordInput };

View File

@ -1,6 +1,6 @@
{
"license": "MIT",
"version": "1.0.0-alpha.7",
"version": "1.0.0-alpha.6",
"name": "@flaschengeist/api",
"author": "Tim Gröger <flaschengeist@wu5.de>",
"homepage": "https://flaschengeist.dev/Flaschengeist",
@ -8,15 +8,26 @@
"bugs": {
"url": "https://flaschengeist.dev/Flaschengeist/flaschengeist/issues"
},
"scripts": {
"format": "prettier --config ./package.json --write '{,!(node_modules)/**/}*.ts'",
"lint": "eslint --ext .js,.ts,.vue ./src"
},
"main": "./src/index.ts",
"peerDependencies": {
"@quasar/app": "^3.2.4",
"@quasar/app": "^3.2.3",
"flaschengeist": "^2.0.0-alpha.1",
"pinia": "^2.0.6"
"pinia": "^2.0.4"
},
"devDependencies": {
"@flaschengeist/types": "^1.0.0-alpha.10",
"@types/node": "^14.18.00",
"@flaschengeist/types": "^1.0.0-alpha.9",
"@types/node": "^14.17.34",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint": "^8.3.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-vue": "^8.1.1",
"eslint-webpack-plugin": "^3.1.1",
"prettier": "^2.5.0",
"typescript": "^4.5.2"
},
"prettier": {