From 2871eec4b5acf4467e1a5e220c57fd18f12af366 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Fri, 16 Feb 2024 21:44:36 +0100 Subject: [PATCH] Some more stuff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sorry, I’m in a rush, can’t be bothered to properly commit --- public/assets/fonts/gdrico.eot | Bin 0 -> 3468 bytes public/assets/fonts/gdrico.svg | 26 ++++++ public/assets/fonts/gdrico.ttf | Bin 0 -> 3308 bytes public/assets/fonts/gdrico.woff | Bin 0 -> 3384 bytes src/App.vue | 2 +- src/assets/_fonts.less | 76 +++++++++++++++++ src/assets/_layouts.less | 10 ++- src/assets/_mixins.less | 9 +- src/assets/components/cards.less | 15 ++++ src/assets/components/titles.less | 44 +++++----- src/assets/forms.less | 0 src/assets/main.less | 1 + src/components/AppFooter.vue | 1 + src/components/AppHeader.vue | 18 +++- src/components/LoggedOutHome.vue | 30 +++++-- src/components/SmallCampaignCard.vue | 77 ++++++++++++++---- src/components/UserAvatar.vue | 41 ++++++++++ src/components/UserAvatarAndName.vue | 33 ++++++++ src/models/Base.ts | 18 ++++ src/models/Campaign.ts | 41 ++++++++-- src/models/User.ts | 54 ++++++++++-- src/router/index.ts | 7 +- src/stores/pocketbase.ts | 40 +++++++-- src/views/AccountView.vue | 2 +- src/views/CampaignView.vue | 23 ++++++ src/views/CreateCampaignView.vue | 12 +-- ...ampaignsView.vue => ListCampaignsView.vue} | 56 +++++++------ 27 files changed, 533 insertions(+), 103 deletions(-) create mode 100644 public/assets/fonts/gdrico.eot create mode 100644 public/assets/fonts/gdrico.svg create mode 100644 public/assets/fonts/gdrico.ttf create mode 100644 public/assets/fonts/gdrico.woff create mode 100644 src/assets/_fonts.less create mode 100644 src/assets/forms.less create mode 100644 src/components/UserAvatar.vue create mode 100644 src/components/UserAvatarAndName.vue create mode 100644 src/models/Base.ts create mode 100644 src/views/CampaignView.vue rename src/views/{CampaignsView.vue => ListCampaignsView.vue} (52%) diff --git a/public/assets/fonts/gdrico.eot b/public/assets/fonts/gdrico.eot new file mode 100644 index 0000000000000000000000000000000000000000..9e91735a2cd7bcabfc1b0687d71f64bc2a00bf89 GIT binary patch literal 3468 zcma)9O>7&-6@G7rKl-&qlU&*oC38uUlx#(R)KYTm7^}Kw5-XNurLa>Qt*IYIG9Zhx ztkiMSrVAJid%{uSX#OH!ndyV%%c4#G;c4L<`%O*-MK~7 z^gR0W%OEtI@;!(49khFvuWr0lcm;@>euH9WrMxhwHidr+1$<~9y*l^O8gliN zu{w9P^yWvOLVoiM=J?@S`T7R*L~8j+_LC4>e24r*%3F%0{LHQSAC%)p$yb-Sy{_Rv zgJ}B`VeMLE2xQQtEvhNu06Ck?arC*haJb^+Be|voeo}X)#1?P0Zq0A4Z~b8F=UaET z9&87YM5t>P_{sT2LFJmFUOO ze#~62nImjp!Ni!SO>$yIgcZTz#*RA!zb*|n+qHahY@B*&6gGL5o`}WnWqDCWuR5IhQ!@(+1AI*pB==D75I(j&n0jDcU zQ~_ivqz?`hB1naSLA@Ru>CVoy%(hiUhD%6asuH-y^nYY^WHKGdA6J`t1NQEoPBWYn5E?hi;vlxwvw<_ zJ=>ja@Zmb$xy+10&Nc&egzzk24xs6M5}V(OGWdg9Eh-FhIVo;ub) zG}M3Wlp2$#3AQwyInRF0S^YR7I35GgFE5YF0H+?KAvy$oxq6=;Egf%;HmZjjV(QHC z*6E9TSHZF7L#_9|at#MN`&wGN+mC+tiHRE{LnoTQaeCikn-0pj>8w@AwKgLX5Z4_< ze@cY2!LUe4uhHNyY^=@9tjWw)>i(Hx@yz{HF(C+lm%R3Yy}}#CqWv1bu{I+&aApm2 z1ZutzqfW}v7)=wt6fjlh7$*Z=oQme65%rrql7Esl-LL1O{%V&N)oNWiJr%6)+dE8? zeQd=e??mF3TPg5V(<4Ypf>&K@K=kBRkA+?BQ@-+{h*~Pr6>y#gTwQe0S$Pz8gByYEK?c z=fn%S^kI9l^+>1|m#ZOLEbRPBT=x4-*l$~QNVxP^GMJu0KKp> zUDIPh4*7M2k*F3*YjT0uR5mOa+s4megQ;Q}EUgUMj%8t;Z~>SME3NvyRg(#k5b6(U z(KM`{3Tc448-y&maki;ghE39Tj4d!N2(m0;U{W$GGU7q8nxDht!wflED8ZWw!Wmn3 zf)i|Vf;>L)8Rq`Bv~VWb#<7#^ehGs$gioQ2C0TrlL*49tZzUn*#+WPzA~9A+#yCHk z6`$D?k$hx%x-r_^JMQIOq<`2Qn_W=IMABMxrQ$GKA zFT#!~YZ=TXW`*s~n?{bv_K}e$ZUP2<+J1<^_5=ps18~+ueE9844{u+)+;-wW?iG*d zFaMs-W3^uGMO0iK<$gK|_HyoI5h=T6{HIuU4WkRun%~}!+xCfgB}ime%ixL)IqNhZh^i=P+HLAVg;A~?|WE)e%!-8 z;B^oC@f_&#Z~*j44>#d9@QbCz^(zbI`Ul1N()#r)<<-RS!0_W=5&MVir_7d?UR;@5 z-}^Ax&sHd}ZX}jUtEKh1jnZOb{$}Eth4R^Qd3Asa&ckJc640%LCyac~%+UtwMbPHy WCdy}=2hdq?%16!sERDGPW$AycV~~RY literal 0 HcmV?d00001 diff --git a/public/assets/fonts/gdrico.svg b/public/assets/fonts/gdrico.svg new file mode 100644 index 0000000..7544752 --- /dev/null +++ b/public/assets/fonts/gdrico.svg @@ -0,0 +1,26 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/fonts/gdrico.ttf b/public/assets/fonts/gdrico.ttf new file mode 100644 index 0000000000000000000000000000000000000000..2f4f4efe01c76ca37d6bd435365070c99b06aed1 GIT binary patch literal 3308 zcma)8O>7&-6@G7rKl-sO(Il6)MA2MQBqdwXAGMU+I>xH5nZ&9kSt;z)L2K%Vp$y0p zEh}~0wCMsygB*f1C<3I(p~$5L3dBVYMbSfzEPAmILD8cT^q`_G0;)|9EgGPKxav2% zOO>*MBty>3H*em&dGF1ew?j-s?PQXmk=dt*$2yM$KLzD?sHL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le zwY$%w~v<$;CytCri2w)dFh+339&WMmFCI|z{_8tb` zu@>y4ung0brtl3gZBxpb%!h2q^9CEvd6T1ClyoQ^;%#qmZ9!fi?pW*%We3TwCuD96;@M)}S3I1n%7k9!^oeg)tcR;Fuu zEXX0hjxrL}LK#gi5Sz+|g<#wG8Ei1sEQ4i~A=|YqtP?4KkYT0uytf)QVG>6DAuXCg z)YBmiPWPF%mM++r+TR}Nv%T98V zO-_=hCqBm9-;@!~raCxwirp_^uz~O?l(i&>FL5Zr?)O#-LT-)8aUc?7b!>vi3pw$z zJrx;`tj@MX+xjQ{KGSJs(FRuhO1w|vzIeRP@0+n7gv0y})cGF3Klz<-cy-3-pX^83 zF=Z=@xx}on{YmTCQOO@2Yvop8$Y<>b7;H~r@I3%$J;X=eeEPvl*ROP({13IsYZB34 z{yi)2jb7_jRC(XTemW20<=n~0XCiVo-p&<ppekI-&ANa5{jyDndF}e54y4Q{g?{$cN@A=Hg zO?QOMtsq_U`Feec!_Z@)I8R z0dIQPPb&3#H~{&yhg)$Q_(geT^XhVi%DCfg(p6ff%Ei*=jjNUQkL17&&^>szGF{c6R^`c|@BS}$!bZk1M&OSh6wEmzJ} rD(gd3bf( {{ appTitle }}
- + + - Compte + +
+ +
Compte
+
+
@@ -20,7 +29,6 @@ const appTitle = import.meta.env.VITE_NAME; const isDark = useDark(); const toggleDark = useToggle(isDark); - const pbStore = usePocketbaseStore(); const loggedIn = ref(pbStore.auth.loggedIn); @@ -45,4 +53,8 @@ header { color: inherit; } } + +#account { + gap: 0.5rem; +} diff --git a/src/components/LoggedOutHome.vue b/src/components/LoggedOutHome.vue index 4eb4412..2956775 100644 --- a/src/components/LoggedOutHome.vue +++ b/src/components/LoggedOutHome.vue @@ -6,13 +6,33 @@

