From a0363e11e38a25ab015f72ea9895c58219f049f0 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 22 Jul 2021 12:57:57 +0200 Subject: project name edit --- components/icons.tsx | 10 ++++++++++ pages/editor.tsx | 20 ++++++++++++++++++++ styles/editor.css | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) diff --git a/components/icons.tsx b/components/icons.tsx index 15632f0..5e06bf8 100644 --- a/components/icons.tsx +++ b/components/icons.tsx @@ -266,3 +266,13 @@ export function BracketsRoundedIcon() { /> ; } + +export function SlashIconRounded() { + return + + ; +} diff --git a/pages/editor.tsx b/pages/editor.tsx index 02c69f0..c7835c8 100644 --- a/pages/editor.tsx +++ b/pages/editor.tsx @@ -12,6 +12,7 @@ import { FullScreenControlsRoundedIcon, MenuBarControlsRoundedIcon, PressureIcon, + SlashIconRounded, SlideKeyframe, } from '../components/icons'; import KeybindSelector from '../components/keybindselector'; @@ -55,6 +56,7 @@ import AddRoundedIcon from '@material-ui/icons/AddRounded'; import ArrowDropDownRoundedIcon from '@material-ui/icons/ArrowDropDownRounded'; import CloseIcon from '@material-ui/icons/Close'; import FullscreenRoundedIcon from '@material-ui/icons/FullscreenRounded'; +import KeyboardArrowDownRoundedIcon from '@material-ui/icons/KeyboardArrowDownRounded'; import NavigateBeforeRoundedIcon from '@material-ui/icons/NavigateBeforeRounded'; import NavigateNextRoundedIcon from '@material-ui/icons/NavigateNextRounded'; import SettingsRoundedIcon from '@material-ui/icons/SettingsRounded'; @@ -1532,10 +1534,28 @@ function Player() { } function TitleBar() { + var ready = useHookstate(global).ready; + var proj = useHookstate(project).timeline; + + var nameRef = useRef(null); + return

pressure

+
+ My presentations + + proj.name.set((nameRef.current as HTMLSpanElement).textContent.trim())} + children={proj.name.get()} + /> + +
; } diff --git a/styles/editor.css b/styles/editor.css index d1e5e00..8e0db4a 100644 --- a/styles/editor.css +++ b/styles/editor.css @@ -493,3 +493,38 @@ transition-duration: 0ms; opacity: 1; } + +header .projarea .projfolder { + color: var(--c700); +} + +header .projarea { + line-height: 0; + height: 24px; + transition-property: opacity; + transition-duration: 150ms; +} + +header .projarea.disabled { + opacity: 0; +} + +header .projarea > * { + vertical-align: middle; +} + +header .projarea .projname { + transition-property: background-color; + transition-duration: 150ms; +} + +header .projarea .projname:focus { + background-color: var(--c100); + outline: none; +} + +header .projarea span { + padding: 2px 4px; + margin: -2px -4px; + border-radius: 6px; +} -- cgit v1.2.3