Skip to content

Commit

Permalink
Improve full screen menu layouts. Focus main window on launch
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphiiko committed Sep 30, 2024
1 parent 2b92e4f commit 3a37784
Show file tree
Hide file tree
Showing 36 changed files with 2,366 additions and 2,290 deletions.
4 changes: 3 additions & 1 deletion src-core/src/commands/splash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ pub async fn close_splashscreen(window: tauri::Window) {
.unwrap()
.start_in_tray
{
window.get_window("main").unwrap().show().unwrap();
let window = window.get_window("main").unwrap();
window.show().unwrap();
window.set_focus().unwrap();
}
}
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
<div class="pane main">
<div class="pane-title" translate>audio-volume-automations.title</div>
<div class="pane-content">
<p translate>audio-volume-automations.description</p>
<div class="setting-category">
<h3 translate>audio-volume-automations.onSleepEnable.title</h3>
<p translate>audio-volume-automations.onSleepEnable.description</p>
<app-audio-volume-entries
[automations]="config.onSleepEnableAutomations"
(automationsChange)="onAutomationsChange('onSleepEnable', $event)"
[automationType]="'onSleepEnable'"
></app-audio-volume-entries>
</div>
<div class="setting-category">
<h3 translate>audio-volume-automations.onSleepDisable.title</h3>
<p translate>audio-volume-automations.onSleepDisable.description</p>
<app-audio-volume-entries
[automations]="config.onSleepDisableAutomations"
(automationsChange)="onAutomationsChange('onSleepDisable', $event)"
[automationType]="'onSleepDisable'"
></app-audio-volume-entries>
</div>
<div class="setting-category">
<h3 translate>audio-volume-automations.onSleepPreparation.title</h3>
<p translate>audio-volume-automations.onSleepPreparation.description</p>
<app-audio-volume-entries
[automations]="config.onSleepPreparationAutomations"
(automationsChange)="onAutomationsChange('onSleepPreparation', $event)"
[automationType]="'onSleepPreparation'"
></app-audio-volume-entries>
<div class="setting-view-container">
<p translate>audio-volume-automations.description</p>
<div class="setting-category">
<h3 translate>audio-volume-automations.onSleepEnable.title</h3>
<p translate>audio-volume-automations.onSleepEnable.description</p>
<app-audio-volume-entries
[automations]="config.onSleepEnableAutomations"
(automationsChange)="onAutomationsChange('onSleepEnable', $event)"
[automationType]="'onSleepEnable'"
></app-audio-volume-entries>
</div>
<div class="setting-category">
<h3 translate>audio-volume-automations.onSleepDisable.title</h3>
<p translate>audio-volume-automations.onSleepDisable.description</p>
<app-audio-volume-entries
[automations]="config.onSleepDisableAutomations"
(automationsChange)="onAutomationsChange('onSleepDisable', $event)"
[automationType]="'onSleepDisable'"
></app-audio-volume-entries>
</div>
<div class="setting-category">
<h3 translate>audio-volume-automations.onSleepPreparation.title</h3>
<p translate>audio-volume-automations.onSleepPreparation.description</p>
<app-audio-volume-entries
[automations]="config.onSleepPreparationAutomations"
(automationsChange)="onAutomationsChange('onSleepPreparation', $event)"
[automationType]="'onSleepPreparation'"
></app-audio-volume-entries>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,89 +1,90 @@
<div class="pane main">
<div class="pane-title" translate>auto-invite-request-accept.title</div>
<div class="pane-content">
<p translate>auto-invite-request-accept.description</p>
<div class="alert warning" *ngIf="!loggedIn" @vshrink>
<div class="alert-bg"></div>
<div class="alert-icon">
<i class="material-icons"> warning </i>
</div>
<div class="alert-content">
<span>{{ 'shared.misc.vrcLoginRequired' | translate }}</span>
<button class="btn btn-secondary" (click)="login()" translate>shared.modals.login</button>
</div>
</div>
<div class="alert warning" *ngIf="isOnBusyStatus" @vshrink>
<div class="alert-bg"></div>
<div class="alert-icon">
<i class="material-icons"> warning </i>
</div>
<div class="alert-content">
<span>{{ 'auto-invite-request-accept.userOnBusyStatus' | translate }}</span></div
>
</div>
<div class="alert warning" *ngIf="isOnJoinMeStatus" @vshrink>
<div class="alert-bg"></div>
<div class="alert-icon">
<i class="material-icons"> warning </i>
</div>
<div class="alert-content">
<span>{{ 'auto-invite-request-accept.userOnJoinMeStatus' | translate }}</span></div
>
</div>
<div class="settings">
<div class="setting-row">
<div class="setting-row-label">
<span translate>auto-invite-request-accept.options.enable.title</span>
<span translate>auto-invite-request-accept.options.enable.description</span>
<div class="setting-view-container">
<p translate>auto-invite-request-accept.description</p>
<div class="alert warning" *ngIf="!loggedIn" @vshrink>
<div class="alert-bg"></div>
<div class="alert-icon">
<i class="material-icons"> warning </i>
</div>
<div class="setting-row-action">
<label class="switch-toggle">
<input
type="checkbox"
[checked]="config.enabled"
(change)="updateConfig({ enabled: !config.enabled })"
/>
<span class="switch-toggle-slider"></span>
</label>
<div class="alert-content">
<span>{{ 'shared.misc.vrcLoginRequired' | translate }}</span>
<button class="btn btn-secondary" (click)="login()" translate>shared.modals.login</button>
</div>
</div>

