diff --git a/Dockerfile b/Dockerfile index 9098a36..6956cf7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,6 @@ COPY config/nginx.conf.template /etc/nginx/templates/ COPY ./html/ /usr/share/nginx/html/ ENV LKRP_UL_URL="https://lkrp-dev.micord.ru/ul/" -ENV LKRP_UL_LANDING="https://lkrp-dev.micord.ru/ul/#/home" ENV LKRP_FL_URL="https://lkrp-dev.micord.ru/fl/" ENV LKRP_FL_LANDING="https://lkrp-dev.micord.ru/fl/#/home" ENV LKRP_CRT_CHECK_URL="https://xn--1-6tb.xn--b1afabzvcegckfhg.xn--p1ai/" diff --git a/config/nginx.conf.template b/config/nginx.conf.template index 3345a69..7be407e 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -77,7 +77,6 @@ server { set $flUrl "${LKRP_FL_URL}"; set $flLandingUrl "${LKRP_FL_LANDING}"; set $ulUrl "${LKRP_UL_URL}"; - set $ulLandingUrl "${LKRP_UL_LANDING}"; set $certUrl "${LKRP_CRT_CHECK_URL}"; try_files $uri $uri/ $uri/index.html; diff --git a/html/index.html b/html/index.html index f745d43..fd140cd 100644 --- a/html/index.html +++ b/html/index.html @@ -37,7 +37,7 @@
Для организаций
Направление сведений через ">Личный кабинет

- " class="btn">Подробнее + Подробнее diff --git a/html/landing_ul.html b/html/landing_ul.html new file mode 100644 index 0000000..9746b0c --- /dev/null +++ b/html/landing_ul.html @@ -0,0 +1,127 @@ + + + + + + + + + + + + + +
+ +
Реестр повесток юридических лиц
+
+ +
+
+
+
+

+ Доступ к личному кабинету для юридических лиц осуществляется исключительно через браузеры Яндекс или Chromium GOST, а также необходимо наличие установленного приложения КриптоПро версии CSP 5.0 R3 и выше с расширением КриптоПро ЭЦП Browser plug-in +

+

+ Пожалуйста, попробуйте снова, выбрав один из этих браузеров и установив КриптоПро CSP, КриптоПро ЭЦП Browser plug-in. +

+
+
+
+
+
+
+
+ Личный кабинет для ведения воинского учета в организациях
+
+
+
Кому доступен личный кабинет?
+
Организациям, за ĸоторыми заĸреплена обязанность по осуществлению воинсĸого учета в соответствии с ФЗ от 28.03.1998 No 53-ФЗ
+
+
+
Для чего нужен личный кабинет?
+
Для своевременной и оперативной передачи сведений в военĸоматы в элеĸтронном виде
+
+
+
+
+
+
+
+
Как получить доступ к Личному кабинету?
+
+ +
+
+
+
Какие виды сведений доступны для отправки?
+
+
+
+
+ Сведения о приеме на работу (увольнении), зачислении в образовательную организацию (отчислении) +
Срок передачи сведений: до 5 дней
+
+
+ Изменения сведений сотрудников, необходимых для ведения воинского учета +
Срок передачи сведений: до 5 дней
+
+
+ Сообщение о гражданах, не состоящих, но обязанных состоять на воинском учете +
Срок передачи сведений: до 3 дней
+
+
+
+
+
+
+ Ежегодное предоставление списка граждан мужского пола, подлежащих первоначальной постановке на воинский учет в год достижения ими возраста 17 лет +
Срок передачи сведений: ежегодно, в срок до 1 ноября
+
+
+ Ежегодное предоставление списка сотрудников/обучающихся в организации, подлежащих воинскому учету +
Срок передачи сведений: ежегодно, по согласованию с военкоматом
+
+
+
+
+
+
+
Как передавать сведения?
+
+
Войдите в личный ĸабинет организации через Госуслуги
+
Подготовьте файл-csv с данными в соответствии с форматом в личном кабинете организации
+
Убедитесь, что все данные в файле введены ĸорреĸтно
+
Выберите необходимый вид сведений и загрузите файл
+
Следите за статусом приема
+
+
+
+
+ Если в файле будут ошибĸи, данные не будут приняты Реестром и выгрузĸу сведений придется повторить +
+
+
+
+
+
+ + + diff --git a/html/landing_ul/fonts/GolosText-Bold.ttf b/html/landing_ul/fonts/GolosText-Bold.ttf new file mode 100644 index 0000000..3a41f9b Binary files /dev/null and b/html/landing_ul/fonts/GolosText-Bold.ttf differ diff --git a/html/landing_ul/fonts/GolosText-DemiBold.ttf b/html/landing_ul/fonts/GolosText-DemiBold.ttf new file mode 100644 index 0000000..5514593 Binary files /dev/null and b/html/landing_ul/fonts/GolosText-DemiBold.ttf differ diff --git a/html/landing_ul/fonts/GolosText-Medium.ttf b/html/landing_ul/fonts/GolosText-Medium.ttf new file mode 100644 index 0000000..bb2c29b Binary files /dev/null and b/html/landing_ul/fonts/GolosText-Medium.ttf differ diff --git a/html/landing_ul/fonts/GolosText-Regular.ttf b/html/landing_ul/fonts/GolosText-Regular.ttf new file mode 100644 index 0000000..7e0f0e5 Binary files /dev/null and b/html/landing_ul/fonts/GolosText-Regular.ttf differ diff --git a/html/landing_ul/fonts/Inter-Bold.otf b/html/landing_ul/fonts/Inter-Bold.otf new file mode 100644 index 0000000..c74cc0c Binary files /dev/null and b/html/landing_ul/fonts/Inter-Bold.otf differ diff --git a/html/landing_ul/fonts/Inter-Light.otf b/html/landing_ul/fonts/Inter-Light.otf new file mode 100644 index 0000000..2a83ae1 Binary files /dev/null and b/html/landing_ul/fonts/Inter-Light.otf differ diff --git a/html/landing_ul/fonts/Inter-Medium.otf b/html/landing_ul/fonts/Inter-Medium.otf new file mode 100644 index 0000000..ca7bfcd Binary files /dev/null and b/html/landing_ul/fonts/Inter-Medium.otf differ diff --git a/html/landing_ul/fonts/Inter-Regular.otf b/html/landing_ul/fonts/Inter-Regular.otf new file mode 100644 index 0000000..84e6a61 Binary files /dev/null and b/html/landing_ul/fonts/Inter-Regular.otf differ diff --git a/html/landing_ul/fonts/Inter-SemiBold.otf b/html/landing_ul/fonts/Inter-SemiBold.otf new file mode 100644 index 0000000..daf4c44 Binary files /dev/null and b/html/landing_ul/fonts/Inter-SemiBold.otf differ diff --git a/html/landing_ul/fonts/Inter-Thin.otf b/html/landing_ul/fonts/Inter-Thin.otf new file mode 100644 index 0000000..22592e0 Binary files /dev/null and b/html/landing_ul/fonts/Inter-Thin.otf differ diff --git a/html/landing_ul/home.css b/html/landing_ul/home.css new file mode 100644 index 0000000..3541735 --- /dev/null +++ b/html/landing_ul/home.css @@ -0,0 +1,759 @@ +@font-face { + font-family: 'InterL'; + src: url('fonts/Inter-Light.otf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: 'Inter'; + src: url('fonts/Inter-Regular.otf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: 'InterM'; + src: url('fonts/Inter-Medium.otf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: 'InterSB'; + src: url('fonts/Inter-SemiBold.otf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: 'InterB'; + src: url('fonts/Inter-Bold.otf'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'Golos'; + src: url('fonts/GolosText-Regular.ttf'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'GolosM'; + src: url('fonts/GolosText-Medium.ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: 'GolosDB'; + src: url('fonts/GolosText-DemiBold.ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: 'GolosB'; + src: url('fonts/GolosText-Bold.ttf'); + font-weight: 400; + font-style: normal; +} + +:root { + --white: #ffffff; + --black: #000000; + --color-text-primary: #1d1e21; + --color-text-secondary: #acacac; + --color-link: #c64e1b; + --color-link-hover: #fa773f; + --color-form: #3f434b; + --color-bg-main: #223d36; + --color-light: #868b87; + --bg-light: #fafafa; + --bg-warn: #ffdcc6; + --bg-form: #eee; + --border-light: #d2d2d2; + --bg-shadow: 0 19px 19px 0 rgba(230, 230, 230, 0.19), 0 1px 4px 0 #f3f3f3; + + --h-header: 64px; + --w-screen: 100px; + + --size-text-maintitle: 54px; + --size-text-title: 40px; + --size-text-subtitle: 32px; + --size-text-primary: 20px; + --size-text-secondary: 16px; + + --indent-huge: 72px; + --indent-big: 52px; + --indent-medium: 32px; + --indent-small: 24px; + --indent-mini: 16px; +} +body, html { + height: 100% +} + +body { + -ms-text-size-adjust: 100%; + -moz-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + + display: flex; + flex-direction: column; + padding: 0; + margin: 0; +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:is(:hover, :focus, :active) { + color: var(--color-link-hover); +} + +button, a.btn { + display: flex; + justify-content: center; + align-items: center; + color: var(--white); + font-family: 'InterL'; + font-size: var(--size-text-secondary); + padding: 0 24px; + height: 48px; + border: 1px solid transparent; + border-radius: 4px; + background: var(--color-link); +} +a.btn.disabled { + pointer-events: none; + opacity: 0.5; + cursor: not-allowed; +} + +.disabled-link { + pointer-events: none; + opacity: 0.5; + cursor: not-allowed; +} + +button:is(:hover, :focus, :active), +a.btn:is(:hover, :focus, :active) { + background: var(--color-link-hover); + cursor: pointer; +} +.btn.btn-secondary { + color: var(--color-link); + border-color: var(--color-link); + background-color: transparent; +} +.btn.btn-secondary:is(:hover, :focus, :active) { + color: var(--color-link-hover); + border-color: var(--color-link-hover); + background: transparent; +} + + + +.header { + display: flex; + flex-direction: row; + align-items: center; + font-family: 'InterSB'; + min-height: var(--h-header); + padding: 0 var(--w-screen); + border: 0; + background-color: var(--color-bg-main); +} +.header .header-logo { + width: 62px; + height: 40px; + background: url(img/svg/mil-logo.svg) no-repeat 0 50%; +} +.header .header-title { + color: var(--white); + font-size: var(--size-text-secondary); + margin-left: var(--indent-mini); +} +:is(.ul, .fl) .header { + background-color: var(--color-text-primary); + z-index: 1; +} + +.container { + display: flex; + flex-direction: column; + width: 100%; + max-width: 100%; + height: auto; + margin: 0; + padding: var(--h-header) 0 0; + position: absolute; + top: 0px; + left: 0; + right: 0; + bottom: 0; + border: 0; + overflow: hidden; +} + +.container-inside { + display: flex; + flex-direction: column; + flex: 1 1 auto; + color: var(--color-text-primary); + font-family: 'Inter'; + padding: 0 var(--w-screen); + background-color: var(--bg-light); + overflow: auto; +} +.container-inside .short-text { + max-width: 60%; +} +.container-inside .paragraph-left .short-text { + max-width: 70%; +} +.container-inside .block-group { + display: flex; + flex-direction: row; + margin: auto; +} +.container-inside .block { + font-family: 'Inter'; + min-width: 355px; + padding: 40px; + border-radius: 12px; + background-color: var(--white); + box-shadow: var(--bg-shadow); +} +.container-inside .block > div { + max-width: 350px; +} +.container-inside .block + .block { + margin-left: 40px; +} +.container-inside .block .block-img { + width: 100px; + height: 100px; +} +.container-inside .block.block-ul .block-img { + background-image: url(img/svg/ul.svg); +} +.container-inside .block.block-fl .block-img { + background-image: url(img/svg/fl.svg); +} +.container-inside .block .block-title { + font-family: 'GolosB'; + font-size: var(--size-text-subtitle); + margin-top: var(--indent-mini); +} +.container-inside .block .block-description { + font-family: 'Golos'; + font-size: var(--size-text-primary); + margin-top: var(--indent-mini); +} +.container-inside .block .btn { + width: auto; + margin-top: var(--indent-medium); +} +:is(.ul, .fl) .container-inside { + padding: 0; + background-color: var(--white); +} +:is(.ul, .fl) .container-inside .btn-group { + display: flex; + flex-direction: row; +} +:is(.ul, .fl) .container-inside .btn-group .btn + .btn { + margin-left: var(--indent-mini); +} + +:is(.ul, .fl) .container-inside .list-group { + position: relative; + padding: 0 var(--w-screen); +} +:is(.ul, .fl) .container-inside .list-group .btn { + width: max-content; +} +:is(.ul, .fl) .container-inside .list-group .title { + font-size: var(--size-text-maintitle); + font-family: 'GolosB'; + margin-bottom: var(--indent-huge); +} +:is(.ul, .fl) .container-inside .list-group .subtitle { + font-size: var(--size-text-title); + font-family: 'GolosDB'; + margin-bottom: var(--indent-big); +} +:is(.ul, .fl) .container-inside .list-group .muted { + color: var(--color-light); +} + +:is(.ul, .fl) .container-inside .list-group .paragraph { + display: flex; + flex-direction: row; +} +:is(.ul, .fl) .container-inside .list-group .paragraph .paragraph-left { + width: 40%; +} +:is(.ul, .fl) .container-inside .list-group .paragraph .paragraph-right { + width: 60%; +} +:is(.ul, .fl) .container-inside .list-group .paragraph .paragraph-half { + width: 50%; +} +:is(.ul, .fl) .container-inside .list-group .paragraph .paragraph-third { + width: 33.33%; +} +:is(.ul, .fl) .container-inside .list-group .paragraph [class*="paragraph-"] + [class*="paragraph-"] { + margin-left: 40px; +} +:is(.ul, .fl) .container-inside .list-group .paragraph .text { + font-family: 'InterSB'; + font-size: var(--size-text-primary); + margin-bottom: var(--indent-mini); +} +:is(.ul, .fl) .container-inside .list-group .paragraph .icon-checklist, +:is(.ul, .fl) .container-inside .list-group .paragraph .icon-clock, +:is(.ul, .fl) .container-inside .list-group .paragraph .icon-text { + padding-top: 44px; +} +:is(.ul, .fl) .container-inside .list-group .paragraph .icon-checklist { + background: url(img/svg/checklist-32x32.svg) no-repeat 0 0; +} +:is(.ul, .fl) .container-inside .list-group .paragraph .icon-clock { + background: url(img/svg/clock-32x32.svg) no-repeat 0 0; +} +:is(.ul, .fl) .container-inside .list-group .paragraph .icon-text { + background: url(img/svg/text-32x32.svg) no-repeat 0 0; +} + +:is(.ul, .fl) .container-inside .list-group .list > div { + position: relative; + padding-left: 36px; +} +:is(.ul, .fl) .container-inside .list-group .list > div + div { + margin-top: var(--indent-mini); +} +:is(.ul, .fl) .container-inside .list-group .list > div::after { + content: ""; + position: absolute; + width: 24px; + height: 24px; + top: 0; + left: 0; +} +:is(.ul, .fl) .container-inside .list-group .list > div.esia::after { + background: url(img/svg/esia-24x24.svg) no-repeat 0 0; +} +:is(.ul, .fl) .container-inside .list-group .list > div.case::after { + background: url(img/svg/case-24x24.svg) no-repeat 0 0; +} +:is(.ul, .fl) .container-inside .list-group .list > div.user::after { + background: url(img/svg/user-24x24.svg) no-repeat 0 0; +} +:is(.ul, .fl) .container-inside .list-group .list > div.docs::after { + background: url(img/svg/docs-24x24.svg) no-repeat 0 0; +} +:is(.ul, .fl) .container-inside .list-group .list > div.romb::after { + background: url(img/svg/romb-24x24.svg) no-repeat 0 0; +} +:is(.ul, .fl) .container-inside .list-group .list ~ .btn-group { + margin-top: var(--indent-medium); +} + +:is(.ul, .fl) .container-inside .list-group .section-group > div { + display: flex; + flex-direction: column; + min-height: 48px; + position: relative; + padding: 16px 16px 16px 76px; + margin-bottom: 16px; + border-radius: 4px; + background-color: var(--bg-form); +} +:is(.ul, .fl) .container-inside .list-group .section-group > div:last-child { + margin-bottom: 0; +} +:is(.ul, .fl) .container-inside .list-group .section-group > div::before { + content: ""; + position: absolute; + left: 16px; + width: 48px; + height: 48px; + border-radius: 50px; + background-color: var(--color-bg-main); + background-repeat: no-repeat; + background-position: 50% 50%; +} +:is(.ul, .fl) .container-inside .list-group .section-group > div.icon-user::before { + background-image: url(img/svg/pers-wt.svg); +} +:is(.ul, .fl) .container-inside .list-group .section-group > div.icon-case::before { + background-image: url(img/svg/case-wt.svg); +} +:is(.ul, .fl) .container-inside .list-group .section-group > div.icon-shield::before { + background-image: url(img/svg/shield-wt.svg); +} +:is(.ul, .fl) .container-inside .list-group .section-group > div.icon-clip::before { + background-image: url(img/svg/clip-wt.svg); +} +:is(.ul, .fl) .container-inside .list-group .section-group > div.icon-pers::before { + background-image: url(img/svg/pers-wt.svg); +} +:is(.ul, .fl) .container-inside .list-group .section-group > div.icon-building::before { + background-image: url(img/svg/building-wt.svg); +} +:is(.ul, .fl) .container-inside .list-group .section-group > div .muted { + margin-top: 12px; +} +:is(.ul, .fl) .container-inside .list-group .section-group > div .muted .detailed { + color: var(--color-text-primary); + font-family: 'InterB'; +} + +:is(.ul, .fl) .container-inside .list-group .pass-list { + position: relative; + display: flex; + flex-direction: row; + padding-top: 60px; +} +:is(.ul, .fl) .container-inside .list-group .pass-list::before { + content: ""; + position: absolute; + width: calc(80% + 40px); + height: 4px; + top: 18px; + left: 0; + background-color: var(--color-link-hover); +} +:is(.ul, .fl) .container-inside .list-group .pass-list > div { + position: relative; + width: 20%; +} +:is(.ul, .fl) .container-inside .list-group .pass-list > div::before { + content: ""; + position: absolute; + width: 32px; + height: 32px; + top: -60px; + left: 0; + border-radius: 2px; + border: 4px solid var(--color-link-hover); + background-color: var(--bg-light); + transform: rotate(45deg); +} +:is(.ul, .fl) .container-inside .list-group .pass-list > div::after { + content: ""; + position: absolute; + font-family: 'InterB'; + top: -50px; + left: 15px; +} +:is(.ul, .fl) .container-inside .list-group .pass-list > div:nth-child(1)::after { + content: "1"; +} +:is(.ul, .fl) .container-inside .list-group .pass-list > div:nth-child(2)::after { + content: "2"; +} +:is(.ul, .fl) .container-inside .list-group .pass-list > div:nth-child(3)::after { + content: "3"; +} +:is(.ul, .fl) .container-inside .list-group .pass-list > div:nth-child(4)::after { + content: "4"; +} +:is(.ul, .fl) .container-inside .list-group .pass-list > div:nth-child(5)::after { + content: "5"; +} +:is(.ul, .fl) .container-inside .list-group .pass-list > div + div { + margin-left: 40px; +} + +:is(.ul, .fl) .container-inside .list-group .msg-list { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + padding: 8px; +} +:is(.ul, .fl) .container-inside .list-group .msg-list span { + width: 32px; + height: 32px; + padding-right: 16px; + background: url(img/svg/info-gr.svg) no-repeat 0 0; +} + +:is(.ul, .fl) .container-inside .list-group .docs-list { + position: relative; + display: flex; + flex-direction: row; +} +:is(.ul, .fl) .container-inside .list-group .docs-list > div { + position: relative; + display: flex; + flex-direction: row; + align-items: center; + width: 20%; +} +:is(.ul, .fl) .container-inside .list-group .docs-list > div a { + width: 24px; + height: 24px; + padding-right: 8px; + background: url(img/svg/download-24x24.svg) no-repeat 0 0; +} +:is(.ul, .fl) .container-inside .list-group .docs-list > div + div { + margin-left: 40px; +} + +:is(.ul, .fl) .container-inside .list-group.lk-what { + padding-top: var(--indent-huge); + padding-bottom: var(--indent-huge); +} +:is(.ul, .fl) .container-inside .list-group.lk-what::after { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 0.12; + background: url(img/bg-star.png) no-repeat calc(100% + 200px) 0px transparent; + z-index: 0; +} +:is(.ul, .fl) .container-inside .list-group.lk-what > div { + position: relative; + z-index: 1; +} + +:is(.ul, .fl) .container-inside .list-group.lk-access { + color: var(--white); + padding-top: var(--indent-big); + padding-bottom: var(--indent-big); + background-color: var(--color-bg-main); +} +:is(.ul, .fl) .container-inside .list-group.lk-info { + padding-top: var(--indent-big); + padding-bottom: var(--indent-big); +} +:is(.ul, .fl) .container-inside .list-group.lk-pass { + padding-top: var(--indent-big); + padding-bottom: var(--indent-big); + background-color: var(--bg-light); +} +:is(.ul, .fl) .container-inside .list-group.lk-when { + color: var(--white); + padding-top: var(--indent-big); + padding-bottom: var(--indent-big); + background-color: var(--color-bg-main); +} +:is(.ul, .fl) .container-inside .list-group.lk-msg { + background-color: var(--border-light); +} +:is(.ul, .fl) .container-inside .list-group.lk-limits { + padding-top: var(--indent-big); + padding-bottom: var(--indent-big); +} +:is(.ul, .fl) .container-inside .list-group.lk-docs { + flex: 1; + color: var(--white); + padding-top: var(--indent-medium); + padding-bottom: var(--indent-medium); + background-color: var(--color-text-primary); +} +:is(.ul, .fl) .container-inside .list-group.lk-alert { + padding-top: var(--indent-big); + padding-bottom: var(--indent-big); + background-color: var(--bg-light); +} +:is(.ul, .fl) .container-inside .list-group.lk-footer { + padding-top: var(--indent-small); + padding-bottom: var(--indent-small); + background-color: var(--color-text-primary); +} + +:is(.fl) .container-inside .list-group.lk-what .title { + color: var(--color-link); + margin-bottom: var(--indent-small); +} +:is(.fl) .container-inside .list-group.lk-what .title::after { + content: url(img/svg/star.svg); + top: 18px; + position: relative; + margin-left: var(--indent-big); +} +:is(.fl) .container-inside .list-group.lk-what .title + .short-text { + max-width: 25%; +} +:is(.fl) .container-inside .list-group.lk-what .title ~ .subtitle { + margin-top: var(--indent-big); +} +:is(.fl) .container-inside .list-group.lk-info .section-group > div { + justify-content: center; +} +:is(.fl) .container-inside .list-group.lk-pass .subtitle { + margin-bottom: 0; +} +:is(.fl) .container-inside .list-group.lk-pass .subtitle + div { + margin-top: var(--indent-small); + margin-bottom: var(--indent-big); +} +:is(.fl) .container-inside .list-group.lk-pass .pass-list::before { + display: none; +} +:is(.fl) .container-inside .list-group.lk-pass .pass-list > div { + position: relative; + width: 33.33%; +} +:is(.fl) .container-inside .list-group.lk-msg { + color: var(--color-link); + font-family: 'InterSB'; + background-color: var(--bg-form); +} +:is(.fl) .container-inside .list-group.lk-msg span { + background: url(img/svg/info.svg) no-repeat 0 4px; +} +:is(.fl) .container-inside .list-group.lk-limits .subtitle { + margin-bottom: 0; +} +:is(.fl) .container-inside .list-group.lk-limits .subtitle + div { + margin-top: var(--indent-small); + margin-bottom: var(--indent-big); +} +:is(.fl) .container-inside .list-group.lk-limits .scheme { + width: 100%; + height: 204px; + background: url(img/svg/scheme.svg) no-repeat 0 0; +} +:is(.fl) .container-inside .list-group.lk-alert > .short-text { + margin-bottom: var(--indent-big); +} +:is(.fl) .container-inside .list-group.lk-alert .alert-block { + position: relative; + padding: var(--indent-small) 64px var(--indent-small) var(--indent-small); + border-radius: 4px; + border: 2px solid var(--border-light); +} +:is(.fl) .container-inside .list-group.lk-alert .alert-block::after { + content: url(img/svg/info.svg); + position: absolute; + top: var(--indent-small); + right: var(--indent-small); +} +:is(.fl) .container-inside .list-group.lk-alert .alert-block > div + div { + margin-top: var(--indent-small); +} +:is(.fl) .container-inside .list-group.lk-alert .alert-block > div:last-child { + color: var(--color-link); +} + +.browser-check-content { + font-family: 'Golos'; + font-size: var(--size-text-secondary); + padding: var(--indent-mini) var(--w-screen) var(--indent-mini) calc(var(--w-screen) + 38px); + background-color: var(--bg-warn); +} +.browser-check-text { + position: relative; + padding-left: 40px; +} +.browser-check-text::before { + position: absolute; + content: url(img/svg/info.svg); + left: 0; + top: calc((100% - 24px) / 2); +} +.text-header { + color: var(--color-link); + font-family: 'GolosB'; + font-size: var(--size-text-primary); + margin-bottom: 4px; +} + +/*@media ((max-width: 780px) or ((orientation: landscape) and (max-device-width : 1024px))) {*/ +@media (max-width: 1024px) { + body { + --w-screen: 32px; + + --size-text-maintitle: 32px; + --size-text-title: 28px; + --size-text-subtitle: 24px; + + --indent-huge: 32px; + --indent-big: 24px; + --indent-medium: 24px; + --indent-small: 16px; + } + + .container-inside .short-text { + max-width: 100% !important; + } + + .container-inside .block-group { + flex-direction: column; + margin: 0; + } + .container-inside .block-group .block { + min-width: auto; + margin: var(--indent-huge) 0 0; + } + .container-inside .block-group .block > div { + max-width: inherit !important; + } + :is(.ul, .fl) .container-inside .list-group .paragraph { + flex-direction: column; + } + :is(.ul, .fl) .container-inside .list-group .paragraph [class*="paragraph-"] { + width: auto; + margin-left: 0; + } + :is(.ul, .fl) .container-inside .list-group .paragraph [class*="paragraph-"] + [class*="paragraph-"] { + margin-top: var(--indent-mini); + margin-left: 0; + } + :is(.ul, .fl) .container-inside .list-group .pass-list { + flex-direction: column; + padding-top: 0; + } + :is(.ul, .fl) .container-inside .list-group .pass-list::before { + display: none; + } + :is(.ul, .fl) .container-inside .list-group .pass-list > div { + display: flex; + align-items: center; + width: auto !important; + padding-left: 60px; + min-height: 40px; + } + :is(.ul, .fl) .container-inside .list-group .pass-list > div::before { + top: 0; + } + :is(.ul, .fl) .container-inside .list-group .pass-list > div::after { + top: 10px; + } + :is(.ul, .fl) .container-inside .list-group .pass-list > div + div { + margin-left: 0; + margin-top: var(--indent-mini); + } +} + +@media (max-width: 480px) { + body { + --w-screen: 16px; + + --size-text-maintitle: 28px; + --size-text-title: 24px; + --size-text-subtitle: 20px; + + --indent-huge: 24px; + --indent-big: 24px; + --indent-medium: 16px; + --indent-small: 16px; + } + :is(.ul, .fl) .container-inside .list-group .docs-list { + flex-direction: column; + } + :is(.ul, .fl) .container-inside .list-group .docs-list > div { + width: 100%; + } + :is(.ul, .fl) .container-inside .list-group .docs-list > div + div { + margin-left: 0; + margin-top: var(--indent-mini); + } +} diff --git a/html/landing_ul/img/bg-star.png b/html/landing_ul/img/bg-star.png new file mode 100644 index 0000000..088b855 Binary files /dev/null and b/html/landing_ul/img/bg-star.png differ diff --git a/html/landing_ul/img/svg/building-wt.svg b/html/landing_ul/img/svg/building-wt.svg new file mode 100644 index 0000000..812624a --- /dev/null +++ b/html/landing_ul/img/svg/building-wt.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/html/landing_ul/img/svg/case-24x24.svg b/html/landing_ul/img/svg/case-24x24.svg new file mode 100644 index 0000000..c53bcb7 --- /dev/null +++ b/html/landing_ul/img/svg/case-24x24.svg @@ -0,0 +1,3 @@ + + + diff --git a/html/landing_ul/img/svg/case-wt.svg b/html/landing_ul/img/svg/case-wt.svg new file mode 100644 index 0000000..6616d12 --- /dev/null +++ b/html/landing_ul/img/svg/case-wt.svg @@ -0,0 +1,3 @@ + + + diff --git a/html/landing_ul/img/svg/checklist-32x32.svg b/html/landing_ul/img/svg/checklist-32x32.svg new file mode 100644 index 0000000..636c87e --- /dev/null +++ b/html/landing_ul/img/svg/checklist-32x32.svg @@ -0,0 +1,4 @@ + + + + diff --git a/html/landing_ul/img/svg/clip-wt.svg b/html/landing_ul/img/svg/clip-wt.svg new file mode 100644 index 0000000..92d5751 --- /dev/null +++ b/html/landing_ul/img/svg/clip-wt.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/html/landing_ul/img/svg/clock-32x32.svg b/html/landing_ul/img/svg/clock-32x32.svg new file mode 100644 index 0000000..aa8dc19 --- /dev/null +++ b/html/landing_ul/img/svg/clock-32x32.svg @@ -0,0 +1,4 @@ + + + + diff --git a/html/landing_ul/img/svg/docs-24x24.svg b/html/landing_ul/img/svg/docs-24x24.svg new file mode 100644 index 0000000..2f5f23c --- /dev/null +++ b/html/landing_ul/img/svg/docs-24x24.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/html/landing_ul/img/svg/download-24x24.svg b/html/landing_ul/img/svg/download-24x24.svg new file mode 100644 index 0000000..322085c --- /dev/null +++ b/html/landing_ul/img/svg/download-24x24.svg @@ -0,0 +1,3 @@ + + + diff --git a/html/landing_ul/img/svg/esia-24x24.svg b/html/landing_ul/img/svg/esia-24x24.svg new file mode 100644 index 0000000..f6230e0 --- /dev/null +++ b/html/landing_ul/img/svg/esia-24x24.svg @@ -0,0 +1,4 @@ + + + + diff --git a/html/landing_ul/img/svg/fl.svg b/html/landing_ul/img/svg/fl.svg new file mode 100644 index 0000000..1ab6dfd --- /dev/null +++ b/html/landing_ul/img/svg/fl.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/html/landing_ul/img/svg/info-gr.svg b/html/landing_ul/img/svg/info-gr.svg new file mode 100644 index 0000000..66d332d --- /dev/null +++ b/html/landing_ul/img/svg/info-gr.svg @@ -0,0 +1,4 @@ + + + + diff --git a/html/landing_ul/img/svg/info.svg b/html/landing_ul/img/svg/info.svg new file mode 100644 index 0000000..597f706 --- /dev/null +++ b/html/landing_ul/img/svg/info.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/html/landing_ul/img/svg/mil-logo.svg b/html/landing_ul/img/svg/mil-logo.svg new file mode 100644 index 0000000..9964dc8 --- /dev/null +++ b/html/landing_ul/img/svg/mil-logo.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/html/landing_ul/img/svg/pers-wt.svg b/html/landing_ul/img/svg/pers-wt.svg new file mode 100644 index 0000000..48590ed --- /dev/null +++ b/html/landing_ul/img/svg/pers-wt.svg @@ -0,0 +1,3 @@ + + + diff --git a/html/landing_ul/img/svg/shield-wt.svg b/html/landing_ul/img/svg/shield-wt.svg new file mode 100644 index 0000000..68deefa --- /dev/null +++ b/html/landing_ul/img/svg/shield-wt.svg @@ -0,0 +1,3 @@ + + + diff --git a/html/landing_ul/img/svg/ul.svg b/html/landing_ul/img/svg/ul.svg new file mode 100644 index 0000000..2ebaa04 --- /dev/null +++ b/html/landing_ul/img/svg/ul.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/html/landing_ul/img/svg/user-24x24.svg b/html/landing_ul/img/svg/user-24x24.svg new file mode 100644 index 0000000..845b4ac --- /dev/null +++ b/html/landing_ul/img/svg/user-24x24.svg @@ -0,0 +1,4 @@ + + + + diff --git a/html/landing_ul/pdf/Инструкция_для_технических_специалистов.pdf b/html/landing_ul/pdf/Инструкция_для_технических_специалистов.pdf new file mode 100644 index 0000000..1e36c76 Binary files /dev/null and b/html/landing_ul/pdf/Инструкция_для_технических_специалистов.pdf differ diff --git a/html/landing_ul/pdf/Инструкция_по_добавлению_роли_сотруднику_в_ЕСИА.pdf b/html/landing_ul/pdf/Инструкция_по_добавлению_роли_сотруднику_в_ЕСИА.pdf new file mode 100644 index 0000000..ee2684b Binary files /dev/null and b/html/landing_ul/pdf/Инструкция_по_добавлению_роли_сотруднику_в_ЕСИА.pdf differ diff --git a/html/script/access-check.js b/html/script/access-check.js new file mode 100644 index 0000000..0124a28 --- /dev/null +++ b/html/script/access-check.js @@ -0,0 +1,94 @@ +function checkBrowser() { + const userAgent = navigator.userAgent; + return userAgent.includes("Chromium GOST") || userAgent.includes("YaBrowser"); +} + +function checkCsp(cspTimeout) { + let timeoutMillis; + if (cspTimeout) { + timeoutMillis = cspTimeout * 1000; + } + else { + timeoutMillis = 5000; + } + + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => { + reject(new Error('Истекло время ожидания загрузки плагина')); + }, timeoutMillis); + window.cadesplugin + .then(() => { + clearTimeout(timeout); + if (window.cadesplugin.CreateObjectAsync) { + return window.cadesplugin.CreateObjectAsync("CAdESCOM.About"); + } else { + return Promise.resolve(window.cadesplugin.CreateObject("CAdESCOM.About")); + } + }) + .then((oAbout) => { + if (!oAbout || !oAbout.CSPVersion) { + throw new Error('Не удалось создать объект CAdESCOM.About'); + } + return oAbout.CSPVersion(); + }) + .then((cspVersion) => { + return Promise.all([ + cspVersion.MajorVersion, + cspVersion.MinorVersion, + cspVersion.BuildVersion + ]); + }) + .then(([majorVersion, minorVersion, buildVersion]) => { + if (majorVersion === 5 && minorVersion === 0 && buildVersion >= 12000) { + resolve(true); + } else { + console.error( + `Версия CSP не подходит. Необходима версия 5.0.12000 и выше, текущая версия: ${majorVersion}.${minorVersion}.${buildVersion}` + ); + resolve(false); + } + }) + .catch((error) => { + console.error("Ошибка при получении версии CSP:", error); + clearTimeout(timeout); + resolve(false); + }); + }) + .catch((error) => { + console.error("Ошибка при проверке CSP:", error); + return false; + }); +} + +window.addEventListener('DOMContentLoaded', () => { + const browserCheckInfo = document.getElementById('browser-check-info'); + const loginButton = document.getElementById('login-button'); + const loginLink = document.getElementById('login-link'); + + const disableLogin = () => { + if (loginButton && loginLink) { + loginButton.href = ''; + loginLink.href = ''; + loginButton.classList.add('disabled'); + loginLink.classList.add('disabled-link'); + } + }; + + const browserPassed = checkBrowser(); + + if (browserPassed) { + checkCsp(5).then(cspCheckPassed => { + if (cspCheckPassed) { + if (browserCheckInfo) { + browserCheckInfo.hidden = true; + } + } else { + if (loginButton) { + disableLogin(); + } + } + }); + } else { + disableLogin(); + } +}); \ No newline at end of file diff --git a/html/script/cadesplugin_api.js b/html/script/cadesplugin_api.js new file mode 100644 index 0000000..74dafb9 --- /dev/null +++ b/html/script/cadesplugin_api.js @@ -0,0 +1,761 @@ +if (typeof window !== 'undefined') { + window.cadesplugin_skip_extension_install = true; +} + +/* eslint-disable */ +(function () { + //already loaded + if (window.cadesplugin) return; + + var pluginObject; + var plugin_resolved = 0; + var plugin_reject; + var plugin_resolve; + var isOpera = 0; + var isFireFox = 0; + var isEdge = 0; + var failed_extensions = 0; + + var canPromise = !!window.Promise; + var cadesplugin; + + if (canPromise) { + cadesplugin = new Promise(function (resolve, reject) { + plugin_resolve = resolve; + plugin_reject = reject; + }); + } else { + cadesplugin = {}; + } + + function check_browser() { + var ua = navigator.userAgent, + tem, + M = + ua.match( + /(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i, + ) || []; + if (/trident/i.test(M[1])) { + tem = /\brv[ :]+(\d+)/g.exec(ua) || []; + return { + name: 'IE', + version: tem[1] || '', + }; + } + if (M[1] === 'Chrome') { + tem = ua.match(/\b(OPR|Edge)\/(\d+)/); + if (tem != null) + return { + name: tem[1].replace('OPR', 'Opera'), + version: tem[2], + }; + } + M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?']; + if ((tem = ua.match(/version\/(\d+)/i)) != null) M.splice(1, 1, tem[1]); + return { + name: M[0], + version: M[1], + }; + } + var browserSpecs = check_browser(); + + function cpcsp_console_log(level, msg) { + //IE9 не может писать в консоль если не открыта вкладка developer tools + if (typeof console === 'undefined') return; + if (level <= cadesplugin.current_log_level) { + if (level === cadesplugin.LOG_LEVEL_DEBUG) console.log('DEBUG: %s', msg); + if (level === cadesplugin.LOG_LEVEL_INFO) console.info('INFO: %s', msg); + if (level === cadesplugin.LOG_LEVEL_ERROR) + console.error('ERROR: %s', msg); + return; + } + } + + function set_log_level(level) { + if ( + !( + level === cadesplugin.LOG_LEVEL_DEBUG || + level === cadesplugin.LOG_LEVEL_INFO || + level === cadesplugin.LOG_LEVEL_ERROR + ) + ) { + cpcsp_console_log( + cadesplugin.LOG_LEVEL_ERROR, + 'cadesplugin_api.js: Incorrect log_level: ' + level, + ); + return; + } + cadesplugin.current_log_level = level; + if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG) + cpcsp_console_log( + cadesplugin.LOG_LEVEL_INFO, + 'cadesplugin_api.js: log_level = DEBUG', + ); + if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO) + cpcsp_console_log( + cadesplugin.LOG_LEVEL_INFO, + 'cadesplugin_api.js: log_level = INFO', + ); + if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR) + cpcsp_console_log( + cadesplugin.LOG_LEVEL_INFO, + 'cadesplugin_api.js: log_level = ERROR', + ); + if (isNativeMessageSupported()) { + if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG) + window.postMessage('set_log_level=debug', '*'); + if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO) + window.postMessage('set_log_level=info', '*'); + if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR) + window.postMessage('set_log_level=error', '*'); + } + } + + function set_constantValues() { + cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1; + cadesplugin.CAPICOM_CURRENT_USER_STORE = 2; + cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1; + cadesplugin.CADESCOM_CURRENT_USER_STORE = 2; + cadesplugin.CADESCOM_CONTAINER_STORE = 100; + + cadesplugin.CAPICOM_MY_STORE = 'My'; + + cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2; + + cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1; + + cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0; + cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1; + cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2; + + cadesplugin.XmlDsigGost3410UrlObsolete = + 'http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411'; + cadesplugin.XmlDsigGost3411UrlObsolete = + 'http://www.w3.org/2001/04/xmldsig-more#gostr3411'; + cadesplugin.XmlDsigGost3410Url = + 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411'; + cadesplugin.XmlDsigGost3411Url = + 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411'; + + cadesplugin.CADESCOM_CADES_DEFAULT = 0; + cadesplugin.CADESCOM_CADES_BES = 1; + cadesplugin.CADESCOM_CADES_T = 0x5; + cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d; + + cadesplugin.CADESCOM_ENCODE_BASE64 = 0; + cadesplugin.CADESCOM_ENCODE_BINARY = 1; + cadesplugin.CADESCOM_ENCODE_ANY = -1; + + cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0; + cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1; + cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2; + + cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0; + cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1; + + cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0; + cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1; + cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2; + cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3; + cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4; + cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5; + cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6; + cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7; + cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8; + cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9; + cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10; + cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11; + cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12; + + cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128; + + cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9; + + cadesplugin.CAPICOM_OID_OTHER = 0; + cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10; + + cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2; + cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5; + cadesplugin.CAPICOM_EKU_OTHER = 0; + + cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0; + cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1; + cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2; + cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1; + + cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0; + cadesplugin.CADESCOM_BASE64_TO_BINARY = 1; + + cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0; + cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1; + cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2; + + cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0; + cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1; + cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2; + cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3; + cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4; + cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25; + + cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0; + cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1; + cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2; + cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3; + cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4; + cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5; + cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6; + cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100; + cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101; + cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102; + + cadesplugin.LOG_LEVEL_DEBUG = 4; + cadesplugin.LOG_LEVEL_INFO = 2; + cadesplugin.LOG_LEVEL_ERROR = 1; + + cadesplugin.CADESCOM_AllowNone = 0; + cadesplugin.CADESCOM_AllowNoOutstandingRequest = 0x1; + cadesplugin.CADESCOM_AllowUntrustedCertificate = 0x2; + cadesplugin.CADESCOM_AllowUntrustedRoot = 0x4; + cadesplugin.CADESCOM_SkipInstallToStore = 0x10000000; + } + + function async_spawn(generatorFunc) { + function continuer(verb, arg) { + var result; + try { + result = generator[verb](arg); + } catch (err) { + return Promise.reject(err); + } + if (result.done) { + return result.value; + } else { + return Promise.resolve(result.value).then(onFulfilled, onRejected); + } + } + var generator = generatorFunc(Array.prototype.slice.call(arguments, 1)); + var onFulfilled = continuer.bind(continuer, 'next'); + var onRejected = continuer.bind(continuer, 'throw'); + return onFulfilled(); + } + + function isIE() { + // var retVal = (("Microsoft Internet Explorer" === navigator.appName) || // IE < 11 + // navigator.userAgent.match(/Trident\/./i)); // IE 11 + return browserSpecs.name === 'IE' || browserSpecs.name === 'MSIE'; + } + + function isIOS() { + var retVal = + navigator.userAgent.match(/ipod/i) || + navigator.userAgent.match(/ipad/i) || + navigator.userAgent.match(/iphone/i); + return retVal; + } + + function isNativeMessageSupported() { + // В IE работаем через NPAPI + if (isIE()) return false; + // В Edge работаем через NativeMessage + if (browserSpecs.name === 'Edge') { + isEdge = true; + return true; + } + // В Chrome, Firefox и Opera работаем через асинхронную версию в зависимости от версии + if (browserSpecs.name === 'Opera') { + isOpera = true; + if (browserSpecs.version >= 33) { + return true; + } else { + return false; + } + } + if (browserSpecs.name === 'Firefox') { + isFireFox = true; + if (browserSpecs.version >= 52) { + return true; + } else { + return false; + } + } + if (browserSpecs.name === 'Chrome') { + if (browserSpecs.version >= 42) { + return true; + } else { + return false; + } + } + } + + // Функция активации объектов КриптоПро ЭЦП Browser plug-in + function CreateObject(name) { + if (isIOS()) { + // На iOS для создания объектов используется функция + // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js + return call_ru_cryptopro_npcades_10_native_bridge('CreateObject', [name]); + } + if (isIE()) { + // В Internet Explorer создаются COM-объекты + if (name.match(/X509Enrollment/i)) { + try { + // Объекты CertEnroll создаются через CX509EnrollmentWebClassFactory + var objCertEnrollClassFactory = document.getElementById( + 'certEnrollClassFactory', + ); + return objCertEnrollClassFactory.CreateObject(name); + } catch (e) { + throw 'Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS'; + } + } + // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory + try { + var objWebClassFactory = document.getElementById('webClassFactory'); + return objWebClassFactory.CreateObject(name); + } catch (e) { + // Для версий плагина ниже 2.0.12538 + return new ActiveXObject(name); // eslint-disable-line no-undef + } + } + // создаются объекты NPAPI + return pluginObject.CreateObject(name); + } + + function decimalToHexString(number) { + if (number < 0) { + number = 0xffffffff + number + 1; + } + + return number.toString(16).toUpperCase(); + } + + function GetMessageFromException(e) { + var err = e.message; + if (!err) { + err = e; + } else if (e.number) { + err += ' (0x' + decimalToHexString(e.number) + ')'; + } + return err; + } + + function getLastError(exception) { + if (isNativeMessageSupported() || isIE() || isIOS()) { + return GetMessageFromException(exception); + } + + try { + return pluginObject.getLastError(); + } catch (e) { + return GetMessageFromException(exception); + } + } + + // Функция для удаления созданных объектов + function ReleasePluginObjects() { + return cpcsp_chrome_nmcades.ReleasePluginObjects(); // eslint-disable-line no-undef + } + + // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in + function CreateObjectAsync(name) { + return pluginObject.CreateObjectAsync(name); + } + + //Функции для IOS + var ru_cryptopro_npcades_10_native_bridge = { + callbacksCount: 1, + callbacks: {}, + + // Automatically called by native layer when a result is available + resultForCallback: function resultForCallback(callbackId, resultArray) { + var callback = + ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId]; + if (!callback) return; + callback.apply(null, resultArray); + }, + + // Use this in javascript to request native objective-c code + // functionName : string (I think the name is explicit :p) + // args : array of arguments + // callback : function with n-arguments that is going to be called when the native code returned + call: function call(functionName, args, callback) { + var hasCallback = callback && typeof callback === 'function'; + var callbackId = hasCallback + ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ + : 0; + + if (hasCallback) + ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback; + + var iframe = document.createElement('IFRAME'); + var arrObjs = new Array('_CPNP_handle'); + try { + iframe.setAttribute( + 'src', + 'cpnp-js-call:' + + functionName + + ':' + + callbackId + + ':' + + encodeURIComponent(JSON.stringify(args, arrObjs)), + ); + } catch (e) { + alert(e); + } + document.documentElement.appendChild(iframe); + iframe.parentNode.removeChild(iframe); + iframe = null; + }, + }; + + function call_ru_cryptopro_npcades_10_native_bridge(functionName, array) { + var tmpobj; + var ex; + ru_cryptopro_npcades_10_native_bridge.call( + functionName, + array, + function (e, response) { + ex = e; + var str = 'tmpobj=' + response; + eval(str); + if (typeof tmpobj === 'string') { + tmpobj = tmpobj.replace(/\\\n/gm, '\n'); + tmpobj = tmpobj.replace(/\\\r/gm, '\r'); + } + }, + ); + if (ex) throw ex; + return tmpobj; + } + + function show_firefox_missing_extension_dialog() { + if (!window.cadesplugin_skip_extension_install) { + var ovr = document.createElement('div'); + ovr.id = 'cadesplugin_ovr'; + ovr.style = + 'visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)'; + ovr.innerHTML = + "
" + + "" + + '

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.' + + "

Скачать расширение

" + + '
'; + document.getElementsByTagName('Body')[0].appendChild(ovr); + document + .getElementById('cadesplugin_close_install') + .addEventListener('click', function () { + plugin_loaded_error('Плагин недоступен'); + document.getElementById('cadesplugin_ovr').style.visibility = + 'hidden'; + }); + + ovr.addEventListener('click', function () { + plugin_loaded_error('Плагин недоступен'); + document.getElementById('cadesplugin_ovr').style.visibility = 'hidden'; + }); + ovr.style.visibility = 'visible'; + } + } + + //Выводим окно поверх других с предложением установить расширение для Opera. + //Если установленна переменная cadesplugin_skip_extension_install - не предлагаем установить расширение + function install_opera_extension() { + if (!window.cadesplugin_skip_extension_install) { + document.addEventListener('DOMContentLoaded', function () { + var ovr = document.createElement('div'); + ovr.id = 'cadesplugin_ovr'; + ovr.style = + 'visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)'; + ovr.innerHTML = + "
" + + "" + + '

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо установить расширение из каталога дополнений Opera.' + + "

" + + '
'; + document.getElementsByTagName('Body')[0].appendChild(ovr); + var btn_install = document.getElementById('cadesplugin_install'); + btn_install.addEventListener('click', function (event) { + // eslint-disable-next-line no-undef + opr.addons.installExtension( + 'epebfcehmdedogndhlcacafjaacknbcm', // eslint-disable-line no-undef + function () { + document.getElementById('cadesplugin_ovr').style.visibility = + 'hidden'; + location.reload(); // eslint-disable-line no-restricted-globals + }, + function () {}, + ); + }); + document + .getElementById('cadesplugin_close_install') + .addEventListener('click', function () { + plugin_loaded_error('Плагин недоступен'); + document.getElementById('cadesplugin_ovr').style.visibility = + 'hidden'; + }); + + ovr.addEventListener('click', function () { + plugin_loaded_error('Плагин недоступен'); + document.getElementById('cadesplugin_ovr').style.visibility = + 'hidden'; + }); + ovr.style.visibility = 'visible'; + document + .getElementById('cadesplugin_ovr_item') + .addEventListener('click', function (e) { + e.stopPropagation(); + }); + }); + } else { + plugin_loaded_error('Плагин недоступен'); + } + } + + function firefox_or_edge_nmcades_onload() { + cpcsp_chrome_nmcades.check_chrome_plugin( + plugin_loaded, + plugin_loaded_error, + ); // eslint-disable-line no-undef + } + + function nmcades_api_onload() { + window.postMessage('cadesplugin_echo_request', '*'); + window.addEventListener( + 'message', + function (event) { + if ( + typeof event.data !== 'string' || + !event.data.match('cadesplugin_loaded') + ) + return; + if (isFireFox || isEdge) { + // Для Firefox вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js + var url = event.data.substring(event.data.indexOf('url:') + 4); + var fileref = document.createElement('script'); + fileref.setAttribute('type', 'text/javascript'); + fileref.setAttribute('src', url); + fileref.onerror = plugin_loaded_error; + fileref.onload = firefox_or_edge_nmcades_onload; + document.getElementsByTagName('head')[0].appendChild(fileref); + // Для Firefox и Edge у нас только по одному расширению. + failed_extensions++; + } else { + cpcsp_chrome_nmcades.check_chrome_plugin( + plugin_loaded, + plugin_loaded_error, + ); // eslint-disable-line no-undef + } + }, + false, + ); + } + + //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge + function load_extension() { + if (isFireFox || isEdge) { + // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера. + nmcades_api_onload(); + return; + } else { + // в асинхронном варианте для chrome и opera подключаем оба расширения + var fileref = document.createElement('script'); + fileref.setAttribute('type', 'text/javascript'); + fileref.setAttribute( + 'src', + 'chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js', + ); + fileref.onerror = plugin_loaded_error; + fileref.onload = nmcades_api_onload; + document.getElementsByTagName('head')[0].appendChild(fileref); + fileref = document.createElement('script'); + fileref.setAttribute('type', 'text/javascript'); + fileref.setAttribute( + 'src', + 'chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js', + ); + fileref.onerror = plugin_loaded_error; + fileref.onload = nmcades_api_onload; + document.getElementsByTagName('head')[0].appendChild(fileref); + } + } + + //Загружаем плагин для NPAPI + function load_npapi_plugin() { + var elem = document.createElement('object'); + elem.setAttribute('id', 'cadesplugin_object'); + elem.setAttribute('type', 'application/x-cades'); + elem.setAttribute('style', 'visibility: hidden'); + document.getElementsByTagName('body')[0].appendChild(elem); + pluginObject = document.getElementById('cadesplugin_object'); + if (isIE()) { + var elem1 = document.createElement('object'); + elem1.setAttribute('id', 'certEnrollClassFactory'); + elem1.setAttribute( + 'classid', + 'clsid:884e2049-217d-11da-b2a4-000e7bbb2b09', + ); + elem1.setAttribute('style', 'visibility: hidden'); + document.getElementsByTagName('body')[0].appendChild(elem1); + var elem2 = document.createElement('object'); + elem2.setAttribute('id', 'webClassFactory'); + elem2.setAttribute( + 'classid', + 'clsid:B04C8637-10BD-484E-B0DA-B8A039F60024', + ); + elem2.setAttribute('style', 'visibility: hidden'); + document.getElementsByTagName('body')[0].appendChild(elem2); + } + } + + //Отправляем событие что все ок. + function plugin_loaded() { + plugin_resolved = 1; + if (canPromise) { + plugin_resolve(); + } else { + window.postMessage('cadesplugin_loaded', '*'); + } + } + + //Отправляем событие что сломались. + function plugin_loaded_error(msg, noThrow) { + if (isNativeMessageSupported()) { + //в асинхронном варианте подключаем оба расширения, если сломались оба пробуем установить для Opera + failed_extensions++; + if (failed_extensions < 2) return; + if (isOpera && (typeof msg === 'undefined' || typeof msg === 'object')) { + install_opera_extension(); + return; + } + } + if (typeof msg === 'undefined' || typeof msg === 'object') + msg = 'Плагин недоступен'; + plugin_resolved = 1; + if (canPromise) { + if(noThrow) { + console.error(msg) + } else { + plugin_reject(msg); + } + } else { + window.postMessage('cadesplugin_load_error', '*'); + } + } + + //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку + function check_load_timeout() { + if (plugin_resolved === 1) return; + if (isFireFox) { + show_firefox_missing_extension_dialog(); + } + plugin_resolved = 1; + if (canPromise) { + plugin_reject('Истекло время ожидания загрузки плагина'); + } else { + window.postMessage('cadesplugin_load_error', '*'); + } + } + + //Вспомогательная функция для NPAPI + function createPromise(arg) { + return new Promise(arg); + } + + function check_npapi_plugin() { + try { + var oAbout = CreateObject('CAdESCOM.About'); + plugin_loaded(); + } catch (err) { + document.getElementById('cadesplugin_object').style.display = 'none'; + // Объект создать не удалось, проверим, установлен ли + // вообще плагин. Такая возможность есть не во всех браузерах + var mimetype = + navigator.mimeTypes && navigator.mimeTypes['application/x-cades']; + if (mimetype) { + var plugin = mimetype.enabledPlugin; + if (plugin) { + plugin_loaded_error('Плагин загружен, но не создаются обьекты'); + } else { + plugin_loaded_error('Ошибка при загрузке плагина'); + } + } else { + plugin_loaded_error('Плагин недоступен', true); + } + } + } + + //Проверяем работает ли плагин + function check_plugin_working() { + var div = document.createElement('div'); + div.innerHTML = ''; + var isIeLessThan9 = div.getElementsByTagName('iecheck').length === 1; + if (isIeLessThan9) { + plugin_loaded_error( + 'Internet Explorer версии 8 и ниже не поддерживается', + ); + return; + } + + if (isNativeMessageSupported()) { + load_extension(); + } else if (!canPromise) { + window.addEventListener( + 'message', + function (event) { + if (event.data !== 'cadesplugin_echo_request') return; + load_npapi_plugin(); + check_npapi_plugin(); + }, + false, + ); + } else { + if (document.readyState === 'complete') { + load_npapi_plugin(); + check_npapi_plugin(); + } else { + window.addEventListener( + 'load', + function (event) { + load_npapi_plugin(); + check_npapi_plugin(); + }, + false, + ); + } + } + } + + function set_pluginObject(obj) { + pluginObject = obj; + } + + //Export + cadesplugin.JSModuleVersion = '2.1.1'; + cadesplugin.async_spawn = async_spawn; + cadesplugin.set = set_pluginObject; + cadesplugin.set_log_level = set_log_level; + cadesplugin.getLastError = getLastError; + + if (isNativeMessageSupported()) { + cadesplugin.CreateObjectAsync = CreateObjectAsync; + cadesplugin.ReleasePluginObjects = ReleasePluginObjects; + } + + if (!isNativeMessageSupported()) { + cadesplugin.CreateObject = CreateObject; + } + + if (window.cadesplugin_load_timeout) { + setTimeout(check_load_timeout, window.cadesplugin_load_timeout); + } else { + setTimeout(check_load_timeout, 20000); + } + + set_constantValues(); + + cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR; + window.cadesplugin = cadesplugin; + check_plugin_working(); + + return cadesplugin; +})(); +module.exports = cadesplugin; \ No newline at end of file diff --git a/readme.md b/readme.md index 59a9612..c72d40b 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,6 @@ ## Конфигурация * LKRP_UL_URL - ссылка на личный кабинет юридического лица -* LKRP_UL_LANDING - ссылка на главную страницу личного кабинета юридического лица * LKRP_FL_URL - ссылка на личный кабинет физического лица * LKRP_FL_LANDING - ссылка на главную страницу личного кабинета физического лица * LKRP_CRT_CHECK_URL - ссылка на ресурс с сертификатом, необходим для отображения уведомления установки сертификата для пользователя (обязательно должен обращаться по протоколу https) \ No newline at end of file