10000 PLAT-84501: Settings App - figure out how we will do routing by sugardave · Pull Request #113 · enactjs/agate · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PLAT-84501: Settings App - figure out how we will do routing #113

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
278 changes: 183 additions & 95 deletions Icon/IconList.js
E9D3
Original file line number Diff line number Diff line change
Expand Up @@ -4,105 +4,193 @@
export default {
plus : 0x0002B, // plus
minus : 0x0002D, // hyphen
arrowhookleft : 0x021A9, // LeftArrowHook
arrowhookright : 0x021AA, // RightArrowHook
arrowup : 0x02191, // arrowup
arrowdown : 0x02193, // arrowdown
ellipsis : 0x022EF, // ellipsis
check : 0x02713, // checkmark
circle : 0x0EFFDB, // record
stop : 0x0EFFDC, // stop
play : 0x0EFFDD, // play
pause : 0x0EFFDE, // pause
forward : 0x0EFFDF, // forward
backward : 0x0EFFE0, // rewind
skipforward : 0x0EFFE1, // skip_forward
skipbackward : 0x0EFFE2, // skip_backwards
pauseforward : 0x0EFFE3, // indicator_forward
pausebackward : 0x0EFFE4, // indicator_backward
pausejumpforward : 0x0EFFE5, // indicator_skip_forward
pausejumpbackward : 0x0EFFE6, // indicator_skip_backward
jumpforward : 0x0EFFE7, // indicator_end
jumpbackward : 0x0EFFE8, // indicator_begin
denselist : 0x0EFFE9, // list_big
bulletlist : 0x0EFFEA, // list_bullets
list : 0x0EFFEB, // list_simple
drawer : 0x0EFFEC, // list_actions
arrowlargedown : 0x0EFFED, // caret_down_large
arrowlargeup : 0x0EFFEE, // caret_up_large
arrowlargeleft : 0x0EFFEF, // caret_left_large
arrowlargeright : 0x0EFFF0, // caret_right_large
arrowsmallup : 0x0EFFF1, // caret_up_small
arrowsmalldown : 0x0EFFF2, // caret_down_small
arrowsmallleft : 0x0EFFF3, // caret_left_small
arrowsmallright : 0x0EFFF4, // caret_right_small
closex : 0x0EFFF5, // close_x
search : 0x0EFFF6, // magnify
rollforward : 0x0EFFF7, // redo
rollbackward : 0x0EFFF8, // undo
exitfullscreen : 0x0EFFF9, // minimize
fullscreen : 0x0EFFFA, // maximize
arrowshrinkleft : 0x0EFFFB, // shrink_panel_left
arrowshrinkright : 0x0EFFFC, // shrink_panel_right
arrowextend : 0x0F0021, // arrow_left
arrowshrink : 0x0F0022, // arrow_right
flag : 0x0F0023, // flag
funnel : 0x0F0024, // filter
trash : 0x0F0025, // trash
star : 0x0F0028, // star_full
hollowstar : 0x0F0029, // star_empty
halfstar : 0x0F002A, // star_half
gear : 0x0F002B, // gear
plug : 0x0F002C, // input
lock : 0x0F002D, // lock
forward15 : 0x0F0041, // forward15
back15 : 0x0F0042, // back15
continousplay : 0x0F0043, // continous_play
playlist : 0x0F0044, // playlist
resumeplay : 0x0F0045, // resume_play
image : 0x0F0046, // image
audio : 0x0F0061, // audio
music : 0x0F0062, // music
languages : 0x0F0081, // languages
cc : 0x0F0082, // cc
ccon : 0x0F0083, // cc_on
ccoff : 0x0F0084, // cc_off
sub : 0x0F0085, // sub
recordings : 0x0F00A1, // recordings
livezoom : 0x0F00A2, // live_zoom
liveplayback : 0x0F00A3, // live_playback
liveplaybackoff : 0x0F00A4, // live_playback_off
repeat : 0x0F00A5, // repeat
repeatoff : 0x0F00A6, // repeat_off
series : 0x0F00A7, // series
repeatdownload : 0x0F00A8, // repeat_download
view360 : 0x0F00A9, // view_360
view360off : 0x0F00AA, // view_360_off
info : 0x0F00AB, // info
airdown : 0x0F00B5, // air_down
airright : 0x0F00B6, // air_right
airup : 0x0F00B7, // air_up
heatseatleft : 0x0F00B8, // seat_heat_left
heatseatright : 0x0F00B9, // seat_heat_right
aircirculation : 0x0F00BA, // air_circulation
fan : 0x0F00BB, // fan
defrosterfront : 0x0F00BC, // defroster_front
defrosterback : 0x0F00BD, // defroster_back
user : 0x0F00BE, // users
home : 0x0F00BF, // home
temperature : 0x0F00C0, // temperature_icon
compass : 0x0F00C1, // compass
phone : 0x0F00C2, // phone
fanoff : 0x0F00C9, // fan_off
bluetooth : 0x0F00CA, // bluetooth
datetime : 0x0F00CB, // date_time
display : 0x0F00CC, // display
seatbelt : 0x0F00CD, // seat_belt
wifi : 0x0F00CE, // wifi
apps : 0x0F00CF, // apps
climate : 0x0F00D0, // climate
dashboard : 0x0F00D1, // dashboard
edit : 0x0F00D2, // edit
expand : 0x0F00D3, // expand
radio : 0x0F00D4, // radio
rearscreen : 0x0F00D5, // rear_screen
weather : 0x0F00D6 // weather
closex : 0x0EFFF5, // close
search : 0x0EFFF6, // search
bright1 : 0x0F000C, // bright01
bright2 : 0x0F000D, // bright02
bluetooth : 0x0F000E, // bluetooth
usb : 0x0F000F, // usb
volume0 : 0x0F0010, // volume00
volume1 : 0x0F0011, // volume01
volume2 : 0x0F0012, // volume02
wifi : 0x0F0013, // wifi
happyface : 0x0F0014, // happyface
notification : 0x0F0015, // notification
pairing : 0x0F0016, // pairing
user : 0x0F0017, // user
calendar : 0x0F0018, // calendar
edit : 0x0F0019, // edit
gallery : 0x0F001A, // gallery
internet : 0x0F001B, // internet
map : 0x0F001C, // map
music : 0x0F001D, // music
video : 0x0F001E, // video
circle : 0x0F001F, // circle
setting : 0x0F002B, // setting
accept : 0x0F0036, // accept
decline : 0x0F0037, // decline
stop : 0x0F0038, // stop
cancel : 0x0F0039, // cancel
carspeaker : 0x0F003A, // carspeaker
speaker : 0x0F003B, // speaker
earphone : 0x0F003C, // earphone
detail : 0x0F003D, // detail
install : 0x0F003E, // install
send : 0x0F003F, // send
netbook : 0x0F0040, // netbook
pad : 0x0F0041, // pad
mobile : 0x0F0042, // mobile
rain : 0x0F0060, // rain
profileA1 : 0x0F008A, // profileA1
profileA2 : 0x0F008B, // profileA2
profileA3 : 0x0F008C, // profileA3
profileA4 : 0x0F008D, // profileA4
profileB1 : 0x0F008E, // profileB1
profileB2 : 0x0F008F, // profileB2
profileB3 : 0x0F0090, // profileB3
profileB4 : 0x0F0091, // profileB4
profileC1 : 0x0F0092, // profileC1
profileC2 : 0x0F0093, // profileC2
profileC3 : 0x0F0094, // profileC3
profileC4 : 0x0F0095, // profileC4
airdown : 0x0F00B5, // air_down
airright : 0x0F00B6, // air_right
airup : 0x0F00B7, // air_up
heatseatleft : 0x0F00B8, // seat_heat_left
heatseatright : 0x0F00B9, // seat_heat_right
aircirculation : 0x0F00BA, // air_circulation
fan : 0x0F00BB, // fan
defrosterfront : 0x0F00BC, // defroster_front
defrosterback : 0x0F00BD, // defroster_back
home : 0x0F00BF, // home
temperature : 0x0F00C0, // temperature_icon
compass : 0x0F00C1, // compass
phone : 0x0F00C2, // phone
fanoff : 0x0F00C9, // fan_off
datetime : 0x0F00CB, // date_time
display : 0x0F00CC, // display
seatbelt : 0x0F00CD, // seat_belt
apps : 0x0F00CF, // apps
climate : 0x0F00D0, // climate
dashboard : 0x0F00D1, // dashboard
expand : 0x0F00D3, // expand
radio : 0x0F00D4, // radio
rearscreen : 0x0F00D5, // rear_screen
weather : 0x0F00D6 // weather
};

