major design improvements for modals
This commit is contained in:
parent
402807995c
commit
1e02b29465
10 changed files with 100 additions and 73 deletions
|
@ -166,17 +166,24 @@ body {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background-color: var(--background-color-1);
|
background-color: var(--background-color-1);
|
||||||
border-radius: var(--radius-lg);
|
border-radius: var(--radius-lg);
|
||||||
padding: var(--space-md);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-header {
|
.modal-header {
|
||||||
margin-bottom: var(--space-md);
|
font-weight: bold;
|
||||||
text-align: center;
|
padding: var(--space-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content {
|
||||||
|
padding: var(--space-md);
|
||||||
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-footer {
|
.modal-footer {
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
padding-top: var(--space-lg);
|
padding: var(--space-md);
|
||||||
|
background-color: var(--background-color-0);
|
||||||
|
border-bottom-right-radius: var(--radius-lg);
|
||||||
|
border-bottom-left-radius: var(--radius-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-primary-action {
|
.modal-primary-action {
|
||||||
|
@ -191,14 +198,18 @@ body {
|
||||||
.modal {
|
.modal {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: var(--radius-xl);
|
border-radius: var(--radius-xl);
|
||||||
|
}
|
||||||
|
.modal, .modal-footer {
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-backdrop {
|
.modal-backdrop {
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
backdrop-filter: unset;
|
backdrop-filter: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-backdrop-opaque {
|
.modal-backdrop-opaque {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,10 +66,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-channel-buttons {
|
.sidebar-channel-buttons {
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
<span class="h4">Create an Account</span>
|
<span class="h4">Create an Account</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
<label class="input-label">
|
<label class="input-label">
|
||||||
Username
|
Username
|
||||||
<input class="input full-width" minlength="1" maxlength="32" bind:value={ username } />
|
<input class="input full-width" minlength="1" maxlength="32" bind:value={ username } />
|
||||||
|
@ -69,6 +70,7 @@
|
||||||
Password
|
Password
|
||||||
<input class="input full-width" minlength="8" type="password" bind:value={ password } />
|
<input class="input full-width" minlength="8" type="password" bind:value={ password } />
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="button modal-secondary-action" on:click="{ loginInstead }">Log in instead</button>
|
<button class="button modal-secondary-action" on:click="{ loginInstead }">Log in instead</button>
|
||||||
|
|
|
@ -38,10 +38,12 @@
|
||||||
<span class="h4">Create Channel</span>
|
<span class="h4">Create Channel</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
<label class="input-label">
|
<label class="input-label">
|
||||||
Channel Name
|
Channel Name
|
||||||
<input class="input full-width" minlength="1" maxlength="32" bind:value={ channelName } />
|
<input class="input full-width" minlength="1" maxlength="32" bind:value={ channelName } />
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="button modal-secondary-action" on:click="{ close }">Cancel</button>
|
<button class="button modal-secondary-action" on:click="{ close }">Cancel</button>
|
||||||
|
|
|
@ -52,10 +52,12 @@
|
||||||
<span class="h4">Edit Channel</span>
|
<span class="h4">Edit Channel</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
<label class="input-label">
|
<label class="input-label">
|
||||||
Channel Name
|
Channel Name
|
||||||
<input class="input full-width" minlength="1" maxlength="32" bind:value={ channelName } />
|
<input class="input full-width" minlength="1" maxlength="32" bind:value={ channelName } />
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="button modal-secondary-action" on:click="{ close }">Cancel</button>
|
<button class="button modal-secondary-action" on:click="{ close }">Cancel</button>
|
||||||
|
|
|
@ -52,10 +52,12 @@
|
||||||
<span class="h4">Edit Message</span>
|
<span class="h4">Edit Message</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
<label class="input-label">
|
<label class="input-label">
|
||||||
Content
|
Content
|
||||||
<input class="input full-width" minlength="1" bind:value={ messageContent } />
|
<input class="input full-width" minlength="1" bind:value={ messageContent } />
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="button modal-secondary-action" on:click="{ close }">Cancel</button>
|
<button class="button modal-secondary-action" on:click="{ close }">Cancel</button>
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
<span class="h4">Welcome back!</span>
|
<span class="h4">Welcome back!</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
<label class="input-label">
|
<label class="input-label">
|
||||||
Username
|
Username
|
||||||
<input class="input full-width" minlength="1" maxlength="32" bind:value={ username } />
|
<input class="input full-width" minlength="1" maxlength="32" bind:value={ username } />
|
||||||
|
@ -73,6 +74,7 @@
|
||||||
Password
|
Password
|
||||||
<input class="input full-width" minlength="8" type="password" bind:value={ password } />
|
<input class="input full-width" minlength="8" type="password" bind:value={ password } />
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="button modal-secondary-action" on:click="{ createAccountInstead }">Create an account instead</button>
|
<button class="button modal-secondary-action" on:click="{ createAccountInstead }">Create an account instead</button>
|
||||||
|
|
|
@ -39,10 +39,12 @@
|
||||||
<span class="h4">{ heading }</span>
|
<span class="h4">{ heading }</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
<label class="input-label">
|
<label class="input-label">
|
||||||
{ valueName }
|
{ valueName }
|
||||||
<input class="input full-width" bind:value={ userInput } />
|
<input class="input full-width" bind:value={ userInput } />
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="button modal-secondary-action" on:click="{ closePrompt }">Cancel</button>
|
<button class="button modal-secondary-action" on:click="{ closePrompt }">Cancel</button>
|
||||||
|
|
|
@ -66,6 +66,12 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
padding: var(--space-md);
|
padding: var(--space-md);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
border: 1px solid var(--background-color-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.selection-option {
|
||||||
|
border: 1px solid var(--background-color-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.selection-option.selected {
|
.selection-option.selected {
|
||||||
|
@ -74,13 +80,13 @@
|
||||||
|
|
||||||
.horizontal-selections {
|
.horizontal-selections {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--space-md);
|
gap: var(--space-sm);
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
}
|
}
|
||||||
|
|
||||||
.large-settings {
|
.large-settings {
|
||||||
min-width: 540px;
|
min-width: 540px;
|
||||||
min-height: 420px;
|
padding-bottom: var(--space-xs);
|
||||||
}
|
}
|
||||||
|
|
||||||
.account-buttons {
|
.account-buttons {
|
||||||
|
@ -90,6 +96,11 @@
|
||||||
|
|
||||||
<div class="modal-backdrop" transition:maybeModalFade on:click="{ close }">
|
<div class="modal-backdrop" transition:maybeModalFade on:click="{ close }">
|
||||||
<div class="modal" class:large-settings="{ !$smallViewport }" transition:maybeModalScale on:click|stopPropagation>
|
<div class="modal" class:large-settings="{ !$smallViewport }" transition:maybeModalScale on:click|stopPropagation>
|
||||||
|
<div class="modal-header">
|
||||||
|
<span class="h4">Settings</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
<span class="input-label" on:click={ doDeveloper }>Account</span>
|
<span class="input-label" on:click={ doDeveloper }>Account</span>
|
||||||
<div class="settings-card full-width">
|
<div class="settings-card full-width">
|
||||||
<span class="material-icons-outlined">alternate_email</span>
|
<span class="material-icons-outlined">alternate_email</span>
|
||||||
|
@ -111,12 +122,9 @@
|
||||||
|
|
||||||
<span class="input-label">Animations</span>
|
<span class="input-label">Animations</span>
|
||||||
<div class="horizontal-selections">
|
<div class="horizontal-selections">
|
||||||
<button class="button selection-option full-width selected" class:selected="{ $doAnimations === false }" on:click="{ () => doAnimations.set(false) }">Disabled</button>
|
|
||||||
<button class="button selection-option full-width" class:selected="{ $doAnimations === true }" on:click="{ () => doAnimations.set(true) }">Enabled</button>
|
<button class="button selection-option full-width" class:selected="{ $doAnimations === true }" on:click="{ () => doAnimations.set(true) }">Enabled</button>
|
||||||
</div>
|
<button class="button selection-option full-width selected" class:selected="{ $doAnimations === false }" on:click="{ () => doAnimations.set(false) }">Disabled</button>
|
||||||
|
</div>
|
||||||
<div class="modal-footer">
|
|
||||||
<button class="button modal-secondary-action" on:click="{ close }">Close</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<span class="h4">{ presenceEntry.user.username }</span>
|
<span class="h4">{ presenceEntry.user.username }</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="modal-content">
|
||||||
{#if presenceEntry.bridgesTo}
|
{#if presenceEntry.bridgesTo}
|
||||||
<div class="user-info-row">
|
<div class="user-info-row">
|
||||||
<span class="material-icons-outlined">cloud_sync</span>
|
<span class="material-icons-outlined">cloud_sync</span>
|
||||||
|
|
Loading…
Reference in a new issue