v1 finished
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<div class="text-4xl mb-10">
|
||||
Network Machines
|
||||
</div>
|
||||
<% unless @is_readonly %>
|
||||
<% unless @editing %>
|
||||
<div class="w-2/3 flex flex-none items-center justify-between ml-5 mb-2">
|
||||
<div class="flex-none text-xl text-[#2FD400]">Edit</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#2FD400]"></div>
|
||||
<div class="flex-none text-xl text-[#<%= @accent_hex %>]">Edit</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#<%= @accent_hex %>]"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex flex-col ml-10 space-y-2">
|
||||
@@ -16,49 +16,49 @@
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="mach_<%= index %>_name"
|
||||
name="machines[][name]"
|
||||
value="<%= mach.name %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @machines.length - 1 %>
|
||||
<div class="text-[#2FD400]">Name</div>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Name</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="mach_<%= index %>_domain"
|
||||
name="machines[][domain]"
|
||||
value="<%= mach.domain %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @machines.length - 1 %>
|
||||
<div class="text-[#2FD400]">Domain</div>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Domain</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="mach_<%= index %>_local_ip_octet"
|
||||
name="machines[][local_ip_octet]"
|
||||
value="<%= mach.local_ip_octet %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @machines.length - 1 %>
|
||||
<div class="text-[#2FD400]">Local IP Octet</div>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Local IP Octet</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="mach_<%= index %>_tailscale_ip"
|
||||
name="machines[][tailscale_ip]"
|
||||
value="<%= mach.tailscale_ip %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @machines.length - 1 %>
|
||||
<div class="text-[#2FD400]">Tailscale IP</div>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Tailscale IP</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,65 +67,68 @@
|
||||
|
||||
|
||||
<div class="flex flex-col space-y-2 mt-10">
|
||||
<% if @is_readonly %>
|
||||
<div class="w-2/3 flex justify-end space-x-5">
|
||||
<a href="/admin/machines/edit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<% if @editing %>
|
||||
<div class="w-2/3 flex ml-10 space-x-5">
|
||||
<a href="/admin/machines/edit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Edit/Add Machines
|
||||
</a>
|
||||
<a href="/admin" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Back To Admin
|
||||
</a>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="w-2/3 flex flex-none items-center justify-between ml-5 mb-2">
|
||||
<div class="flex-none text-xl text-[#2FD400]">New</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#2FD400]"></div>
|
||||
<div class="flex-none text-xl text-[#<%= @accent_hex %>]">New</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#<%= @accent_hex %>]"></div>
|
||||
</div>
|
||||
<div class="flex space-x-2 mb-10 ml-10">
|
||||
<input type="hidden" name="machines[][id]" value="">
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="mach_new_name"
|
||||
name="machines[][name]"
|
||||
value=""
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<label for="mach_new_name" class="text-[#2FD400]">Name</label>
|
||||
<%= 'readonly' if @editing %> >
|
||||
<label for="mach_new_name" class="text-[#<%= @accent_hex %>]">Name</label>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="mach_new_domain"
|
||||
name="machines[][domain]"
|
||||
value=""
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<label for="mach_new_domain" class="text-[#2FD400]">Domain</label>
|
||||
<%= 'readonly' if @editing %> >
|
||||
<label for="mach_new_domain" class="text-[#<%= @accent_hex %>]">Domain</label>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="mach_new_local_ip_octet"
|
||||
name="machines[][local_ip_octet]"
|
||||
value=""
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<label for="mach_new_local_ip_octet" class="text-[#2FD400]">Local IP Octet</label>
|
||||
<%= 'readonly' if @editing %> >
|
||||
<label for="mach_new_local_ip_octet" class="text-[#<%= @accent_hex %>]">Local IP Octet</label>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="mach_new_tailscale_ip"
|
||||
name="machines[][tailscale_ip]"
|
||||
value=""
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<label for="mach_new_tailscale_ip" class="text-[#2FD400]">Tailscale IP</label>
|
||||
<%= 'readonly' if @editing %> >
|
||||
<label for="mach_new_tailscale_ip" class="text-[#<%= @accent_hex %>]">Tailscale IP</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-2/3 flex justify-end space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<div class="w-2/3 flex ml-10 space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Save Machines
|
||||
</button>
|
||||
<a href="/admin/machines" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#140029] hover:border-[#F80800] transition-colors duration-200">
|
||||
<a href="/admin/machines" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Cancel
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user