update layout control vm
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
@props(['invoice'])
|
||||
|
||||
<flux:modal name="change-ip" class="md:w-[28rem]">
|
||||
<div class="space-y-6">
|
||||
<div>
|
||||
<flux:heading size="lg">{{ __('Đổi địa chỉ IP') }}</flux:heading>
|
||||
<flux:text class="mt-2">{{ __('Nhập địa chỉ IP mới mà bạn muốn sử dụng.') }}</flux:text>
|
||||
</div>
|
||||
|
||||
<form x-data="{ submitting: false }" x-on:submit.prevent="if (submitting) return; submitting = true; $el.submit()" method="POST" action="{{ route('service.change.ip') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="product_id" value="{{ $invoice->vm_id }}">
|
||||
|
||||
<flux:field>
|
||||
<flux:label>{{ __('Địa chỉ IP mới') }}</flux:label>
|
||||
<flux:input name="ip" type="text" placeholder="103.42.xx.xx" required pattern="^(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})$" />
|
||||
<flux:description>{{ __('Vui lòng nhập IPv4 hợp lệ. Yêu cầu sẽ được xử lý nếu khả dụng.') }}</flux:description>
|
||||
</flux:field>
|
||||
|
||||
<div class="flex gap-2 justify-end mt-6">
|
||||
<flux:modal.close>
|
||||
<flux:button variant="ghost">{{ __('Hủy') }}</flux:button>
|
||||
</flux:modal.close>
|
||||
<flux:button type="submit" variant="primary" color="orange" x-bind:disabled="submitting">{{ __('Đồng ý') }}</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</flux:modal>
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{{-- Change IP Trigger --}}
|
||||
<flux:modal.trigger name="change-ip">
|
||||
<div class="bg-gray-50 hover:bg-gray-100 rounded-lg p-4 text-center cursor-pointer transition-colors duration-200 border border-gray-200 hover:border-blue-300 w-full">
|
||||
<div class="flex flex-col items-center">
|
||||
<div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-3">
|
||||
<svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12c2.485 0 4.5-2.015 4.5-4.5S14.485 3 12 3 7.5 5.015 7.5 7.5 9.515 12 12 12zm0 0c-3.314 0-6 2.239-6 5v1h12v-1c0-2.761-2.686-5-6-5z" />
|
||||
</svg>
|
||||
</div>
|
||||
<span class="text-sm font-medium text-gray-700">{{ __('Đổi IP') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</flux:modal.trigger>
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
@if ($isPoweredOn)
|
||||
@include('frontend.service.partials.control-buttons.snapshot-button')
|
||||
@include('frontend.service.partials.control-buttons.reset-password-button')
|
||||
@include('frontend.service.partials.control-buttons.change-ip-button')
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@@ -60,6 +61,7 @@
|
||||
'invoice' => $invoice,
|
||||
'isWindows' => $isWindows,
|
||||
])
|
||||
@include('frontend.service.partials.change-ip-modal', ['invoice' => $invoice])
|
||||
@include('frontend.service.partials.change-remote-port-modal', ['invoice' => $invoice])
|
||||
@endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user