diff --git a/Web/static/css/style.css b/Web/static/css/style.css index deafd2ad..42783603 100644 --- a/Web/static/css/style.css +++ b/Web/static/css/style.css @@ -2216,6 +2216,17 @@ a.poll-retract-vote { border-radius: 1px; } +.client_app > img { + top: 3px; + position: relative; +} + +.client_app.client_app_titlebar > img { + top: 2px; + position: relative; + filter: invert(100%) sepia(100%) saturate(800%) hue-rotate(2deg) brightness(130%) contrast(50.1%); +} + @keyframes appearing { from { opacity: 0; diff --git a/Web/static/img/app_icons/.DS_Store b/Web/static/img/app_icons/.DS_Store new file mode 100644 index 00000000..ba9eb777 Binary files /dev/null and b/Web/static/img/app_icons/.DS_Store differ diff --git a/Web/static/img/app_icons/openvk_legacy.png b/Web/static/img/app_icons/openvk_legacy.png new file mode 100644 index 00000000..05995a40 Binary files /dev/null and b/Web/static/img/app_icons/openvk_legacy.png differ diff --git a/Web/static/img/app_icons/vk4me.png b/Web/static/img/app_icons/vk4me.png new file mode 100644 index 00000000..2d51b710 Binary files /dev/null and b/Web/static/img/app_icons/vk4me.png differ diff --git a/Web/static/img/app_icons_mini/android.svg b/Web/static/img/app_icons_mini/android.svg new file mode 100755 index 00000000..d674718f --- /dev/null +++ b/Web/static/img/app_icons_mini/android.svg @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Web/static/img/app_icons_mini/api.svg b/Web/static/img/app_icons_mini/api.svg new file mode 100755 index 00000000..09b9f1b5 --- /dev/null +++ b/Web/static/img/app_icons_mini/api.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + diff --git a/Web/static/img/app_icons_mini/iphone.svg b/Web/static/img/app_icons_mini/iphone.svg new file mode 100755 index 00000000..906837c7 --- /dev/null +++ b/Web/static/img/app_icons_mini/iphone.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + diff --git a/Web/static/img/app_icons_mini/mobile.svg b/Web/static/img/app_icons_mini/mobile.svg new file mode 100755 index 00000000..88d6417f --- /dev/null +++ b/Web/static/img/app_icons_mini/mobile.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index bee1bb1f..fb3f8520 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -122,3 +122,70 @@ u("#write > form").on("keydown", function(event) { if(event.ctrlKey && event.keyCode === 13) this.submit(); }); + +var tooltipClientTemplate = Handlebars.compile(` + + + + + + +
+ + + + {{app_tr}}: {{name}} +
+ Подробнее +
+`); + +var tooltipClientNoInfoTemplate = Handlebars.compile(` + + + + +
+ + {{app_tr}}: {{name}} +
+
+`); + +tippy(".client_app", { + theme: "light vk", + content: "⌛", + allowHTML: true, + interactive: true, + interactiveDebounce: 500, + + onCreate: async function(that) { + that._resolvedClient = null; + }, + + onShow: async function(that) { + let client_tag = that.reference.dataset.appTag; + let client_name = that.reference.dataset.appName; + let client_url = that.reference.dataset.appUrl; + let client_img = that.reference.dataset.appImg; + + if(client_name != "") { + let res = { + 'name': client_name, + 'url': client_url, + 'img': client_img, + 'app_tr': tr("app") + }; + + that.setContent(tooltipClientTemplate(res)); + } else { + let res = { + 'name': client_tag, + 'app_tr': tr("app") + }; + + that.setContent(tooltipClientNoInfoTemplate(res)); + } + } +}); + diff --git a/data/clients.xml b/data/clients.xml new file mode 100644 index 00000000..44373e40 --- /dev/null +++ b/data/clients.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/install/sqls/00036-platforms.sql b/install/sqls/00036-platforms.sql new file mode 100755 index 00000000..67c9340e --- /dev/null +++ b/install/sqls/00036-platforms.sql @@ -0,0 +1,8 @@ +ALTER TABLE `profiles` + ADD COLUMN `client_name` TEXT NULL DEFAULT NULL AFTER `backdrop_2`; + +ALTER TABLE `posts` + ADD COLUMN `api_source_name` TEXT NULL DEFAULT NULL AFTER `anonymous`; + +ALTER TABLE `api_tokens` + ADD COLUMN `platform` TEXT NULL DEFAULT NULL AFTER `deleted`;