Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
crschnick committed Sep 3, 2024
1 parent 0a8e87e commit 440664e
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public void onStoreAdd(DataStoreEntry... entry) {
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
Expand Down
19 changes: 19 additions & 0 deletions app/src/main/java/io/xpipe/app/storage/StorageElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,25 @@ public void setName(String name) {
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();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
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
Expand Down Expand Up @@ -52,12 +52,15 @@ public String getIcon(DataStoreEntryRef<DataStore> store) {
@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);
}
}
}
1 change: 1 addition & 0 deletions lang/proc/strings/translations_da.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions lang/proc/strings/translations_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions lang/proc/strings/translations_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

1 change: 1 addition & 0 deletions lang/proc/strings/translations_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions lang/proc/strings/translations_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions lang/proc/strings/translations_it.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions lang/proc/strings/translations_ja.properties
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,4 @@ hyperVVm.displayName=Hyper-V VM
hyperVVm.displayDescription=SSHまたはPSSession経由でHyper-V VMに接続する
trustHost=トラストホスト
trustHostDescription=ComputerNameを信頼済みホストリストに追加する
copyIp=コピーIP
1 change: 1 addition & 0 deletions lang/proc/strings/translations_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions lang/proc/strings/translations_pt.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions lang/proc/strings/translations_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,4 @@ hyperVVm.displayName=Hyper-V VM
hyperVVm.displayDescription=Подключение к виртуальной машине Hyper-V через SSH или PSSession
trustHost=Доверительный хост
trustHostDescription=Добавьте ComputerName в список доверенных хостов
copyIp=Копировать IP
1 change: 1 addition & 0 deletions lang/proc/strings/translations_tr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions lang/proc/strings/translations_zh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,4 @@ hyperVVm.displayName=Hyper-V 虚拟机
hyperVVm.displayDescription=通过 SSH 或 PSSession 连接到 Hyper-V 虚拟机
trustHost=信任主机
trustHostDescription=将 ComputerName 添加到受信任主机列表
copyIp=复制 IP

0 comments on commit 440664e

Please sign in to comment.