* Begin work on worlds backend * Finish implementing get_profile_worlds and get_server_status (except pinning) * Create TS types and manually copy unparsed chat components * Clippy fix * Update types.d.ts * Initial worlds UI work * Fix api::get_profile_worlds to take in a relative path * sanitize & security update * Fix sanitizePotentialFileUrl * Fix sanitizePotentialFileUrl (for real) * Fix empty motd causing error * Finally actually fix world icons * Fix world icon not being visible on non-Windows * Use the correct generics to take in AppHandle * Implement start_join_singleplayer_world and start_join_server for modern versions * Don't error if server has no cached icon * Migrate to own server pinging * Ignore missing server hidden field and missing saves dir * Update world list frontend * More frontend work * Server status player sample can be absent * Fix refresh state * Add get_profile_protocol_version * Add protocol_version column to database * SQL INTEGER is i64 in sqlx * sqlx prepare * Cache protocol version in database * Continue worlds UI work * Fix motds being bold * Remove legacy pinging and add a 30-second timeout * Remove pinned for now and match world (and server) parsing closer to spec * Move type ServerStatus to worlds.ts * Implement add_server_to_profile * Fix pack_status being ignored when joining from launcher * Make World path field be relative * Implement rename_world and reset_world_icon * Clippy fix * Fix rename_world * UI enhancements * Implement backup_world, which returns the backup size in bytes * Clippy fix * Return index when adding servers to profile * Fix backup * Implement delete_world * Implement edit_server_in_profile and remove_server_from_profile * Clippy fix * Log server joins * Add edit and delete support * Fix ts errors * Fix minecraft font * Switch font out for non-monospaced. * Fix font proper * Some more world cleanup, handle play state, check quickplay compatibility * Clear the cached protocol version when a profile's game version is changed * Fix tint colors in navbar * Fix server protocol version pinging * UI fixes * Fix protocol version handler * Fix MOTD parsing * Add worlds_updated profile event * fix pkg * Functional home screen with worlds * lint * Fix incorrect folder creation * Make items clickable * Add locked field to SingleplayerWorld indicating whether the world is locked by the game * Implement locking frontend * Fix locking condition * Split worlds_updated profile event into servers_updated and world_updated * Fix compile error * Use port from resolve SRV record * Fix serialization of ProfilePayload and ProfilePayloadType * Individual singleplayer world refreshing * Log when worlds are perceived to be updated * Push logging + total refresh lock * Unlisten fixes * Highlight current world when clicked * Launcher logs refactor (#3444) * Switch live log to use STDOUT * fix clippy, legacy logs support * Fix lint * Handle non-XML log messages in XML logging, and don't escape log messages into XML --------- Co-authored-by: Josiah Glosson <soujournme@gmail.com> * Update incompatibility text * Home page fixes, and unlock after close * Remove logging * Add join log database migration * Switch server join timing to being in the database instead of in a separate log file * Create optimized get_recent_worlds function that takes in a limit * Update dependencies and fix Cargo.lock * temp disable overflow menus * revert home page changes * Enable overflow menus again * Remove list * Revert * Push dev tools * Remove default filter * Disable debug renderer * Fix random app errors * Refactor * Fix missing computed import * Fix light mode issues * Fix TS errors * Lint * Fix bad link in change modpack version modal * fix lint * fix intl --------- Co-authored-by: Josiah Glosson <soujournme@gmail.com> Co-authored-by: Jai A <jaiagr+gpg@pm.me> Co-authored-by: Jai Agrawal <18202329+Geometrically@users.noreply.github.com>
238 lines
4.2 KiB
SCSS
238 lines
4.2 KiB
SCSS
// Use border box on everything to preserve everyone's sanity
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
// Defaults
|
|
background-color: var(--color-bg);
|
|
color: var(--color-base);
|
|
--font-standard: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Roboto,
|
|
Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
|
--mono-font: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
|
|
font-family: var(--font-standard);
|
|
font-size: 16px;
|
|
font-weight: var(--font-weight-regular);
|
|
margin: 0;
|
|
padding: 0;
|
|
|
|
// Font Sizes
|
|
--font-size-xxs: 0.625rem; //10px
|
|
--font-size-xs: 0.75rem; //12px
|
|
--font-size-sm: 0.875rem; //14px
|
|
--font-size-nm: 1rem; //16px
|
|
--font-size-md: 1.125rem; //18px
|
|
--font-size-lg: 1.25rem; //20px
|
|
--font-size-xl: 1.5rem; //24px
|
|
--font-size-2xl: 2rem; //32px
|
|
--font-size-3xl: 3rem; //48px
|
|
|
|
// Font Weights
|
|
--font-weight-regular: 400;
|
|
--font-weight-medium: 500;
|
|
--font-weight-bold: 700;
|
|
--font-weight-extrabold: 800;
|
|
|
|
--font-weight-text: var(--font-weight-medium);
|
|
--font-weight-heading: var(--font-weight-extrabold);
|
|
--font-weight-title: var(--font-weight-extrabold);
|
|
}
|
|
|
|
a.uncolored {
|
|
color: inherit;
|
|
}
|
|
|
|
input[type='text'],
|
|
input[type='url'],
|
|
input[type='number'],
|
|
input[type='password'],
|
|
textarea,
|
|
.input-text-inherit,
|
|
.cm-content {
|
|
border-radius: var(--radius-md);
|
|
box-sizing: border-box;
|
|
// safari iOS rounds inputs by default
|
|
// set the appearance to none to prevent this
|
|
appearance: none !important;
|
|
background: var(--color-button-bg);
|
|
color: var(--color-base);
|
|
padding: 0.5rem 1rem;
|
|
font-weight: var(--font-weight-medium);
|
|
transition: box-shadow 0.1s ease-in-out;
|
|
min-height: 36px;
|
|
box-shadow:
|
|
var(--shadow-inset-sm),
|
|
0 0 0 0 transparent;
|
|
border: none;
|
|
outline: none;
|
|
|
|
&:focus,
|
|
&:focus-visible {
|
|
box-shadow:
|
|
inset 0 0 0 transparent,
|
|
0 0 0 0.25rem var(--color-brand-shadow);
|
|
color: var(--color-contrast);
|
|
outline: none;
|
|
}
|
|
|
|
&:disabled,
|
|
&[disabled] {
|
|
opacity: 0.6;
|
|
pointer-events: none;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
&:focus::placeholder {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
&::placeholder {
|
|
color: var(--color-base);
|
|
opacity: 0.6;
|
|
}
|
|
}
|
|
|
|
.cm-content {
|
|
white-space: pre-wrap !important;
|
|
}
|
|
|
|
input[type='number'] {
|
|
&::-webkit-inner-spin-button,
|
|
&::-webkit-outer-spin-button {
|
|
-webkit-appearance: none;
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
.dropdown-input {
|
|
display: flex;
|
|
flex-direction: row;
|
|
gap: 1px;
|
|
.animated-dropdown {
|
|
width: unset;
|
|
|
|
.selected {
|
|
border-radius: var(--radius-md) 0 0 var(--radius-md);
|
|
|
|
&.render-down {
|
|
border-radius: var(--radius-md) 0 0 0;
|
|
}
|
|
|
|
&.render-up {
|
|
border-radius: 0 0 0 var(--radius-md);
|
|
}
|
|
}
|
|
}
|
|
|
|
input {
|
|
border-radius: 0 var(--radius-md) var(--radius-md) 0;
|
|
}
|
|
}
|
|
|
|
.iconified-input {
|
|
align-items: center;
|
|
display: inline-flex;
|
|
position: relative;
|
|
|
|
input {
|
|
padding: 0 0.5rem 0 2.5rem;
|
|
width: 100%;
|
|
}
|
|
|
|
&:focus-within svg {
|
|
opacity: 1;
|
|
color: var(--color-contrast);
|
|
}
|
|
|
|
svg {
|
|
position: absolute;
|
|
left: 0.75rem;
|
|
height: 1.25rem;
|
|
width: 1.25rem;
|
|
z-index: 1;
|
|
|
|
color: var(--color-base);
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.r-btn {
|
|
@extend .transparent, .icon-only;
|
|
|
|
position: absolute;
|
|
right: 0.125rem;
|
|
z-index: 1;
|
|
|
|
svg {
|
|
position: relative;
|
|
left: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
svg {
|
|
height: 1em;
|
|
width: 1em;
|
|
}
|
|
|
|
.chart {
|
|
svg {
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.button-animation {
|
|
transition:
|
|
opacity 0.5s ease-in-out,
|
|
filter 0.2s ease-in-out,
|
|
transform 0.05s ease-in-out,
|
|
outline 0.2s ease-in-out;
|
|
|
|
&:active:not(&:disabled) {
|
|
transform: scale(0.95);
|
|
}
|
|
}
|
|
|
|
input,
|
|
button {
|
|
&:disabled {
|
|
cursor: not-allowed !important;
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion) {
|
|
.button-animation,
|
|
button {
|
|
transform: none !important;
|
|
}
|
|
}
|
|
|
|
input,
|
|
button {
|
|
&:disabled {
|
|
cursor: not-allowed !important;
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion) {
|
|
.button-animation,
|
|
button {
|
|
transform: none !important;
|
|
}
|
|
}
|
|
|
|
h1 {
|
|
color: var(--color-contrast);
|
|
}
|
|
|
|
h2 {
|
|
margin-top: 0;
|
|
margin-bottom: 1rem;
|
|
color: var(--color-contrast);
|
|
}
|
|
|
|
h3 {
|
|
margin-block: var(--gap-md) var(--gap-md);
|
|
color: var(--color-contrast);
|
|
}
|