Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RealtimeSyncOff and refactor interface of SyncMode #772

Merged
merged 12 commits into from
Apr 11, 2024
97 changes: 97 additions & 0 deletions public/quill-two-clients.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
.client-container {
display: flex;
}
.client-id {
padding: 2px 4px;
margin: 0 4px;
border-radius: 10px;
background-color: #eee;
}
.client-container .ql-toolbar {
margin-top: 10px;
}
.client-container .ql-container {
height: 300px;
}
#client-a,
#client-b {
width: 50%;
margin: 15px;
}

.online-clients {
margin: 1rem 0;
font-family: monospace;
}
.online-clients:before {
display: block;
margin-bottom: 4px;
content: 'online-clients: ';
}

/* sync mode option */
.syncmode-option {
margin: 30px 0 10px;
display: flex;
align-items: center;
}

.realtime-sync {
display: flex;
flex-direction: row;
position: relative;
border: 1px solid #ddd;
border-radius: 4px;
padding: 4px;
gap: 4px;
margin: 0 4px;
}

.realtime-sync-title {
position: absolute;
top: -14px;
left: 0;
font-size: 12px;
}

.option input[type='radio'] {
display: none;
}

.option label,
.option .manual-sync {
display: inline-block;
padding: 2px 6px;
border: 1px solid #ccc;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
}

.option label:hover {
background-color: #f0f0f0;
}

.option input[type='radio']:checked + label {
background-color: #007bff;
color: #fff;
}

.option .manual-sync {
display: none;
}

.option .manual-sync:hover {
background-color: #ddd;
}

.option input[type='radio']:checked + label + .manual-sync {
display: inline-block;
}

.ql-editor {
caret-color: transparent;
}
.ql-editor ::selection {
background: none;
}
Loading
Loading