A woman has won a 10-year legal battle which could see more than £10m pumped into repairing crumbling Whitby harbour.