feat: persist account-level offline appearance (skin/cape) on OfflineAccount
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Read the existing OfflineAccount, AccountStore, OfflineProfile, and OfflineServer APIs to see how account JSON is loaded and saved. Start by deciding the open path-semantics and validation questions, then add OfflineAppearance with serde defaults so old account files still load. Done means saving and reloading an account preserves skin/cape/model, and offline_profile() reflects the stored appearance consistently.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
OfflineServer already supports local skins and capes through OfflineProfile::with_skin, with_cape, and with_skin_model, but OfflineAccount persists only username and uuid. Any launcher that offers offline appearance settings has to maintain its own AccountId -> texture path registry outside the account store and rebuild OfflineProfile manually at launch time. That duplicates account-level state and makes the textures easy to get out of sync with the selected account.
Proposal
Persist optional account-level appearance on OfflineAccount:
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default)]
pub struct OfflineAppearance {
pub skin: Option<PathBuf>,
pub cape: Option<PathBuf>,
pub skin_model: SkinModel,
}
impl OfflineAccount {
pub fn appearance(&self) -> &OfflineAppearance;
pub fn set_appearance(&mut self, appearance: OfflineAppearance);
pub fn offline_profile(&self) -> OfflineProfile;
}
AccountStore::save already persists account state, so updating appearance would be set_appearance followed by save.
Questions to settle
- Should paths be stored as absolute paths or relative to the launcher's
storage_root? Relative paths are more portable, butOfflineAccountis created without storage-root context, sooffline_profile()would need the root. - Should texture existence and PNG validity be checked when setting appearance, when calling
offline_profile(), or left toOfflineServeras today? - Existing account JSON has no
appearancefield;#[serde(default)]should keep it backward compatible.
Scope
This should stay limited to account-level defaults. Per-instance overrides, file pickers, image previews, and size validation messaging belong to downstream launchers.
Why upstream
OfflineProfile, OfflineServer, OfflineAccount, and AccountStore all live in Elemental. Persisting these paths next to the account avoids every launcher reimplementing the same registry and keeps offline_profile() consistent with the account identity.
Particle currently constructs OfflineProfile::new(username) directly and has nowhere to persist the user's skin or cape choice.
- Lingua principale
- Rust
- Stelle
- 11
- Fork
- 1
- Merge medio
- 3h 32m
- PR unite (30g)
- 52
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ElectronicWave/Elemental
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ElectronicWave/Elemental#265 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
ElectronicWave/Elemental#261 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ElectronicWave/Elemental#257 ·
I maintainer di solito rispondono entro 1 giorno
-
docs: CommentsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 34/100
ElectronicWave/Elemental#230 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
ElectronicWave/Elemental#227 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ElectronicWave/Elemental
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
matrix-org/matrix-rust-sdk#7495 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
yantrikos/yantrik-os#1272 ·
I maintainer di solito rispondono entro 1 giorno
-
crate: spate-kafka priority: low tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Executable check only looks at the "others" execute bit, so 0750 binaries are rejectedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
macOS 菜单栏托盘图标保留橙色,与系统单色图标风格不一致Forse già presa @xhugoliu l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
YizhengWw/HachimoDock#56 · 1 commento ·