Various fixes

This commit is contained in:
crschnick 2024-09-03 08:30:48 +00:00
parent 0a8e87e26a
commit 440664e56f
16 changed files with 48 additions and 5 deletions

View file

@ -176,6 +176,7 @@ public class StoreViewState {
var l = Arrays.stream(entry)
.map(StoreEntryWrapper::new)
.peek(storeEntryWrapper -> storeEntryWrapper.update())
.peek(wrapper -> wrapper.applyLastAccess())
.toList();
Platform.runLater(() -> {
// Don't update anything if we have already reset

View file

@ -121,6 +121,25 @@ public abstract class StorageElement {
notifyUpdate(false, true);
}
public void setLastModified(Instant lastModified) {
if (lastModified.equals(this.lastModified)) {
return;
}
this.lastModified = lastModified;
notifyUpdate(false, false);
}
public void setLastUsed(Instant lastUsed) {
if (lastUsed.equals(this.lastUsed)) {
return;
}
this.lastUsed = lastUsed;
notifyUpdate(false, false);
}
public interface Listener {
void onUpdate();
}

View file

@ -1,3 +1,11 @@
.scroll-bar {
-fx-opacity: 1.0;
}
.scroll-bar .thumb {
-fx-opacity: 0.5;
}
.scroll-bar:vertical {
-fx-min-width: 7px;
-fx-pref-width: 7px;

View file

@ -6,11 +6,11 @@ import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.storage.DataStoreEntry;
import io.xpipe.app.storage.DataStoreEntryRef;
import io.xpipe.core.store.DataStore;
import javafx.beans.value.ObservableValue;
import lombok.Value;
import java.time.Duration;
public class CloneStoreAction implements ActionProvider {
@Override
@ -52,12 +52,15 @@ public class CloneStoreAction implements ActionProvider {
@Value
static class Action implements ActionProvider.Action {
DataStoreEntry store;
DataStoreEntry entry;
@Override
public void execute() {
DataStorage.get()
.addStoreEntryIfNotPresent(DataStoreEntry.createNew(store.getName() + " (Copy)", store.getStore()));
var entry = DataStoreEntry.createNew(this.entry.getName() + " (Copy)", this.entry.getStore());
var instant = this.entry.getLastAccess().plus(Duration.ofSeconds(1));
entry.setLastModified(instant);
entry.setLastUsed(instant);
DataStorage.get().addStoreEntryIfNotPresent(entry);
}
}
}

View file

@ -395,3 +395,4 @@ hyperVVm.displayName=Hyper-V VM
hyperVVm.displayDescription=Opret forbindelse til en Hyper-V VM via SSH eller PSSession
trustHost=Tillidsvært
trustHostDescription=Tilføj ComputerName til listen over betroede værter
copyIp=Kopier IP

View file

@ -373,3 +373,4 @@ hyperVVm.displayName=Hyper-V VM
hyperVVm.displayDescription=Verbindung zu einer Hyper-V VM über SSH oder PSSession
trustHost=Vertrauenswürdiger Host
trustHostDescription=Computername zur Liste der vertrauenswürdigen Hosts hinzufügen
copyIp=IP kopieren

View file

@ -371,4 +371,5 @@ hyperVVm.displayName=Hyper-V VM
hyperVVm.displayDescription=Connect to a Hyper-V VM via SSH or PSSession
trustHost=Trust host
trustHostDescription=Add ComputerName to trusted hosts list
copyIp=Copy IP

View file

@ -369,3 +369,4 @@ hyperVVm.displayName=VM Hyper-V
hyperVVm.displayDescription=Conectarse a una máquina virtual Hyper-V mediante SSH o PSSession
trustHost=Host de confianza
trustHostDescription=Añadir ComputerName a la lista de hosts de confianza
copyIp=Copiar IP

View file

@ -369,3 +369,4 @@ hyperVVm.displayName=VM Hyper-V
hyperVVm.displayDescription=Se connecter à une VM Hyper-V via SSH ou PSSession
trustHost=Hôte de confiance
trustHostDescription=Ajoute NomOrdinateur à la liste des hôtes de confiance
copyIp=Copier l'IP

View file

@ -369,3 +369,4 @@ hyperVVm.displayName=VM Hyper-V
hyperVVm.displayDescription=Connettersi a una macchina virtuale Hyper-V tramite SSH o PSSession
trustHost=Host fiduciario
trustHostDescription=Aggiungi NomeComputer all'elenco degli host attendibili
copyIp=Copia IP

View file

@ -369,3 +369,4 @@ hyperVVm.displayName=Hyper-V VM
hyperVVm.displayDescription=SSHまたはPSSession経由でHyper-V VMに接続する
trustHost=トラストホスト
trustHostDescription=ComputerNameを信頼済みホストリストに追加する
copyIp=コピーIP

View file

@ -369,3 +369,4 @@ hyperVVm.displayName=Hyper-V VM
hyperVVm.displayDescription=Verbinding maken met een Hyper-V VM via SSH of PSSession
trustHost=Vertrouwende host
trustHostDescription=ComputerNaam toevoegen aan vertrouwde hosts lijst
copyIp=IP kopiëren

View file

@ -369,3 +369,4 @@ hyperVVm.displayName=VM Hyper-V
hyperVVm.displayDescription=Liga-te a uma VM Hyper-V através de SSH ou PSSession
trustHost=Anfitrião de confiança
trustHostDescription=Adiciona ComputerName à lista de anfitriões de confiança
copyIp=Copia o IP

View file

@ -369,3 +369,4 @@ hyperVVm.displayName=Hyper-V VM
hyperVVm.displayDescription=Подключение к виртуальной машине Hyper-V через SSH или PSSession
trustHost=Доверительный хост
trustHostDescription=Добавьте ComputerName в список доверенных хостов
copyIp=Копировать IP

View file

@ -369,3 +369,4 @@ hyperVVm.displayName=Hyper-V VM
hyperVVm.displayDescription=SSH veya PSSession aracılığıyla bir Hyper-V sanal makinesine bağlanma
trustHost=Güven ev sahibi
trustHostDescription=ComputerName'i güvenilir ana bilgisayarlar listesine ekleme
copyIp=IP Kopyala

View file

@ -369,3 +369,4 @@ hyperVVm.displayName=Hyper-V 虚拟机
hyperVVm.displayDescription=通过 SSH 或 PSSession 连接到 Hyper-V 虚拟机
trustHost=信任主机
trustHostDescription=将 ComputerName 添加到受信任主机列表
copyIp=复制 IP