From f78d150bdb6af6b9fdbe69141ca0f19305303983 Mon Sep 17 00:00:00 2001 From: Pramjeet Ahlawat Date: Mon, 27 Mar 2017 02:22:12 +0530 Subject: [PATCH] modal added to tell what's new in an update --- app.css | 59 +++++++++++++++++++++++++++-- app.html | 103 +++++++++++++++++++++++++++----------------------- app.js | 30 +++++++++++++++ manifest.json | 2 +- 4 files changed, 143 insertions(+), 51 deletions(-) diff --git a/app.css b/app.css index 2a56175..ddf7b3b 100644 --- a/app.css +++ b/app.css @@ -1,4 +1,5 @@ -html, body { +html, +body { margin: 0; font-family: 'Rubik', sans-serif; overflow: hidden; @@ -253,7 +254,7 @@ html, body { .tab.active { /*border-color: #2e7fb9;*/ - background: rgba(46, 127, 185, 0.04); + background: rgba(46, 127, 185, 0.04); /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); */ color: #2e7fb9; } @@ -278,7 +279,6 @@ html, body { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - vertical-align: middle; } .highlight { @@ -307,4 +307,57 @@ html, body { .tab.active .close-icon { display: block; +} + +#announcement-container { + position: absolute; + width: 100%; + bottom: 0; + padding: 0; + background: #d3eae0; + box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.2); + transform: translateY(100%); + transition: 0.3s; +} + +#announcement_header { + height: 40px; + border-bottom: 1px solid #cacaca; + width: 100%; + display: flex; + align-items: center; +} + +#announcement-title { + margin: 0; + flex: 1; + padding: 10px 10px 10px 15px; +} + +#announcement-close-icon { + width: 15px; + background: #e05454; + border-radius: 50%; + margin-right: 10px; + padding: 2px; + cursor: pointer; +} + +#announcement-body { + padding: 10px; +} + +#announcement-list { + margin: 0; + padding-left: 20px; +} + +#announcement-list li { + font-size: 13px; + margin-bottom: 6px; + color: #00733d; +} + +#announcement-container.visible { + transform: translateY(0) } \ No newline at end of file diff --git a/app.html b/app.html index c753d51..63557be 100644 --- a/app.html +++ b/app.html @@ -1,71 +1,80 @@ + Peek a tab + -
+
-
-
- - -
+
+
+ + +
-
-
-
- -
+
+
+
+ +
-
+
-
- -

Change Tab on hover, single click to shift to the tab and close tabs - list.

-
+
+ +

Change Tab on hover, single click to shift to the tab and close tabs list. +

+
-
- -

Shift to the tab and close tabs list with a single click.

-
+
+ +

Shift to the tab and close tabs list with a single click.

+
+ +
+ +

Change Tab on click, double click to shift to the tab and close tabs list.

+
-
- -

Change Tab on click, double click to shift to the tab and close - tabs list.

+ + + + + + + + + + +
+
+
- - - - - - +
    +
- - - - +
+
+

What's New

+ +
+
+
    +
  • Close tab with 'delete' and 'backspace' keys
  • +
  • Better keyboard navigation
  • +
  • This awesome area to tell about what's new in an update ;)
  • +
- -
    - -
-
- + + \ No newline at end of file diff --git a/app.js b/app.js index 7d40306..751ea16 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,9 @@ /** * Created by pramj on 1/9/2017. */ + +const THIS_VERSION = '1.5.4' + document.addEventListener('DOMContentLoaded', function () { var activeWindowId = window.initialWindowId @@ -368,4 +371,31 @@ document.addEventListener('DOMContentLoaded', function () { populateTabs() + + // anoouncements related stuff + let announcementEl = document.getElementById('announcement-container') + let announcementCloseIconEl = document.getElementById('announcement-close-icon') + function showAnnouncement() { + announcementEl.classList.add('visible') + } + + function hideAnnouncement() { + announcementEl.classList.remove('visible') + } + + chrome.storage.sync.get(null, function (items) { + if (items.announcementShowedForVersion != THIS_VERSION) { + setTimeout(function () { + showAnnouncement() + }, 300) + + announcementCloseIconEl.addEventListener('click', function () { + hideAnnouncement() + + chrome.storage.sync.set({ + announcementShowedForVersion: THIS_VERSION + }) + }) + } + }) }) diff --git a/manifest.json b/manifest.json index d13d59d..e9f6cb1 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Peek-a-tab, Tabs Manager for Google Chrome™", "description": "Search, preview, jump across, and close tabs quickly in your chrome browser.", - "version": "1.5.3", + "version": "1.5.4", "icons": { "128": "icon_128.png" },