mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 23:27:54 -05:00
Added SVGs for add to studio modal
This commit is contained in:
parent
ab0ec0f10e
commit
6989fd4ecf
4 changed files with 35 additions and 13 deletions
|
@ -1,25 +1,17 @@
|
|||
// NOTE: next questions:
|
||||
// * what is the lifecycle of the getStudios etc. requests? Are they guaranteed to be there
|
||||
// on page load? Are they ever updated, e.g. after you join one?
|
||||
// * should we treat "waiting" to mean, user has requested the modal to be closed;
|
||||
|
||||
// design decisions:
|
||||
// * we should treat "waiting" to mean, user has requested the modal to be closed;
|
||||
// that is, if you click ok and it's waiting for responses, then you click x,
|
||||
// it closes and sets waiting to false?
|
||||
// then in the checkForOutstandingUpdates function, we close the window
|
||||
// iff waiting is true.
|
||||
// that avoids the situation where you close the window while a request is
|
||||
// outstanding, then reopen it only to have it instantly close on you.
|
||||
// * should the button to submit instantly? By clicking away shouldn't effectively undo what you thought you did.
|
||||
// * should it really be pinned on the page? Isn't that something you're trying to move away from?
|
||||
// * is it ok for me to make the spinner bigger and higher-radius-as-percent? (just for modal)
|
||||
// *
|
||||
// one way to go: no buttons at all.
|
||||
// maybe let kids toggle on and off like crazy, then when you click ok it submits?
|
||||
// *
|
||||
// plan:
|
||||
// * change joined to updateQueued = {[id]: {updateType: ['join':'leave']}, ...}
|
||||
// * also maintain second hash, joined = {[id]: true, ...}
|
||||
// in render, use joined to set color, and if queued, use spinner for icon.
|
||||
//
|
||||
// * keep the okay button, it sets up an overall spinner until everything is resolved
|
||||
// * but you can totally close the window regardless
|
||||
|
||||
// sample data:
|
||||
// this.studios = [{name: 'Funny games', id: 1}, {name: 'Silly ideas', id: 2}];
|
||||
|
|
10
static/svgs/modal/add.svg
Normal file
10
static/svgs/modal/add.svg
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>add</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="add" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<path d="M8.75,11.25 L6.25,11.25 C5.56,11.25 5,10.69125 5,10 C5,9.31 5.56,8.75 6.25,8.75 L8.75,8.75 L8.75,6.25 C8.75,5.56 9.31,5 10,5 C10.69125,5 11.25,5.56 11.25,6.25 L11.25,8.75 L13.75,8.75 C14.44125,8.75 15,9.31 15,10 C15,10.69125 14.44125,11.25 13.75,11.25 L11.25,11.25 L11.25,13.75 C11.25,14.44125 10.69125,15 10,15 C9.31,15 8.75,14.44125 8.75,13.75 L8.75,11.25 Z" fill="#FFFFFF"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 842 B |
10
static/svgs/modal/confirm.svg
Normal file
10
static/svgs/modal/confirm.svg
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>confirm</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="confirm" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<polyline id="Path-2" stroke="#FFFFFF" stroke-width="2.5" points="6 10 9 13 15 7"></polyline>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 598 B |
10
static/svgs/modal/spinner.svg
Normal file
10
static/svgs/modal/spinner.svg
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>spinner</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="spinner" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M15,10 C15,7.23857625 12.7614237,5 10,5 C7.23857625,5 5,7.23857625 5,10 C5,12.7614237 7.23857625,15 10,15" id="Oval-2" stroke="#FFFFFF" stroke-width="2.5"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 676 B |
Loading…
Reference in a new issue