Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make plotting button change icon and tooltip on interaction #360

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ jobs:
run: |
# Build Debian package
cargo deb --target ${{ matrix.build.target }} --profile production --no-build --no-strip --variant=modern
mv target/${{ matrix.build.target }}/debian/*.deb .
mv target/${{ matrix.build.target }}/debian/*.deb .

# And build AppImage as well
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
Expand All @@ -415,7 +415,7 @@ jobs:
run: |
# Build Debian package
cargo deb --target ${{ matrix.build.target }} --profile production --no-build --no-strip
mv target/${{ matrix.build.target }}/debian/*.deb .
mv target/${{ matrix.build.target }}/debian/*.deb .

# And build AppImage as well
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
Expand Down
5 changes: 3 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ fn main() {
"cross-small",
"checkmark",
"grid-filled",
"puzzle-piece",
"pause",
"menu-large",
"pause",
"play",
"processor",
"puzzle-piece",
"size-horizontally",
"speedometer-low",
"speedometer-medium",
Expand Down
5 changes: 3 additions & 2 deletions res/translations/de-DE/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ running_node_status_syncing =
running_node_status_synced = Synced, best block #{$best_block_number}
running_farmer_title = Farmer
running_farmer_button_expand_details = Details zu jeder Farm erweitern
running_farmer_button_pause_plotting = Plotten/Replotten pausieren, bitte beachten, dass aktuell laufende Encoding-Prozesse nicht unterbrochen werden.
running_farmer_account_balance_tooltip = Gesamtsaldo des Kontos und gefarmte Coins seit Start der Anwendung, klicken, um Details in Astral anzuzeigen.
running_farmer_button_pause_plotting = Plotten/Replotten pausieren, bitte beachten, dass aktuell laufende Encoding-Prozesse nicht unterbrochen werden
running_farmer_button_resume_plotting = Plotten fortsetzen
running_farmer_account_balance_tooltip = Gesamtsaldo des Kontos und gefarmte Coins seit Start der Anwendung, klicken, um Details in Astral anzuzeigen
running_farmer_piece_cache_sync = Piece-Cache-Synchronisation {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
running_farmer_next_reward_estimate =
Nächste Reward-Schätzung: {$eta_string ->
Expand Down
1 change: 1 addition & 0 deletions res/translations/en/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ running_node_status_synced = Synced, best block #{$best_block_number}
running_farmer_title = Farmer
running_farmer_button_expand_details = Expand details about each farm
running_farmer_button_pause_plotting = Pause plotting/replotting, note that currently encoding sectors will not be interrupted
running_farmer_button_resume_plotting = Resume plotting
running_farmer_account_balance_tooltip = Total account balance and coins farmed since application started, click to see details in Astral
running_farmer_piece_cache_sync = Piece cache sync {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
running_farmer_next_reward_estimate =
Expand Down
1 change: 1 addition & 0 deletions res/translations/es/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ running_node_status_synced = Sincronización completada, mejor bloque #{$best_bl
running_farmer_title = Granjero
running_farmer_button_expand_details = Amplía detalles del granjero
running_farmer_button_pause_plotting = Pausar creación y sustitución de parcelas, ten en cuenta que el procesamiento de los sectores no será interrumpido
running_farmer_button_resume_plotting = Reanudar la creación de la parcela
running_farmer_account_balance_tooltip = Balance total de la cuenta y monedas granjeadas desde que la aplicación se inició, clica para ver más detalles en Astral
running_farmer_piece_cache_sync = Caché sincronizada {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
running_farmer_next_reward_estimate =
Expand Down
1 change: 1 addition & 0 deletions res/translations/fr/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ running_node_status_synced = Synchronisé, meilleur bloc #{$best_block_number}
running_farmer_title = Ferme
running_farmer_button_expand_details = Afficher les détails de chaque ferme
running_farmer_button_pause_plotting = Suspendre le plotting/replotting. Notez que le codage en cours des secteurs ne sera pas interrompu
running_farmer_button_resume_plotting = Reprendre le plotting
running_farmer_account_balance_tooltip = Solde total et pièces gagnées depuis le lancement de l'application. Cliquez pour voir les détails dans Astral
running_farmer_piece_cache_sync = Synchronisation du cache de morceaux à {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
running_farmer_next_reward_estimate =
Expand Down
1 change: 1 addition & 0 deletions res/translations/ru-RU/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ running_node_status_synced = Синхронизовано, лучший блок
running_farmer_title = Ферма
running_farmer_button_expand_details = Показать детали о каждой ферме
running_farmer_button_pause_plotting = Приостановить плоттинг/реплоттинг. Обратите внимание, что текущее кодирование секторов не будет прервано
running_farmer_button_resume_plotting = Продолжить плоттинг
running_farmer_account_balance_tooltip = Общий баланс и монеты, заработанные с момента запуска приложения. Нажмите, чтобы увидеть подробности в Astral
running_farmer_piece_cache_sync = Синхронизация фрагментов кэша {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
running_farmer_next_reward_estimate =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ running_node_status_synced = Sinhronizovano, najbolji blok #{$best_block_number}
running_farmer_title = Farmer
running_farmer_button_expand_details = Proširi detalje o svakoj farmi
running_farmer_button_pause_plotting = Pauziraj plotovanje/preplotovanje, imajte na umu da trenutno kodiranje sektora neće biti prekinuto
running_farmer_button_resume_plotting = Nastavi plotovanje
running_farmer_account_balance_tooltip = Ukupni saldo i kovanice zarđene od početka rada aplikacije, kliknite da vidite detalje u Astral
running_farmer_piece_cache_sync = Sinhronizacija delova keša {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
running_farmer_next_reward_estimate =
Expand Down
1 change: 1 addition & 0 deletions res/translations/uk-UA/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ running_node_status_synced = Синхронізовано, кращий блок
running_farmer_title = Фармер
running_farmer_button_expand_details = Показати деталі про кожну ферму
running_farmer_button_pause_plotting = Призупення плотингу/реплотингу, зверніть увагу, що розпочате кодування секторів не буде перервано
running_farmer_button_resume_plotting = Продовжити плоттинг
running_farmer_account_balance_tooltip = Загальний баланс рахунку та монет, зароблених з моменту запуску програми, натисніть, щоб побачити деталі в Astral
running_farmer_piece_cache_sync = Синхронізація фрагментів кешу {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
running_farmer_next_reward_estimate =
Expand Down
1 change: 1 addition & 0 deletions res/translations/zh-CN/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ running_node_status_synced = 同步完成, 最新区块 #{$best_block_number}
running_farmer_title = 农民
running_farmer_button_expand_details = 各农场的详细信息
running_farmer_button_pause_plotting = 暂停绘图/重新绘图,当前的编码扇区不会被中断
running_farmer_button_resume_plotting = 继续绘图
running_farmer_account_balance_tooltip = 自启动以来耕种到的总奖励币,点击在 Astral 中查看更多详细信息
running_farmer_piece_cache_sync = Piece缓存同步 {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
running_farmer_next_reward_estimate =
Expand Down
18 changes: 15 additions & 3 deletions src/frontend/running.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,20 @@ impl Component for RunningView {
set_active: model.plotting_paused,
set_cursor_from_name: Some("pointer"),
set_has_frame: false,
set_icon_name: icon_names::PAUSE,
set_tooltip: &T.running_farmer_button_pause_plotting(),
#[track = "model.changed_plotting_paused()"]
set_icon_name:
if model.plotting_paused {
icon_names::PLAY
} else {
icon_names::PAUSE
},
#[track = "model.changed_plotting_paused()"]
set_tooltip:
&if model.plotting_paused {
T.running_farmer_button_resume_plotting()
} else {
T.running_farmer_button_pause_plotting()
},
},
},
gtk::Box {
Expand Down Expand Up @@ -484,7 +496,7 @@ impl RunningView {
self.farms.broadcast(FarmWidgetInput::ToggleFarmDetails);
}
RunningInput::TogglePausePlotting => {
self.plotting_paused = !self.plotting_paused;
self.set_plotting_paused(!self.plotting_paused);
self.farms
.broadcast(FarmWidgetInput::PausePlotting(self.plotting_paused));
if sender
Expand Down