mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-23 08:55:41 +00:00
Small fixes
This commit is contained in:
@@ -98,31 +98,34 @@ public class ContextualFileReferenceChoiceComp extends Comp<CompStructure<HBox>>
|
||||
}
|
||||
|
||||
try {
|
||||
var source = Path.of(currentPath.toString());
|
||||
var target = sync.getTargetLocation().apply(source);
|
||||
if (Files.exists(source)) {
|
||||
var shouldCopy = AppWindowHelper.showConfirmationAlert(
|
||||
"confirmGitShareTitle", "confirmGitShareHeader", "confirmGitShareContent");
|
||||
if (!shouldCopy) {
|
||||
return;
|
||||
}
|
||||
|
||||
var handler = DataStorageSyncHandler.getInstance();
|
||||
var syncedTarget = handler.addDataFile(
|
||||
source, target, sync.getPerUser().test(source));
|
||||
|
||||
var pubSource = Path.of(source + ".pub");
|
||||
if (Files.exists(pubSource)) {
|
||||
var pubTarget = sync.getTargetLocation().apply(pubSource);
|
||||
DataStorageSyncHandler.getInstance()
|
||||
.addDataFile(
|
||||
pubSource, pubTarget, sync.getPerUser().test(pubSource));
|
||||
}
|
||||
|
||||
Platform.runLater(() -> {
|
||||
filePath.setValue(FilePath.of(syncedTarget));
|
||||
});
|
||||
var source = currentPath.asLocalPath();
|
||||
if (!Files.exists(source)) {
|
||||
ErrorEvent.fromMessage("Unable to resolve local file path " + source).expected().handle();
|
||||
return;
|
||||
}
|
||||
|
||||
var target = sync.getTargetLocation().apply(source);
|
||||
var shouldCopy = AppWindowHelper.showConfirmationAlert(
|
||||
"confirmGitShareTitle", "confirmGitShareHeader", "confirmGitShareContent");
|
||||
if (!shouldCopy) {
|
||||
return;
|
||||
}
|
||||
|
||||
var handler = DataStorageSyncHandler.getInstance();
|
||||
var syncedTarget = handler.addDataFile(
|
||||
source, target, sync.getPerUser().test(source));
|
||||
|
||||
var pubSource = Path.of(source + ".pub");
|
||||
if (Files.exists(pubSource)) {
|
||||
var pubTarget = sync.getTargetLocation().apply(pubSource);
|
||||
DataStorageSyncHandler.getInstance()
|
||||
.addDataFile(
|
||||
pubSource, pubTarget, sync.getPerUser().test(pubSource));
|
||||
}
|
||||
|
||||
Platform.runLater(() -> {
|
||||
filePath.setValue(FilePath.of(syncedTarget));
|
||||
});
|
||||
} catch (Exception e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package io.xpipe.app.icon;
|
||||
import io.xpipe.app.core.AppProperties;
|
||||
import io.xpipe.app.issue.ErrorEvent;
|
||||
import io.xpipe.app.prefs.AppPrefs;
|
||||
import io.xpipe.app.prefs.SupportedLocale;
|
||||
import io.xpipe.app.resources.AppImages;
|
||||
import io.xpipe.app.storage.DataStorage;
|
||||
import io.xpipe.core.util.ValidationException;
|
||||
@@ -26,8 +27,10 @@ public class SystemIconManager {
|
||||
.path(DataStorage.getStorageDirectory().resolve("icons"))
|
||||
.id("custom")
|
||||
.build());
|
||||
// For chinese users, GitHub link might be unreliable
|
||||
// So use an alternative chinese mirror they can use
|
||||
all.add(SystemIconSource.GitRepository.builder()
|
||||
.remote("https://github.com/selfhst/icons")
|
||||
.remote(AppPrefs.get().language().getValue() == SupportedLocale.CHINESE ? "https://gitcode.com/gh_mirrors/icons13/icons" : "https://github.com/selfhst/icons")
|
||||
.id("selfhst")
|
||||
.build());
|
||||
for (var pref : prefs) {
|
||||
|
||||
Vendored
+1
@@ -91,4 +91,5 @@ The application window will now hide any unnecessary sidebars when being resized
|
||||
- Fix some launched applications exiting on Windows if XPipe is closed
|
||||
- Fix powershell profile modules potentially breaking powershell shell environments
|
||||
- Fix terminal launch failing on Windows when connection name contained some special characters
|
||||
- Fix selfhst icons not reliably working for chinese users
|
||||
- Fix application restart after update not applying current workspace directory
|
||||
|
||||
Reference in New Issue
Block a user