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

Beginning of Settings Page #406

Open
wants to merge 55 commits into
base: server
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
cb83129
make a ui
jonrossca Jul 12, 2016
af2fc9c
Merge branch 'server' into ui
jonrossca Jul 12, 2016
4fc89b6
rawr irc
jonrossca Jul 12, 2016
b179782
focus passing and enter commits
jonrossca Jul 12, 2016
cd99d00
beginning to style forms
jonrossca Jul 13, 2016
243f6a5
submit on enter, styling forms
jonrossca Jul 13, 2016
96918c4
start building server/channel panel
jonrossca Jul 13, 2016
259b78d
testing
jonrossca Jul 13, 2016
7a15ac0
merge
jonrossca Jul 13, 2016
038b9fb
fixing merge
jonrossca Jul 13, 2016
9c5304f
jump to main if connected
jonrossca Jul 13, 2016
f548430
checkpoint
jonrossca Jul 13, 2016
a65fba6
Merge branch 'server' into ui
jonrossca Jul 13, 2016
2f91c37
fix for host
jonrossca Jul 13, 2016
3c0af83
Merge branch 'server' into ui
jonrossca Jul 13, 2016
361cf15
update list to handle new client state format
jonrossca Jul 13, 2016
1ccf340
add channels as they are joined
jonrossca Jul 13, 2016
4d6b5bf
fix list creation
jonrossca Jul 13, 2016
94a1d84
set spot to trigger channel changes
jonrossca Jul 13, 2016
c088813
Merge branch 'server' of github.com:flackr/circ into server
jonrossca Jul 13, 2016
0f21838
working left side
jonrossca Jul 14, 2016
8d04a48
cleanup of testing styles
jonrossca Jul 14, 2016
b342247
update the UI
jonrossca Jul 14, 2016
f5a459a
spacing
jonrossca Jul 14, 2016
2a3b5b7
dismiss side on selection
jonrossca Jul 14, 2016
26987ad
update style of disbaled buttons
jonrossca Jul 14, 2016
8df6795
Merge branch 'server' of github.com:flackr/circ into server
jonrossca Jul 14, 2016
97c0d45
Merge remote-tracking branch 'origin/server' into ui
jonrossca Jul 14, 2016
bbfa502
show incoming messages
jonrossca Jul 14, 2016
84cc30a
Merge branch 'server' of github.com:flackr/circ into server
jonrossca Jul 14, 2016
8f814f2
Merge remote-tracking branch 'origin/server' into ui
jonrossca Jul 14, 2016
363a9f7
missing js file
jonrossca Jul 14, 2016
149ae65
load channel events
jonrossca Jul 14, 2016
f83c716
fix merge
jonrossca Jul 14, 2016
876f704
messages can now be styled
jonrossca Jul 14, 2016
611effd
remove old message parsing
jonrossca Jul 14, 2016
d9443a0
setup for settings and other functions
jonrossca Jul 14, 2016
cdf528b
launch server screen from side panel:
jonrossca Jul 14, 2016
39b593d
server dialog hooked up
jonrossca Jul 14, 2016
4627e5c
Merge remote-tracking branch 'origin/server' into ui
jonrossca Jul 14, 2016
35a07fc
update creation logic for room list
jonrossca Jul 14, 2016
711a1f4
Merge branch 'server' of github.com:flackr/circ into server
jonrossca Jul 14, 2016
9b13531
Merge branch 'server' into ui
jonrossca Jul 14, 2016
f42aca0
history of input
jonrossca Jul 15, 2016
6be3c6e
change creation of pages to prevent duplication
jonrossca Jul 15, 2016
c6d5df5
minor graphics tweaks
jonrossca Jul 15, 2016
7a820ac
redo connect buttons
jonrossca Jul 15, 2016
028f55b
vertically align headers
jonrossca Jul 15, 2016
f4b0625
fix merge
jonrossca Jul 15, 2016
166edae
fix see through settings
jonrossca Jul 15, 2016
997a61a
stop using visibility instead of display. also address code review
jonrossca Jul 15, 2016
3077f43
fix tabs
jonrossca Jul 15, 2016
39bef96
initial settings work, first toggle button
jonrossca Jul 15, 2016
5d30aeb
Merge remote-tracking branch 'origin/server' into ui
jonrossca Jul 15, 2016
d244c7d
set background on new settings page
jonrossca Jul 15, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 68 additions & 4 deletions client/css/client.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
:root {
--primary-color: #5E35B1;
--secondary-color: #311B92;
--accent-color: #FFFF00;
--accent-color-secondary: #FFFF8D;
--accent-color: #69F0AE;
--accent-color-secondary: #00C853;
--main-bg-color: #FAFAFA;
--text-color: rgba(0,0,0,.87);
--secondary-text-color: rgba(0,0,0,.7);
--light-text-color: #FFFFFF;
--light-text-color-disabled: rgba(1,1,1,.38);
--hover-color: #EEEEEE;
--toggle-deactive-primary: #BDBDBD;
--toggle-deactive-secondary: #E0E0E0;
}

