Browse Source

Merge branch 'genofire-main-patch-3141' into 'main'

fix: submit logo_url in oauth for nice account overview

See merge request World/fractal!2146
merge-requests/2146/merge
genofire 1 week ago
parent
commit
6c275f0e73
  1. 3
      src/application.rs
  2. 8
      src/login/mod.rs

3
src/application.rs

@ -23,6 +23,9 @@ pub(crate) const SETTINGS_KEY_CURRENT_SESSION: &str = "current-session";
pub(crate) const APP_NAME: &str = "Fractal";
/// The URL of the homepage of the application.
pub(crate) const APP_HOMEPAGE_URL: &str = "https://gitlab.gnome.org/World/fractal/";
/// The URL of the icon of the application.
pub(crate) const APP_ICON_URL: &str =
"https://gitlab.gnome.org/uploads/-/system/project/avatar/147/fractal-avatar.png";
mod imp {
use std::cell::Cell;

8
src/login/mod.rs

@ -34,9 +34,9 @@ use self::{
session_setup_view::SessionSetupView,
};
use crate::{
APP_HOMEPAGE_URL, APP_NAME, Application, RUNTIME, SETTINGS_KEY_CURRENT_SESSION, Window,
components::OfflineBanner, prelude::*, secret::Secret, session::Session, spawn, spawn_tokio,
toast,
APP_HOMEPAGE_URL, APP_ICON_URL, APP_NAME, Application, RUNTIME, SETTINGS_KEY_CURRENT_SESSION,
Window, components::OfflineBanner, prelude::*, secret::Secret, session::Session, spawn,
spawn_tokio, toast,
};
/// A page of the login stack.
@ -576,6 +576,7 @@ fn client_registration_data() -> ClientRegistrationData {
let client_uri =
Url::parse(APP_HOMEPAGE_URL).expect("application homepage URL should be a valid URL");
let logo_uri = Url::parse(APP_ICON_URL).expect("application icon URL should be a valid URL");
let mut client_metadata = ClientMetadata::new(
ApplicationType::Native,
@ -585,6 +586,7 @@ fn client_registration_data() -> ClientRegistrationData {
Localized::new(client_uri, None),
);
client_metadata.client_name = Some(Localized::new(APP_NAME.to_owned(), None));
client_metadata.logo_uri = Some(Localized::new(logo_uri, None));
Raw::new(&client_metadata)
.expect("client metadata should serialize to JSON successfully")

Loading…
Cancel
Save