<div class="setting-row">
<div class="setting-row-label" translate>
<span translate>auto-invite-request-accept.options.listMode.title</span>
<span translate>auto-invite-request-accept.options.listMode.description</span>
<div class="alert warning" *ngIf="isOnBusyStatus" @vshrink>
<div class="alert-bg"></div>
<div class="alert-icon">
<i class="material-icons"> warning </i>
</div>
<div class="setting-row-action">
<app-select-box
[items]="listModeOptions"
[selected]="listModeOption"
(selectedChange)="setListMode($event?.id)"
></app-select-box>
<div class="alert-content">
<span>{{ 'auto-invite-request-accept.userOnBusyStatus' | translate }}</span></div
>
</div>
<div class="alert warning" *ngIf="isOnJoinMeStatus" @vshrink>
<div class="alert-bg"></div>
<div class="alert-icon">
<i class="material-icons"> warning </i>
</div>
<div class="alert-content">
<span>{{ 'auto-invite-request-accept.userOnJoinMeStatus' | translate }}</span></div
>
</div>
</div>
<h2 translate>auto-invite-request-accept.conditions.title</h2>
<p translate>auto-invite-request-accept.conditions.description</p>
<div class="settings">
<div class="setting-row">
<div class="setting-row-label" translate>
<span translate>auto-invite-request-accept.options.onlyIfSleepModeEnabled.title</span>
<span translate></span>
<div class="settings">
<div class="setting-row">
<div class="setting-row-label">
<span translate>auto-invite-request-accept.options.enable.title</span>
<span translate>auto-invite-request-accept.options.enable.description</span>
</div>
<div class="setting-row-action">
<label class="switch-toggle">
<input
type="checkbox"
[checked]="config.enabled"
(change)="updateConfig({ enabled: !config.enabled })"
/>
<span class="switch-toggle-slider"></span>
</label>
</div>
</div>
<div class="setting-row-action">
<label class="switch-toggle">
<input
type="checkbox"
[checked]="config.onlyIfSleepModeEnabled"
(change)="updateConfig({ onlyIfSleepModeEnabled: !config.onlyIfSleepModeEnabled })"
/>
<span class="switch-toggle-slider"></span>
</label>

<div class="setting-row">
<div class="setting-row-label" translate>
<span translate>auto-invite-request-accept.options.listMode.title</span>
<span translate>auto-invite-request-accept.options.listMode.description</span>
</div>
<div class="setting-row-action">
<app-select-box
[items]="listModeOptions"
[selected]="listModeOption"
(selectedChange)="setListMode($event?.id)"
></app-select-box>
</div>
</div>
</div>
<h2 translate>auto-invite-request-accept.conditions.title</h2>
<p translate>auto-invite-request-accept.conditions.description</p>
<div class="settings">
<div class="setting-row">
<div class="setting-row-label" translate>
<span translate>auto-invite-request-accept.options.onlyIfSleepModeEnabled.title</span>
<span translate></span>
</div>
<div class="setting-row-action">
<label class="switch-toggle">
<input
type="checkbox"
[checked]="config.onlyIfSleepModeEnabled"
(change)="updateConfig({ onlyIfSleepModeEnabled: !config.onlyIfSleepModeEnabled })"
/>
<span class="switch-toggle-slider"></span>
</label>
</div>
</div>

