add google photos support & fix preview
This commit is contained in:
@@ -53,9 +53,15 @@ public final class PhotoSyncClient implements AutoCloseable {
|
||||
private final AutoCapture autoCapture;
|
||||
|
||||
public PhotoSyncClient(ClientBridge bridge) {
|
||||
this(bridge, new PhotoSync(new ConfigLocations(
|
||||
bridge.game().configDirectory(),
|
||||
bridge.game().userDataDirectory())), Theme.dark());
|
||||
this(bridge, new PhotoSync(
|
||||
new ConfigLocations(
|
||||
bridge.game().configDirectory(),
|
||||
bridge.game().userDataDirectory()),
|
||||
// How Google Photos gets the player in front of its consent
|
||||
// page. Core cannot open a browser, and the sign-in is called
|
||||
// from a worker, so this hops back to the render thread the way
|
||||
// everything else that touches the game does.
|
||||
url -> bridge.game().submit(() -> bridge.game().openUrl(url))), Theme.dark());
|
||||
}
|
||||
|
||||
/** Takes its collaborators explicitly so a test can drive it without a game. */
|
||||
|
||||
@@ -126,5 +126,10 @@
|
||||
"photosync.provider.immich.endpoint": "Server URL",
|
||||
"photosync.provider.immich.endpoint.hint": "https://photos.example.com",
|
||||
"photosync.provider.immich.secret": "API key",
|
||||
"photosync.provider.immich.secret.hint": "Account settings -> API Keys"
|
||||
"photosync.provider.immich.secret.hint": "Account settings -> API Keys",
|
||||
"photosync.provider.googlephotos.name": "Google Photos",
|
||||
"photosync.provider.googlephotos.endpoint": "OAuth client ID",
|
||||
"photosync.provider.googlephotos.endpoint.hint": "Google Cloud -> Credentials -> Desktop app",
|
||||
"photosync.provider.googlephotos.secret": "OAuth client secret",
|
||||
"photosync.provider.googlephotos.secret.hint": "From the same client; Test connection signs you in"
|
||||
}
|
||||
|
||||
@@ -126,5 +126,10 @@
|
||||
"photosync.provider.immich.endpoint": "服务器地址",
|
||||
"photosync.provider.immich.endpoint.hint": "https://photos.example.com",
|
||||
"photosync.provider.immich.secret": "API 密钥",
|
||||
"photosync.provider.immich.secret.hint": "账户设置 -> API 密钥"
|
||||
"photosync.provider.immich.secret.hint": "账户设置 -> API 密钥",
|
||||
"photosync.provider.googlephotos.name": "Google 相册",
|
||||
"photosync.provider.googlephotos.endpoint": "OAuth 客户端 ID",
|
||||
"photosync.provider.googlephotos.endpoint.hint": "Google Cloud -> 凭据 -> 桌面应用",
|
||||
"photosync.provider.googlephotos.secret": "OAuth 客户端密钥",
|
||||
"photosync.provider.googlephotos.secret.hint": "同一客户端;点击“测试连接”完成登录"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user