Browse Source

Merge pull request #560 from mzaini30/dev

Update the version of Vue Inspector Agnostic because the previous ver…
Ahmad Kholid 3 years ago
parent
commit
38afae4dd7
2 changed files with 28 additions and 0 deletions
  1. 10 0
      src/assets/svg/logoFirefox.svg
  2. 18 0
      src/newtab/App.vue

+ 10 - 0
src/assets/svg/logoFirefox.svg

@@ -0,0 +1,10 @@
+<svg width="600" height="600" viewBox="0 0 600 600" fill="none" xmlns="http://www.w3.org/2000/svg">
+	<rect x="53" y="58" width="452" height="452" rx="80" stroke="context-fill" stroke-width="30" stroke-linejoin="round"/>
+
+	<g fill-rule='evenodd' fill='context-fill'>
+		<path d="
+			M175 90h292A80 80 0 0 1 547 170v292A80 80 0 0 1 467 542h-292A80 80 0 0 1 95 462v-292A80 80 0 0 1 175 90M95 90M321 316
+			M293.667 220.666C304.723 198.554 336.277 198.554 347.333 220.666L432.308 390.616C444.814 415.628 419.067 443.212 392.87 433.428C363.012 422.277 332.936 412.348 320.5 412.348C308.064 412.348 277.988 422.277 248.13 433.428C221.933 443.212 196.186 415.628 208.692 390.616L293.667 220.666Z
+		" rx="80"/>
+	</g>
+</svg>

+ 18 - 0
src/newtab/App.vue

@@ -1,4 +1,8 @@
 <template>
+  <!-- <Head>
+    <link rel="icon" :href="icon" />
+  </Head> -->
+
   <template v-if="retrieved">
     <app-sidebar />
     <main class="pl-16">
@@ -80,6 +84,8 @@
   </ui-card>
 </template>
 <script setup>
+import iconFirefox from '@/assets/svg/logoFirefox.svg';
+import iconChrome from '@/assets/svg/logo.svg';
 import { ref, shallowReactive, computed } from 'vue';
 import { useStore } from 'vuex';
 import { useI18n } from 'vue-i18n';
@@ -95,6 +101,18 @@ import Workflow from '@/models/workflow';
 import AppSidebar from '@/components/newtab/app/AppSidebar.vue';
 import dataMigration from '@/utils/dataMigration';
 
+let icon;
+if (window.location.protocol === 'moz-extension:') {
+  icon = iconFirefox;
+} else {
+  icon = iconChrome;
+}
+
+const iconElement = document.createElement('link');
+iconElement.rel = 'icon';
+iconElement.href = icon;
+document.head.appendChild(iconElement);
+
 const { t } = useI18n();
 const store = useStore();
 const theme = useTheme();