add dialog draft code

adjust ui code