// Deprecated icon list from `Moonstone-Agate.ttf` for reference

// export default {
// plus : 0x0002B, // plus
// minus : 0x0002D, // hyphen
// arrowhookleft : 0x021A9, // LeftArrowHook
// arrowhookright : 0x021AA, // RightArrowHook
// ellipsis : 0x022EF, // ellipsis
// check : 0x02713, // checkmark
// circle : 0x0EFFDB, // record
// stop : 0x0EFFDC, // stop
// play : 0x0EFFDD, // play
// pause : 0x0EFFDE, // pause
// forward : 0x0EFFDF, // forward
// backward : 0x0EFFE0, // rewind
// skipforward : 0x0EFFE1, // skip_forward
// skipbackward : 0x0EFFE2, // skip_backwards
// pauseforward : 0x0EFFE3, // indicator_forward
// pausebackward : 0x0EFFE4, // indicator_backward
// pausejumpforward : 0x0EFFE5, // indicator_skip_forward
// pausejumpbackward : 0x0EFFE6, // indicator_skip_backward
// jumpforward : 0x0EFFE7, // indicator_end
// jumpbackward : 0x0EFFE8, // indicator_begin
// denselist : 0x0EFFE9, // list_big
// bulletlist : 0x0EFFEA, // list_bullets
// list : 0x0EFFEB, // list_simple
// drawer : 0x0EFFEC, // list_actions
// arrowlargedown : 0x0EFFED, // caret_down_large
// arrowlargeup : 0x0EFFEE, // caret_up_large
// arrowlargeleft : 0x0EFFEF, // caret_left_large
// arrowlargeright : 0x0EFFF0, // caret_right_large
// arrowsmallup : 0x0EFFF1, // caret_up_small
// arrowsmalldown : 0x0EFFF2, // caret_down_small
// arrowsmallleft : 0x0EFFF3, // caret_left_small
// arrowsmallright : 0x0EFFF4, // caret_right_small
// closex : 0x0EFFF5, // close_x
// search : 0x0EFFF6, // magnify
// rollforward : 0x0EFFF7, // redo
// rollbackward : 0x0EFFF8, // undo
// exitfullscreen : 0x0EFFF9, // minimize
// fullscreen : 0x0EFFFA, // maximize
// arrowshrinkleft : 0x0EFFFB, // shrink_panel_left
// arrowshrinkright : 0x0EFFFC, // shrink_panel_right
// arrowextend : 0x0F0021, // arrow_left
// arrowshrink : 0x0F0022, // arrow_right
// flag : 0x0F0023, // flag
// funnel : 0x0F0024, // filter
// trash : 0x0F0025, // trash
// star : 0x0F0028, // star_full
// hollowstar : 0x0F0029, // star_empty
// halfstar : 0x0F002A, // star_half
// gear : 0x0F002B, // gear
// plug : 0x0F002C, // input
// lock : 0x0F002D, // lock
// forward15 : 0x0F0041, // forward15
// back15 : 0x0F0042, // back15
// continousplay : 0x0F0043, // continous_play
// playlist : 0x0F0044, // playlist
// resumeplay : 0x0F0045, // resume_play
// image : 0x0F0046, // image
// audio : 0x0F0061, // audio
// music : 0x0F0062, // music
// languages : 0x0F0081, // languages
// cc : 0x0F0082, // cc
// ccon : 0x0F0083, // cc_on
// ccoff : 0x0F0084, // cc_off
// sub : 0x0F0085, // sub
// recordings : 0x0F00A1, // recordings
// livezoom : 0x0F00A2, // live_zoom
// liveplayback : 0x0F00A3, // live_playback
// liveplaybackoff : 0x0F00A4, // live_playback_off
// repeat : 0x0F00A5, // repeat
// repeatoff : 0x0F00A6, // repeat_off
// series : 0x0F00A7, // series
// repeatdownload : 0x0F00A8, // repeat_download
// view360 : 0x0F00A9, // view_360
// view360off : 0x0F00AA, // view_360_off
// info : 0x0F00AB, // info
// airdown : 0x0F00B5, // air_down
// airright : 0x0F00B6, // air_right
// airup : 0x0F00B7, // air_up
// heatseatleft : 0x0F00B8, // seat_heat_left
// heatseatright : 0x0F00B9, // seat_heat_right
// aircirculation : 0x0F00BA, // air_circulation
// fan : 0x0F00BB, // fan
// defrosterfront : 0x0F00BC, // defroster_front
// defrosterback : 0x0F00BD, // defroster_back
// user : 0x0F00BE, // users
// home : 0x0F00BF, // home
// temperature : 0x0F00C0, // temperature_icon
// compass : 0x0F00C1, // compass
// phone : 0x0F00C2, // phone
// fanoff : 0x0F00C9, // fan_off
// bluetooth : 0x0F00CA, // bluetooth
// datetime : 0x0F00CB, // date_time
// display : 0x0F00CC, // display
// seatbelt : 0x0F00CD, // seat_belt
// wifi : 0x0F00CE, // wifi
// apps : 0x0F00CF, // apps
// climate : 0x0F00D0, // climate
// dashboard : 0x0F00D1, // dashboard
// edit : 0x0F00D2, // edit
// expand : 0x0F00D3, // expand
// radio : 0x0F00D4, // radio
// rearscreen : 0x0F00D5, // rear_screen
// weather : 0x0F00D6 // weather
// };
49 changes: 49 additions & 0 deletions Panels/CancelDecorator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import hoc from '@enact/core/hoc';
import Cancelable from '@enact/ui/Cancelable';
import Spotlight from '@enact/spotlight';

const defaultConfig = {
cancel: null
};

const CancelDecorator = hoc(defaultConfig, (config, Wrapped) => {
const {cancel} = config;

function handleCancel (ev, props) {
const {index, [cancel]: handler, path} = props;
const event = {};

if (index > 0 || (path && path.length > 1) && handler) {
// clear Spotlight focus
const current = Spotlight.getCurrent();
if (current) {
current.blur();
}

if (path) {
// this is a RoutablePanels
event.path = path;
if (Array.isArray(event.path)) {
event.path.pop();
} else {
event.path = event.path.split('/').slice(0, -1).join('/');
}
} else {
// this is a Panels
event.index = index - 1;
}

handler(event);

ev.stopPropagation();
}
}

return Cancelable(
{modal: true, onCancel: handleCancel},
Wrapped
);
});

export default CancelDecorator;
export {CancelDecorator};
Loading
0