mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-13 11:46:51 +00:00
fixed
This commit is contained in:
@@ -95,14 +95,36 @@ export class FlagInputModal extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static styles = css`
|
static styles = css`
|
||||||
@media (max-width: 768px) {
|
:host {
|
||||||
.flag-modal {
|
display: flex;
|
||||||
width: 80vw;
|
flex-direction: column;
|
||||||
}
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-item {
|
.flag-modal {
|
||||||
width: calc(100% / 3 - 15px);
|
display: flex;
|
||||||
}
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
|
flex-grow: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-col {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overflow-hidden {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overflow-y-auto {
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -235,6 +257,7 @@ export class FlagInputModal extends LitElement {
|
|||||||
widthRatio="0.8"
|
widthRatio="0.8"
|
||||||
heightRatio="0.75"
|
heightRatio="0.75"
|
||||||
disableScroll="true"
|
disableScroll="true"
|
||||||
|
special="true"
|
||||||
>
|
>
|
||||||
<!-- tab -->
|
<!-- tab -->
|
||||||
<div class="flex gap-2 mb-2">
|
<div class="flex gap-2 mb-2">
|
||||||
@@ -364,7 +387,7 @@ ${colorClass}"
|
|||||||
: null}
|
: null}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="grid grid-cols-2 gap-2 w-full max-h-[500px] overflow-y-auto pr-1 mb-2"
|
class="grid grid-cols-2 gap-2 w-full overflow-y-auto pr-1 mb-2"
|
||||||
>
|
>
|
||||||
${Object.entries(FlagMap)
|
${Object.entries(FlagMap)
|
||||||
.filter(([name]) => name !== "frame" && name !== "full")
|
.filter(([name]) => name !== "frame" && name !== "full")
|
||||||
@@ -507,7 +530,7 @@ mask: url(${src}) center / contain no-repeat;
|
|||||||
${translateText("flag_input.apply")}
|
${translateText("flag_input.apply")}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="mt-4 w-full max-h-[500px] overflow-y-auto mb-2">
|
<div class="mt-4 w-full overflow-y-auto mb-2">
|
||||||
<!-- Code input and copy -->
|
<!-- Code input and copy -->
|
||||||
<div class="mt-2 w-full space-y-2">
|
<div class="mt-2 w-full space-y-2">
|
||||||
${this.errorMessage
|
${this.errorMessage
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export class OModal extends LitElement {
|
|||||||
@property({ type: Number }) widthRatio?: number;
|
@property({ type: Number }) widthRatio?: number;
|
||||||
@property({ type: Number }) heightRatio?: number;
|
@property({ type: Number }) heightRatio?: number;
|
||||||
@property({ type: Boolean }) disableScroll = false;
|
@property({ type: Boolean }) disableScroll = false;
|
||||||
|
@property({ type: Boolean }) special = false;
|
||||||
|
|
||||||
static styles = css`
|
static styles = css`
|
||||||
.c-modal {
|
.c-modal {
|
||||||
@@ -34,6 +35,16 @@ export class OModal extends LitElement {
|
|||||||
max-width: 860px;
|
max-width: 860px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.c-modal__wrapper__special {
|
||||||
|
background: #23232382;
|
||||||
|
border-radius: 8px;
|
||||||
|
min-width: 340px;
|
||||||
|
max-width: 860px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.c-modal__header {
|
.c-modal__header {
|
||||||
position: relative;
|
position: relative;
|
||||||
border-top-left-radius: 4px;
|
border-top-left-radius: 4px;
|
||||||
@@ -60,6 +71,16 @@ export class OModal extends LitElement {
|
|||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
backdrop-filter: blur(8px);
|
backdrop-filter: blur(8px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.c-modal__content__special {
|
||||||
|
position: relative;
|
||||||
|
color: #fff;
|
||||||
|
padding: 1.4rem;
|
||||||
|
flex-grow: 1;
|
||||||
|
max-height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
backdrop-filter: blur(8px);
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
public open() {
|
public open() {
|
||||||
this.isModalOpen = true;
|
this.isModalOpen = true;
|
||||||
@@ -78,7 +99,7 @@ export class OModal extends LitElement {
|
|||||||
? html`
|
? html`
|
||||||
<aside class="c-modal">
|
<aside class="c-modal">
|
||||||
<div
|
<div
|
||||||
class="c-modal__wrapper"
|
class="c-modal__wrapper${this.special ? "__special" : ""}"
|
||||||
style=${`width: ${this.widthRatio ? this.widthRatio * 100 + "vw" : "auto"}; height: ${this.heightRatio ? this.heightRatio * 100 + "vh" : "auto"};`}
|
style=${`width: ${this.widthRatio ? this.widthRatio * 100 + "vw" : "auto"}; height: ${this.heightRatio ? this.heightRatio * 100 + "vh" : "auto"};`}
|
||||||
>
|
>
|
||||||
<header class="c-modal__header">
|
<header class="c-modal__header">
|
||||||
@@ -88,12 +109,8 @@ export class OModal extends LitElement {
|
|||||||
<div class="c-modal__close" @click=${this.close}>X</div>
|
<div class="c-modal__close" @click=${this.close}>X</div>
|
||||||
</header>
|
</header>
|
||||||
<section
|
<section
|
||||||
class="c-modal__content"
|
class="c-modal__content${this.special ? "__special" : ""}"
|
||||||
style=${`${
|
style=${`${this.disableScroll ? "overflow: hidden;" : ""}`}
|
||||||
this.heightRatio
|
|
||||||
? `height: calc(${this.heightRatio * 100}vh - 4rem);`
|
|
||||||
: ""
|
|
||||||
} ${this.disableScroll ? "overflow: hidden;" : ""}`}
|
|
||||||
>
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user