Scheda utente "Ultima visita"

Questo componente del tema ti consentirà di includere la statistica “ultimo accesso” nelle schede del profilo utente.

\u003e Repository: GitHub - tshenry/discourse-last-seen-user-card-theme-component

\u003ch4\u003ePrima\u003c/h4\u003e\n\n

\n\n\u003ch4\u003eDopo\u003c/h4\u003e\n\n\n\n\u003ch2\u003eInformazioni\u003c/h2\u003e\n\nOltre al mio interesse personale nell’aggiungere questa statistica alle schede utente, c’è stata una discussione qui che ha ispirato la creazione di questo componente del tema:\n\nhttps://meta.discourse.org/t/add-last-seen-and-post-count-to-user-card/16550\n\nhttps://meta.discourse.org/t/replace-last-post-with-last-seen-in-profile-card/32706\n\n\u003ch2\u003eInstallazione\u003c/h2\u003e\n\nSegui questa guida qui:\n\nInstalling a theme or theme component libero di pubblicare se hai domande, problemi o suggerimenti!

46 Mi Piace

This is fantastic. I will use this function a lot as I assess new members’ engagement and chase particular people down who I work with closely.

2 Mi Piace

This has had a minor update:

  • Reduced the amount of code by switching from a full template override to using the existing plugin outlet to achieve the same positioning.

For anyone that uses this or is interested in using it, there are four metadata positions on the user card. Currently, starting from the left it goes last post, date joined, last seen, and time read. Which position would you prefer the "last seen" metadata to be displayed?
  • First
  • Second
  • Third (where it is currently)
  • Fourth

0 voters

I imagine it’s not extremely important to most, but I’m curious if there is a preference that I can consider for a future update.

4 Mi Piace

I don’t mind where it is so long as it is there.

1 Mi Piace

I’ve update this to position “Last Seen” first in the list. Thanks to all that voiced their opinion :grin:

8 Mi Piace

@tshenry Is it compatible with latest Discourse? It’s not working although installed.

I just checked and it’s working on the latest tests-passed. Did you make sure to refresh the page after adding the component to your main theme?

3 Mi Piace

Did you check on mobile view as well?

1 Mi Piace

Ah, good point! Fun fact - this component was created before mobile user cards existed! Because of that, it was only set up to work on desktop.

I’ve just pushed an update that should support both environments:

8 Mi Piace

I’ve got the update, thanks.

2 Mi Piace

Riprendo questo thread: solo per confermare che funziona ancora alla grande ed è super utile!

Questo rende super rapido e semplice verificare se l’utente è effettivamente ancora un membro attivo. Prima dovevo sempre aprire il profilo completo per decidere se valeva la pena di inviare un messaggio privato all’utente.

Mi farebbe molto piacere vederlo integrato nel core!

4 Mi Piace

Sì!! Dovrebbe assolutamente essere nel core secondo me. Nel frattempo, grazie mille a @tshenry!

3 Mi Piace

Ho notato che dall’ultimo aggiornamento di Discourse, il testo “Last Seen” nella scheda utente è molto più grande del resto ed è anche in grassetto. Ho controllato ed è racchiuso in <h3> quindi ho annullato questo inserendo

#user-card .last-seen-metadata h3 {
    font-size: unset;
    font-weight: unset;
}

nel CSS del tema.

Non ho idea se questo sia un effetto intenzionale, quindi volevo condividere la mia esperienza.

2 Mi Piace

Probabilmente no.

4 Mi Piace

Ho aggiunto una pull request per il componente qui per rimuovere il tag heading per corrispondere alla modifica di Discourse:

8 Mi Piace

Grazie mille per la spiegazione e anche per la PR! :slight_smile:

2 Mi Piace

Grazie mille per questa correzione! Sarà inclusa nel branch stable 3.3.x?

Gli aggiornamenti dei componenti del tema sono completamente separati dagli aggiornamenti principali, puoi aggiornarli in qualsiasi momento dall’interfaccia di amministrazione indipendentemente dagli aggiornamenti principali.

2 Mi Piace

Oops, mi dispiace, ho dimenticato che questo è un componente del tema e non fa parte del core.

2 Mi Piace

Funziona benissimo, ma per qualche motivo per me appare per ultimo nella lista (dopo cheers).

1 Mi Piace