Skip to content

Commit 96c120f

Browse files
authored
feat: connect settings page updated for responsive webgui (#1585)
1 parent a2c5d24 commit 96c120f

2 files changed

Lines changed: 37 additions & 26 deletions

File tree

plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,14 @@ $('body').on('click', '.js-setCurrentHostExtraOrigins', function(e) {
491491

492492
<?if($isConnectPluginInstalled):?>
493493
<div markdown="1" class="<?=$shade?>"><!-- begin Flash Backup section -->
494-
_(Flash backup)_:
495494
<?if(!$isRegistered):?>
495+
_(Flash backup)_:
496496
: <span><i class="fa fa-warning icon warning"></i> _(Disabled until you have signed in)_</span>
497497
<?elseif(!$isMiniGraphConnected):?>
498+
_(Flash backup)_:
498499
: <span><i class="fa fa-warning icon warning"></i> _(Disabled until connected to Unraid Connect Cloud - try reloading the page)_</span>
499500
<?else: // begin show flash backup form ?>
501+
_(Flash backup)_:
500502
: <span id='flashbackuptext'><span class='blue p0'>_(Loading)_ <i class="fa fa-spinner fa-spin" aria-hidden="true"></i></span></span>
501503

502504
<form markdown="1" name="FlashBackup" method="POST" action="/update.htm" target="progressFrame">
@@ -512,40 +514,60 @@ _(Flash backup)_:
512514

513515
</div>
514516
<div markdown="1" id="inactivespanel" style="display:none">
515-
&nbsp;
516517
<?if(disk_free_space('/boot') > 1024*1000*1000):?>
517-
: <button type="button" onclick="enableFlashBackup(this)">_(Activate)_</button> <span>_(Please note that the flash backup is not encrypted at this time.)_ <a href="https://docs.unraid.net/go/connect-flash-backup/" target="_blank">_(More information.)_</a></span>
518+
&nbsp;
519+
: <span class="buttons-spaced">
520+
<button type="button" onclick="enableFlashBackup(this)">_(Activate)_</button>
521+
<span>_(Please note that the flash backup is not encrypted at this time.)_ <a href="https://docs.unraid.net/go/connect-flash-backup/" target="_blank">_(More information.)_</a></span>
522+
</span>
518523
<?else:?>
519-
: <button type="button" disabled>_(Activate)_</button> <span><i class="fa fa-warning icon warning"></i> _(In order to activate Flash Backup there must be at least 1GB of free space on your flash drive.)_</span>
524+
&nbsp;
525+
: <span class="buttons-spaced">
526+
<button type="button" disabled>_(Activate)_</button>
527+
<span><i class="fa fa-warning icon warning"></i> _(In order to activate Flash Backup there must be at least 1GB of free space on your flash drive.)_</span>
528+
</span>
520529
<?endif?>
521530

522531
&nbsp;
523-
: <button type="button" onclick="enableFlashBackup(this)" id="deletecloudbackup" disabled>_(Delete Cloud Backup)_</button>
532+
: <span class="buttons-spaced">
533+
<button type="button" onclick="enableFlashBackup(this)" id="deletecloudbackup" disabled>_(Delete Cloud Backup)_</button>
534+
</span>
524535

525536
:unraidnet_inactivespanel_help:
526537

527538
</div>
528539
<div markdown="1" id="changespanel" style="display:none">
529540
&nbsp;
530-
: <button type="button" onclick="enableFlashBackup(this)">_(Update)_</button> <button type="button" onclick="enableFlashBackup(this)">_(Changes)_</button>
541+
: <span class="buttons-spaced">
542+
<button type="button" onclick="enableFlashBackup(this)">_(Update)_</button>
543+
<button type="button" onclick="enableFlashBackup(this)">_(Changes)_</button>
544+
</span>
531545

532546
:unraidnet_changespanel_help:
533547

534548
</div>
535549
<div markdown="1" id="uptodatepanel" style="display:none">
536550
&nbsp;
537-
: <button type="button" disabled>_(Update)_</button>
551+
: <span class="buttons-spaced">
552+
<button type="button" disabled>_(Update)_</button>
553+
</span>
538554

539555
:unraidnet_uptodatepanel_help:
540556

541557
</div>
542558
<div markdown="1" id="activepanel" style="display:none">
543559
&nbsp;
544-
: <button type="button" onclick="enableFlashBackup(this)">_(Deactivate)_</button> <span>_(Please note that the flash backup is not encrypted at this time.)_ <a href="https://docs.unraid.net/go/connect-flash-backup/" target="_blank">_(More information.)_</a></span>
560+
: <span class="buttons-spaced">
561+
<button type="button" onclick="enableFlashBackup(this)">_(Deactivate)_</button>
562+
<span>_(Please note that the flash backup is not encrypted at this time.)_ <a href="https://docs.unraid.net/go/connect-flash-backup/" target="_blank">_(More information.)_</a></span>
563+
</span>
545564

546565
<?if (in_array($_COOKIE['UPC_ENV']??'', ['development','staging']) && file_exists("/var/log/gitflash") && filesize("/var/log/gitflash")):?>
547566
&nbsp;
548-
: <button type="button" onclick="openBox('/plugins/dynamix.my.servers/scripts/gitflash_log', 'Flash Backup Error Log', 800, 800);">_(View Flash Backup Error Log)_</button> <span><em>_(Transient errors in this log can be ignored unless you are having issues)_</em></span>
567+
: <span class="buttons-spaced">
568+
<button type="button" onclick="openBox('/plugins/dynamix.my.servers/scripts/gitflash_log', 'Flash Backup Error Log', 800, 800);">_(View Flash Backup Error Log)_</button>
569+
<span><em>_(Transient errors in this log can be ignored unless you are having issues)_</em></span>
570+
</span>
549571
<?endif?>
550572

551573
</div>

unraid-ui/src/components/layout/SettingsGrid.vue

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,13 @@ const props = defineProps<{
88

99
<template>
1010
<div
11-
:class="cn('settings-grid grid gap-2 items-baseline md:pl-3 md:gap-x-10 md:gap-y-6', props.class)"
11+
:class="
12+
cn(
13+
'grid grid-cols-1 md:grid-cols-[35%_1fr] [&>*:nth-child(odd)]:text-end gap-2 items-baseline md:gap-x-3 md:gap-y-6',
14+
props.class
15+
)
16+
"
1217
>
1318
<slot />
1419
</div>
1520
</template>
16-
17-
<style>
18-
.settings-grid {
19-
grid-template-columns: 1fr;
20-
}
21-
22-
@media (min-width: 768px) {
23-
.settings-grid {
24-
grid-template-columns: 35% 1fr;
25-
}
26-
27-
.settings-grid > *:nth-child(odd) {
28-
text-align: end;
29-
}
30-
}
31-
</style>

0 commit comments

Comments
 (0)