.material-icons.md-light { color: rgba(255, 255, 255, 1); }
Expand Down Expand Up @@ -68,6 +70,63 @@ html, body {
transform: translateY(-50%);
}

/* Rounded sliders */
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}

.switch input {display:none;}

.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--toggle-deactive-secondary);
-webkit-transition: .4s;
transition: .4s;
}

.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background: var(--toggle-deactive-primary);
-webkit-transition: .4s;
transition: .4s;
}

input:checked + .slider {
background-color: var(--accent-color-secondary);
}

input:focus + .slider {
box-shadow: 0 0 1px var(--secondary-color);
}

input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
background-color: var(--accent-color);
}

.slider.round {
border-radius: 34px;
}

.slider.round:before {
border-radius: 50%;
}

/* Main Content */

.main_container {
Expand Down Expand Up @@ -171,6 +230,13 @@ html, body {
display: none;
}

.settings_main {
display: none;
height: 100%;
width: 100%;
background: var(--main-bg-color);
}

/* Right Side User List Panel */

.nick_panel {
Expand Down Expand Up @@ -327,7 +393,5 @@ html, body {

.permanent_items {
background: var(--main-bg-color);
/*bottom: 0;
position: absolute;*/
width: 100%;
}
18 changes: 18 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,24 @@
</aside>

<div class="settings_container">
<div class="settings_main">
<div class="header horizontal_row">
<button class="material-icons md-light header__menu-toggle">arrow_back</button>
<div class="header_title">
Settings
</div>
</div>
<div class="horizontal_row">
<label for="">Notifications</label>
<label class="switch">
<input type="checkbox" checked>
<div class="slider round"></div>
</label>
</div>
<div>
Logout
</div>
</div>
<div class="host_connection">
<div class="header">
<div class="vertical_center_text">Host Connection:</div>
Expand Down
23 changes: 23 additions & 0 deletions client/js/client-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,16 @@ constructor () {
this.supportsPassive = undefined;
this.addEventListeners();

document.querySelector('.settings_launcher').addEventListener('click', this.launchSettings.bind(this));
document.querySelector('.join_server').addEventListener('click', this.joinServer.bind(this));
}

launchSettings() {
this.hideSideNav();
document.querySelector('.settings_container').style.display = "block";
document.querySelector('.settings_main').style.display = "block";
}

joinServer() {
this.hideSideNav();
server_connection_screen.show();
Expand Down Expand Up @@ -310,6 +317,8 @@ class BaseUI {
} else {
this.input_index = this.input_history.length;
}
//TODO parse irc commands here
this.client.send(hostId, serverName, text);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it will send the raw text, as well as parse the IRC command (lines 324-325). I think maybe this is a bad merge and these lines should be removed.

elem.value = '';
// TODO(flackr): Only call this when we switch channels.
this.commandHandler.setActiveChannel(hostId, serverName, room_list.current_channel);
Expand Down Expand Up @@ -435,6 +444,20 @@ class RoomList {
}
}

class SettingsScreen {
constructor() {
this.elem = document.querySelector('.settings_main');
this.elem.querySelector('.header__menu-toggle').addEventListener('click',this.close.bind(this));
}

close() {
this.elem.display = "none";
transitionToMainUI();
}
}

new SettingsScreen();

var server_connection_screen = new ServerConnection(document.querySelector('.server_connection'));
var room_list = new RoomList(document.querySelector('.rooms'));

Expand Down