L'application web pour vous accompagner pour votre JDR avec Gégé, le bot discord.

-
+

Pourquoi ?

-
    -
  • Créer ses personnages
  • -
  • Gérer ses fiche personnage
  • -
  • Faire évoluer ses personnage
  • +
      +
    • Créer ses personnages
    • +
    • Gérer ses fiche personnage
    • +
    • Faire évoluer ses personnage
+ + diff --git a/src/components/SmallCampaignCard.vue b/src/components/SmallCampaignCard.vue index 6935257..42d5fc3 100644 --- a/src/components/SmallCampaignCard.vue +++ b/src/components/SmallCampaignCard.vue @@ -1,22 +1,30 @@ diff --git a/src/components/UserAvatar.vue b/src/components/UserAvatar.vue new file mode 100644 index 0000000..99c4246 --- /dev/null +++ b/src/components/UserAvatar.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/components/UserAvatarAndName.vue b/src/components/UserAvatarAndName.vue new file mode 100644 index 0000000..a30ebd7 --- /dev/null +++ b/src/components/UserAvatarAndName.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/src/models/Base.ts b/src/models/Base.ts new file mode 100644 index 0000000..07cf24d --- /dev/null +++ b/src/models/Base.ts @@ -0,0 +1,18 @@ +import type { RecordModel } from "pocketbase" + +export class CRecordModel implements RecordModel { + [key: string]: any; + id: string; + created: string; + updated: string; + collectionId: string; + collectionName: string; + + constructor(from: RecordModel) { + this.id = from.id; + this.created = from.created; + this.updated = from.updated; + this.collectionId = from.collectionId; + this.collectionName = from.collectionName; + } +} diff --git a/src/models/Campaign.ts b/src/models/Campaign.ts index 49bca5d..d9f89f0 100644 --- a/src/models/Campaign.ts +++ b/src/models/Campaign.ts @@ -1,18 +1,49 @@ import { type RecordModel } from 'pocketbase'; -import { type User } from './User'; +import { User, type IUser } from './User'; +import { CRecordModel } from './Base'; -interface CampaignDetails { - game_master?: User; - players?: User[]; +interface ICampaignDetails { + game_master?: IUser; + players?: IUser[]; } -export interface Campaign extends RecordModel { +export interface ICampaign extends RecordModel { expand?: CampaignDetails; game_master: string; name: string; players: string[]; } +class CampaignDetails implements ICampaignDetails { + game_master?: User; + players: User[] = []; + + constructor(from: ICampaignDetails) { + if (from.game_master) { + this.game_master = new User(from.game_master); + } + if (from.players) { + from.players.forEach((player) => this.players.push(new User(player))); + } + } +} + +export class Campaign extends CRecordModel implements ICampaign { + expand?: CampaignDetails; + game_master: string; + name: string; + players: string[]; + + constructor(from: ICampaign) { + super(from); + this.expand = undefined; + this.game_master = from.game_master; + this.name = from.name; + this.players = from.players; + this.expand = from.expand ? new CampaignDetails(from.expand) : undefined; + } +} + export interface NewCampaign { game_master: string | null; name: string | null; diff --git a/src/models/User.ts b/src/models/User.ts index dd46889..5af1089 100644 --- a/src/models/User.ts +++ b/src/models/User.ts @@ -1,20 +1,58 @@ -import type { RecordModel } from 'pocketbase'; +import { type RecordModel } from 'pocketbase'; +import { CRecordModel } from './Base'; +import { of, type Observable } from 'rxjs'; -export interface SimpleUser extends RecordModel { +export interface ISimpleUser extends RecordModel { username: string; name?: string; + avatar?: string; + expand?: { [key: string]: any }; + avatarLink: (pbStore: any) => Observable; } -export interface User extends SimpleUser { - avatar?: string; +export interface IUser extends SimpleUser { email?: string; emailVisibility: boolean; verified: boolean; } -export function displayName(user: SimpleUser): string { - if (user.name && user.name.trim() !== '') { - return user.name; +export class SimpleUser extends CRecordModel implements ISimpleUser { + avatar?: string; + username: string; + name?: string; + expand?: { [key: string]: any }; + + constructor(from: ISimpleUser) { + super(from); + this.username = from.username; + this.name = from.name; + this.expand = from.expand; + this.avatar = from.avatar; + } + + displayName(): string { + if (this.name && this.name.trim() !== '') { + return this.name; + } + return this.username; + } + + avatarLink(pbStore: any, thumbSize: number = 100): Observable { + return this.avatar + ? (pbStore.users.avatar(this.id, thumbSize) as Observable) + : of(null); + } +} + +export class User extends SimpleUser implements IUser { + email?: string; + emailVisibility: boolean; + verified: boolean; + + constructor(from: IUser) { + super(from); + this.email = from.email; + this.emailVisibility = from.emailVisibility; + this.verified = from.verified; } - return user.username; } diff --git a/src/router/index.ts b/src/router/index.ts index 7c0dcdb..dd12e5f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -16,13 +16,18 @@ const router = createRouter({ { path: '/campaigns', name: 'campaigns', - component: () => import('@/views/CampaignsView.vue'), + component: () => import('@/views/ListCampaignsView.vue'), }, { path: '/new-campaign', name: 'new-campaign', component: () => import('@/views/CreateCampaignView.vue'), }, + { + path: '/campaign/:campaignId', + name: 'edit-campaign', + component: () => import('@/views/CampaignView.vue'), + }, ], }); diff --git a/src/stores/pocketbase.ts b/src/stores/pocketbase.ts index f7ffa3e..918e346 100644 --- a/src/stores/pocketbase.ts +++ b/src/stores/pocketbase.ts @@ -3,11 +3,12 @@ import { defineStore } from 'pinia'; import { from, map, Observable, tap } from 'rxjs'; import { computed, ref } from 'vue'; -import type { Campaign, NewCampaign } from '@/models/Campaign'; -import type { SimpleUser } from '@/models/User'; +import { Campaign, type ICampaign, type NewCampaign } from '@/models/Campaign'; +import { SimpleUser, type IUser } from '@/models/User'; export const usePocketbaseStore = defineStore('pocketbase', () => { const pb = new PocketBase(import.meta.env.VITE_PB_URL); + pb.autoCancellation(false); ///////////////////////////////////////////////////////////////////////////// // Authentication // @@ -50,15 +51,23 @@ export const usePocketbaseStore = defineStore('pocketbase', () => { function listCampaigns(): Observable { return from( - pb.collection('campaigns_simple_view').getFullList({ + pb.collection('campaigns_simple_view').getFullList({ sort: 'name', expand: 'players,game_master', }) + ).pipe(map((campaigns) => campaigns.map((campaign) => new Campaign(campaign)))); + } + + function createCampaign(campaign: NewCampaign): Observable { + return from(pb.collection('campaign').create(campaign)).pipe( + map((campaign) => new Campaign(campaign)) ); } - function createCampaign(campaign: NewCampaign): Observable { - return from(pb.collection('campaign').create(campaign)); + function getCampaignById(id: string): Observable { + return from(pb.collection('campaign').getOne(id)).pipe( + map((campaign) => new Campaign(campaign)) + ); } ///////////////////////////////////////////////////////////////////////////// @@ -70,10 +79,21 @@ export const usePocketbaseStore = defineStore('pocketbase', () => { pb.collection('public_users').getFullList({ sort: 'username', }) + ).pipe(map((users) => users.map((user) => new SimpleUser(user)))); + } + + function userAvatar(userId: string, thumbSize: number = 100): Observable { + return from(pb.collection('users').getOne(userId)).pipe( + map((user) => { + return user.avatar + ? pb.files.getUrl(user, user.avatar, { thumb: `${thumbSize}x${thumbSize}` }) + : null; + }) ); } return { + pb, auth: { authStore, loggedIn, @@ -84,12 +104,14 @@ export const usePocketbaseStore = defineStore('pocketbase', () => { logout, deleteAccount, }, - campaign: { - listCampaigns, - createCampaign, + campaigns: { + list: listCampaigns, + create: createCampaign, + get: getCampaignById, }, users: { - allUsersSimple, + listSimple: allUsersSimple, + avatar: userAvatar, }, }; }); diff --git a/src/views/AccountView.vue b/src/views/AccountView.vue index b8a066f..8ea4293 100644 --- a/src/views/AccountView.vue +++ b/src/views/AccountView.vue @@ -3,7 +3,7 @@

Hello {{ username }} !

Actions

-
    +
    • diff --git a/src/views/CampaignView.vue b/src/views/CampaignView.vue new file mode 100644 index 0000000..7fafd32 --- /dev/null +++ b/src/views/CampaignView.vue @@ -0,0 +1,23 @@ + + + diff --git a/src/views/CreateCampaignView.vue b/src/views/CreateCampaignView.vue index 7b6b3f2..49ac516 100644 --- a/src/views/CreateCampaignView.vue +++ b/src/views/CreateCampaignView.vue @@ -11,7 +11,7 @@ @@ -27,7 +27,7 @@ import { onMounted, ref } from 'vue'; import router from '@/router'; import { usePocketbaseStore } from '@/stores/pocketbase'; import { type NewCampaign } from '@/models/Campaign'; -import { type SimpleUser, displayName } from '@/models/User'; +import { type SimpleUser } from '@/models/User'; const pbStore = usePocketbaseStore(); const users = ref([]); @@ -39,7 +39,7 @@ const campaign = ref({ }); const createCampaign = () => { - pbStore.campaign.createCampaign(campaign.value).subscribe({ + pbStore.campaigns.create(campaign.value).subscribe({ next: () => { router.push({ name: 'home' }); }, @@ -47,8 +47,10 @@ const createCampaign = () => { }; onMounted(() => { - pbStore.users.allUsersSimple().subscribe({ - next: (results) => (users.value = results.filter((user) => user.id !== pbStore.auth.userId)), + pbStore.users.listSimple().subscribe({ + next: (results) => { + users.value = results.filter((user) => user.id !== pbStore.auth.userId); + }, error: (err) => console.warn('Failed to fetch all users', err), }); }); diff --git a/src/views/CampaignsView.vue b/src/views/ListCampaignsView.vue similarity index 52% rename from src/views/CampaignsView.vue rename to src/views/ListCampaignsView.vue index d945496..2d97ea4 100644 --- a/src/views/CampaignsView.vue +++ b/src/views/ListCampaignsView.vue @@ -1,34 +1,26 @@ @@ -52,10 +44,26 @@ const campaignsPlayer = computed(() => ); onMounted(() => { - pbStore.campaign.listCampaigns().subscribe({ + pbStore.campaigns.list().subscribe({ next: (result) => (campaigns.value = result), error: (err) => console.warn(err), complete: () => console.log('List campaigns completed'), }); }); + +