Is it okay for me to power the arduino uno through the 5v pin, even if
its connected to other components? I've heard that powering through
the 5v pin is dangerous.
Powering through the 5V pin is 'dangerous' only because it relies on the external power supply having the correct voltage. An LM7805 is quite safe provided it is used correctly. Before connecting the Uno you should measure the output to make sure it is actually 5 V.
The main things to watch out for with the LM7805 are that the input filter capacitor is large enough (to avoid oscillation), the minimum input voltage is sufficient (>7V), and current draw and power dissipation are not excessive. Although it can put out a bit over 1 A peak the power loss will heat it up. If it gets too hot then it will shut down until it cools down. When powered by a 3S Lipo the input voltage could be as high as 12.6 V, so at 1A the power dissipation could be up to 12.6 V - 5 V * 1 A = 7.6 W. It would need a large heatsink to avoid overheating. However in your circuit the current draw should be less than 100 mA.
The Uno itself draws about 45 mA, and the L298 Logic supply draws 36 mA maximum, so provided the Uno isn't powering anything else the LM7805 only has to supply ~80 mA. Maximum power dissipation would be ~7.6 * 0.08 = ~0.6 W. Thermal resistance from junction to air (no heatsink) of the TO220 package is 65 °C/W, so the junction temperature would rise by about 0.6 * 65 = 39 °C. The shutdown temperature is 125 °C so it should be fine at normal room temperature.
If the motors draw high current then the battery voltage could be noisy, and might even dip below 7 V when they start up. To help isolate this noise from the regulator you could add a diode (eg. 1N4001) in series with the input, and use a large input filter capacitor (eg. 100 uF). The capacitor will provide current to the regulator during short battery voltage dips, preventing the output voltage from dropping low enough to reset or 'glitch' the Arduino. The diode also prevents damaging the LM7805 and Arduino if the battery is connected with reverse polarity. The Uno's internal regulator circuit uses this technique.