Browse Source

fix: remove ignoreGrant option

Gerald 8 years ago
parent
commit
7d9e9c0b64

+ 2 - 0
src/_locales/cs/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: Varování
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: 'Skript [$1] nemá žádné ‚@grant‘ řádky! Klikněte pro více podprobností.'
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: Jméno skriptu nebylo určeno.

+ 2 - 0
src/_locales/de/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: Warnung
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: 'Das Skript [$1] hat keinen Eintrag für `@grant`! Für mehr Details klicken.'
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: Kein Name

+ 2 - 0
src/_locales/en/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: Warning
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: 'Script [$1] has no `@grant` lines! Click to see more details.'
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: No Name

+ 2 - 0
src/_locales/es/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: Advertencia
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: '¡Script [$1] no tiene lineas `@grant`! Haga clic para ver mas detalles.'
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: Sin nombre

+ 2 - 0
src/_locales/id/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: Peringatan
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: 'Skrip [$1] tidak memiliki baris `@grant`! Klik untuk melihat lebih rinci.'
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: Tanpa nama

+ 2 - 0
src/_locales/ja/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: 警告
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: スクリプト「$1」には @grant が記述された行がありません! 詳細を見るにはクリックしてください。
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: 名前なし

+ 2 - 0
src/_locales/pl/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: Warning
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: 'Script [$1] has no `@grant` lines! Click to see more details.'
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: Bez nazwy

+ 2 - 0
src/_locales/ro/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: Atenție
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: 'Scriptul [$1] nu are linii `@grant`! Dați clic pentru detalii.'
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: Fără nume

+ 2 - 0
src/_locales/ru/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: Предупреждение
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: 'У скрипта [$1] отсутствует поле `@grant`! Кликните для подробностей.'
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: Новый скрипт

+ 2 - 0
src/_locales/sr/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: Упозорење
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: 'Скрипта [$1] нема `@grant` линије! Кликните за више детаља.'
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: Без имена

+ 2 - 0
src/_locales/vi/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: Cảnh báo
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: 'Script [$1] thiếu thuộc tính `@grant`! Bấm để xem chi tiết.'
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: Không có tên

+ 2 - 0
src/_locales/zh/messages.yml

@@ -16,9 +16,11 @@ msgInstalled:
 Warning:
   description: Show warnings with a notification.
   message: 警告
+  touched: false
 msgWarnGrant:
   description: Message shown when `@grant` is not found in a script.
   message: 脚本【$1】没有`@grant`行!点击查看更多信息。
+  touched: false
 labelNoName:
   description: Text as the name of a script when no @name is assigned.
   message: 名字为空

+ 1 - 10
src/background/app.js

@@ -2,7 +2,7 @@ import 'src/common/browser';
 import { i18n, defaultImage } from 'src/common';
 import * as sync from './sync';
 import {
-  notify, cache, vmdb,
+  cache, vmdb,
   getRequestId, httpRequest, abortRequest, confirmInstall,
   newScript, parseMeta,
   setClipboard, checkUpdate,
@@ -121,15 +121,6 @@ const commands = {
   Vacuum: vmdb.vacuum,
   ParseScript(data) {
     return vmdb.parseScript(data).then(res => {
-      const { meta } = res.data;
-      if (!meta.grant.length && !getOption('ignoreGrant')) {
-        notify({
-          id: 'VM-NoGrantWarning',
-          title: i18n('Warning'),
-          body: i18n('msgWarnGrant', [meta.name || i18n('labelNoName')]),
-          isClickable: true,
-        });
-      }
       browser.runtime.sendMessage(res);
       sync.sync();
       return res.data;

+ 1 - 1
src/background/utils/options.js

@@ -4,7 +4,7 @@ import storage from 'localStorage';   // eslint-disable-line import/no-extraneou
 const defaults = {
   isApplied: true,
   autoUpdate: true,
-  ignoreGrant: false,
+  // ignoreGrant: false,
   lastUpdate: 0,
   showBadge: true,
   exportValues: true,

+ 2 - 0
src/options/views/tab-settings/index.vue

@@ -15,12 +15,14 @@
           <span v-text="i18n('labelShowBadge')"></span>
         </label>
       </div>
+      <!--
       <div class="mb-1">
         <label>
           <input type=checkbox v-setting="'ignoreGrant'">
           <span v-text="i18n('labelIgnoreGrant')"></span>
         </label>
       </div>
+      -->
       <div class="mb-1">
         <label>
           <input type=checkbox v-setting="'autoReload'">