<div class="setting-row">
<div class="setting-row-label" translate>
<div class="setting-row">
<div class="setting-row-label" translate>
<span
style="display: initial"
[innerHtml]="
Expand All @@ -94,92 +95,93 @@ <h2 translate>auto-invite-request-accept.conditions.title</h2>
}
"
></span>
<span translate>auto-invite-request-accept.options.onlyBelowPlayerCount.description</span>
</div>
<div class="setting-row-action">
<app-slider-setting
class="with-margin"
[unit]="'<i class=&quot;material-icons&quot;>person</i>'"
[min]="2"
[max]="100"
[value]="config.onlyBelowPlayerCount"
(valueChange)="updateConfig({ onlyBelowPlayerCount: $event })"
[disabled]="!config.onlyBelowPlayerCountEnabled"
></app-slider-setting>
<label class="switch-toggle">
<input
type="checkbox"
[checked]="config.onlyBelowPlayerCountEnabled"
(change)="
<span translate>auto-invite-request-accept.options.onlyBelowPlayerCount.description</span>
</div>
<div class="setting-row-action">
<app-slider-setting
class="with-margin"
[unit]="'<i class=&quot;material-icons&quot;>person</i>'"
[min]="2"
[max]="100"
[value]="config.onlyBelowPlayerCount"
(valueChange)="updateConfig({ onlyBelowPlayerCount: $event })"
[disabled]="!config.onlyBelowPlayerCountEnabled"
></app-slider-setting>
<label class="switch-toggle">
<input
type="checkbox"
[checked]="config.onlyBelowPlayerCountEnabled"
(change)="
updateConfig({
onlyBelowPlayerCountEnabled: !config.onlyBelowPlayerCountEnabled
})
"
/>
<span class="switch-toggle-slider"></span>
</label>
/>
<span class="switch-toggle-slider"></span>
</label>
</div>
</div>
</div>
</div>

<h2 translate>auto-invite-request-accept.otherAutomations.title</h2>
<p translate>auto-invite-request-accept.otherAutomations.description</p>
<div class="settings">
<div class="setting-row">
<div class="setting-row-label" translate>
<h2 translate>auto-invite-request-accept.otherAutomations.title</h2>
<p translate>auto-invite-request-accept.otherAutomations.description</p>
<div class="settings">
<div class="setting-row">
<div class="setting-row-label" translate>
<span translate
>auto-invite-request-accept.options.changeListPreset.onSleepEnable.title</span
>auto-invite-request-accept.options.changeListPreset.onSleepEnable.title</span
>
<span translate
<span translate
>auto-invite-request-accept.options.changeListPreset.onSleepEnable.description</span
>
>
</div>
<div class="setting-row-action">
<app-select-box
class="preset-select-box"
[type]="'SMALL'"
[items]="presetOptions"
[selected]="presetOption['onSleepEnable']"
(selectedChange)="setPresetOption('onSleepEnable', $event?.id ?? 'NONE')"
></app-select-box>
</div>
</div>
<div class="setting-row-action">
<app-select-box
class="preset-select-box"
[type]="'SMALL'"
[items]="presetOptions"
[selected]="presetOption['onSleepEnable']"
(selectedChange)="setPresetOption('onSleepEnable', $event?.id ?? 'NONE')"
></app-select-box>
</div>
</div>
<div class="setting-row">
<div class="setting-row-label" translate>
<div class="setting-row">
<div class="setting-row-label" translate>
<span translate
>auto-invite-request-accept.options.changeListPreset.onSleepDisable.title</span
>auto-invite-request-accept.options.changeListPreset.onSleepDisable.title</span
>
<span translate
<span translate
>auto-invite-request-accept.options.changeListPreset.onSleepDisable.description</span
>
</div>
<div class="setting-row-action">
<app-select-box
class="preset-select-box"
[type]="'SMALL'"
[items]="presetOptions"
[selected]="presetOption['onSleepDisable']"
(selectedChange)="setPresetOption('onSleepDisable', $event?.id ?? 'NONE')"
></app-select-box>
>
</div>
<div class="setting-row-action">
<app-select-box
class="preset-select-box"
[type]="'SMALL'"
[items]="presetOptions"
[selected]="presetOption['onSleepDisable']"
(selectedChange)="setPresetOption('onSleepDisable', $event?.id ?? 'NONE')"
></app-select-box>
</div>
</div>
</div>
<div class="setting-row">
<div class="setting-row-label" translate>
<div class="setting-row">
<div class="setting-row-label" translate>
<span translate
>auto-invite-request-accept.options.changeListPreset.onSleepPreparation.title</span
>auto-invite-request-accept.options.changeListPreset.onSleepPreparation.title</span
>
<span translate
<span translate
>auto-invite-request-accept.options.changeListPreset.onSleepPreparation.description</span
>
</div>
<div class="setting-row-action">
<app-select-box
class="preset-select-box"
[type]="'SMALL'"
[items]="presetOptions"
[selected]="presetOption['onSleepPreparation']"
(selectedChange)="setPresetOption('onSleepPreparation', $event?.id ?? 'NONE')"
></app-select-box>
>
</div>
<div class="setting-row-action">
<app-select-box
class="preset-select-box"
[type]="'SMALL'"
[items]="presetOptions"
[selected]="presetOption['onSleepPreparation']"
(selectedChange)="setPresetOption('onSleepPreparation', $event?.id ?? 'NONE')"
></app-select-box>
</div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 3a37784

Please sign in to comment.