Diamond-based UV photodetectors for high-temperature applications