@{ /****************************************************************************** // MARECHAI: Master repository of computing history artifacts information // ---------------------------------------------------------------------------- // // Author(s) : Natalia Portillo // // --[ License ] -------------------------------------------------------------- // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- // Copyright © 2003-2020 Natalia Portillo *******************************************************************************/ } @page "/admin/machines/photo/create/{MachineId:int}" @using Marechai.Database.Models @inherits OwningComponentBase @inject IStringLocalizer L @inject NavigationManager NavigationManager @inject LicensesService LicensesService @inject IFileReaderService FileReaderService; @inject MachinesService MachinesService; @inject UserManager UserManager @inject AuthenticationStateProvider AuthenticationStateProvider @inject IWebHostEnvironment Host @attribute [Authorize(Roles = "UberAdmin, Admin")] @if(!_loaded) {

@L["Loading..."]

return; }

@string.Format(L["Upload photo for machine {0} manufactured by {1}"], _machine.Name, _machine.Company)


@if(!_uploaded) { @if(!_uploading) { @L["Choose photo file"]
@L["License"] @L["Source URL"] @L["Unknown (source url)"] @if(!_unknownSource) { @L["Please enter a valid source URL."] }
TODO: Put legal disclaimer here

} else { @L["Uploading..."]
@($"{_progressValue:F2}")%
} @if(_uploadError) { @_uploadErrorMessage } } else {
@string.Format(L["Image format recognized as {0}"], _imageFormat)
@if(_allFinished) { @L["All finished!"] @L["Go to photo details"] }
@L["Extracting Exif information..."] @if(_extractExif == true) { @L["OK!"] } else if(_extractExif == false) { @L["Error!"] }
@L["Moving file to proper place..."] @if(_moveFile == true) { @L["OK!"] } else if(_moveFile == false) { @L["Error!"] } @if(_moveFile == true) { }
@L["Converting photo to JPEG with an HD resolution (thumbnail)..."] @if(_convertJpegHdTh == true) { @L["OK!"] } else if(_convertJpegHdTh == false) { @L["Error!"] } @if(_convertJpegHdTh == true) { }
@L["Converting photo to JPEG with a 1440p resolution (thumbnail)..."] @if(_convertJpeg1440Th == true) { @L["OK!"] } else if(_convertJpeg1440Th == false) { @L["Error!"] } @if(_convertJpeg1440Th == true) { }
@L["Converting photo to JPEG with a 4K resolution (thumbnail)..."] @if(_convertJpeg4kTh == true) { @L["OK!"] } else if(_convertJpeg4kTh == false) { @L["Error!"] } @if(_convertJpeg4kTh == true) { }
@L["Converting photo to JPEG with an HD resolution..."] @if(_convertJpegHd == true) { @L["OK!"] } else if(_convertJpegHd == false) { @L["Error!"] } @if(_convertJpegHd == true) { }
@L["Converting photo to JPEG with a 1440p resolution..."] @if(_convertJpeg1440 == true) { @L["OK!"] } else if(_convertJpeg1440 == false) { @L["Error!"] } @if(_convertJpeg1440 == true) { }
@L["Converting photo to JPEG with a 4K resolution..."] @if(_convertJpeg4k == true) { @L["OK!"] } else if(_convertJpeg4k == false) { @L["Error!"] } @if(_convertJpeg4k == true) { }
@L["Converting photo to JPEG2000 with an HD resolution (thumbnail)..."] @if(_convertJp2kHdTh == true) { @L["OK!"] } else if(_convertJp2kHdTh == false) { @L["Error!"] } @if(_convertJp2kHdTh == true) { }
@L["Converting photo to JPEG2000 with a 1440p resolution (thumbnail)..."] @if(_convertJp2k1440Th == true) { @L["OK!"] } else if(_convertJp2k1440Th == false) { @L["Error!"] } @if(_convertJp2k1440Th == true) { }
@L["Converting photo to JPEG2000 with a 4K resolution (thumbnail)..."] @if(_convertJp2k4kTh == true) { @L["OK!"] } else if(_convertJp2k4kTh == false) { @L["Error!"] } @if(_convertJp2k4kTh == true) { }
@L["Converting photo to JPEG2000 with an HD resolution..."] @if(_convertJp2kHd == true) { @L["OK!"] } else if(_convertJp2kHd == false) { @L["Error!"] } @if(_convertJp2kHd == true) { }
@L["Converting photo to JPEG2000 with a 1440p resolution..."] @if(_convertJp2k1440 == true) { @L["OK!"] } else if(_convertJp2k1440 == false) { @L["Error!"] } @if(_convertJp2k1440 == true) { }
@L["Converting photo to JPEG2000 with a 4K resolution..."] @if(_convertJp2k4k == true) { @L["OK!"] } else if(_convertJp2k4k == false) { @L["Error!"] } @if(_convertJp2k4k == true) { }
@L["Converting photo to WebP with an HD resolution (thumbnail)..."] @if(_convertWebpHdTh == true) { @L["OK!"] } else if(_convertWebpHdTh == false) { @L["Error!"] } @if(_convertWebpHdTh == true) { }
@L["Converting photo to WebP with a 1440p resolution (thumbnail)..."] @if(_convertWebp1440Th == true) { @L["OK!"] } else if(_convertWebp1440Th == false) { @L["Error!"] } @if(_convertWebp1440Th == true) { }
@L["Converting photo to WebP with a 4K resolution (thumbnail)..."] @if(_convertWebp4kTh == true) { @L["OK!"] } else if(_convertWebp4kTh == false) { @L["Error!"] } @if(_convertWebp4kTh == true) { }
@L["Converting photo to WebP with an HD resolution..."] @if(_convertWebpHd == true) { @L["OK!"] } else if(_convertWebpHd == false) { @L["Error!"] } @if(_convertWebpHd == true) { }
@L["Converting photo to WebP with a 1440p resolution..."] @if(_convertWebp1440 == true) { @L["OK!"] } else if(_convertWebp1440 == false) { @L["Error!"] } @if(_convertWebp1440 == true) { }
@L["Converting photo to WebP with a 4K resolution..."] @if(_convertWebp4k == true) { @L["OK!"] } else if(_convertWebp4k == false) { @L["Error!"] } @if(_convertWebp4k == true) { }
@L["Converting photo to HEIF with an HD resolution (thumbnail)..."] @if(_convertHeifHdTh == true) { @L["OK!"] } else if(_convertHeifHdTh == false) { @L["Error!"] } @if(_convertHeifHdTh == true) { }
@L["Converting photo to HEIF with a 1440p resolution (thumbnail)..."] @if(_convertHeif1440Th == true) { @L["OK!"] } else if(_convertHeif1440Th == false) { @L["Error!"] } @if(_convertHeif1440Th == true) { }
@L["Converting photo to HEIF with a 4K resolution (thumbnail)..."] @if(_convertHeif4kTh == true) { @L["OK!"] } else if(_convertHeif4kTh == false) { @L["Error!"] } @if(_convertHeif4kTh == true) { }
@L["Converting photo to HEIF with an HD resolution..."] @if(_convertHeifHd == true) { @L["OK!"] } else if(_convertHeifHd == false) { @L["Error!"] } @if(_convertHeifHd == true) { }
@L["Converting photo to HEIF with a 1440p resolution..."] @if(_convertHeif1440 == true) { @L["OK!"] } else if(_convertHeif1440 == false) { @L["Error!"] } @if(_convertHeif1440 == true) { }
@L["Converting photo to HEIF with a 4K resolution..."] @if(_convertHeif4k == true) { @L["OK!"] } else if(_convertHeif4k == false) { @L["Error!"] } @if(_convertHeif4k == true) { }
@L["Converting photo to AV1F with an HD resolution (thumbnail)..."] @if(_convertAvifHdTh == true) { @L["OK!"] } else if(_convertAvifHdTh == false) { @L["Error!"] } @if(_convertAvifHdTh == true) { }
@L["Converting photo to AV1F with a 1440p resolution (thumbnail)..."] @if(_convertAvif1440Th == true) { @L["OK!"] } else if(_convertAvif1440Th == false) { @L["Error!"] } @if(_convertAvif1440Th == true) { }
@L["Converting photo to AV1F with a 4K resolution (thumbnail)..."] @if(_convertAvif4kTh == true) { @L["OK!"] } else if(_convertAvif4kTh == false) { @L["Error!"] } @if(_convertAvif4kTh == true) { }
@L["Converting photo to AV1F with an HD resolution..."] @if(_convertAvifHd == true) { @L["OK!"] } else if(_convertAvifHd == false) { @L["Error!"] } @if(_convertAvifHd == true) { }
@L["Converting photo to AV1F with a 1440p resolution..."] @if(_convertAvif1440 == true) { @L["OK!"] } else if(_convertAvif1440 == false) { @L["Error!"] } @if(_convertAvif1440 == true) { }
@L["Converting photo to AV1F with a 4K resolution..."] @if(_convertAvif4k == true) { @L["OK!"] } else if(_convertAvif4k == false) { @L["Error!"] } @if(_convertAvif4k == true) { }
@L["Adding photo to database..."] @if(_addToDatabase == true) { @L["OK!"] } else if(_addToDatabase == false) { @L["Error!"] }
}