Skip to content

Commit 61d5758

Browse files
committed
💄 Make FavoriteCreator firefox friendly
1 parent 316d52f commit 61d5758

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

resources/js/components/FavoriteCreator.vue

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,13 @@
66
<svg-icon name="pin"></svg-icon>
77
</button>
88
</template>
9-
<div>
10-
<div class="flex justify-between text-center">
11-
<h6 class="whitespace-no-wrap cursor-pointer py-1 px-2 border-r" :class="{'border-b bg-grey-10': ! showingPinTab }" @click="showingPinTab = true">
12-
{{ __('Pin to Favorites') }}
13-
</h6>
14-
<h6 class="whitespace-no-wrap cursor-pointer py-1 px-2 rounded-tr" :class="{'border-b bg-grey-10': showingPinTab }" @click="showingPinTab = false">
15-
{{ __('Make Start Page') }}
16-
</h6>
17-
</div>
18-
<div class="p-2 flex items-center" v-if="showingPinTab">
19-
<input type="text" class="input-text" autofocus ref="fave" v-model="name" @keydown.enter="save">
9+
<div class="p-2 pb-1">
10+
<h6 class="mb-1">{{ __('Pin to Favorites') }}</h6>
11+
<div class="flex items-center">
12+
<input type="text" class="input-text w-auto" autofocus ref="fave" v-model="name" @keydown.enter="save">
2013
<button @click="save" class="btn-primary ml-1">{{ __('Save') }}</button>
2114
</div>
22-
<div class="p-2" v-else>
23-
<button @click="makeStartPage" class="btn block w-full">{{ __('Start here on sign in') }}</button>
24-
</div>
15+
<button @click="makeStartPage" class="mt-1 text-xs text-blue outline-none hover:text-blue-darker">{{ __('Set as sign-in page') }} &rarr;</button>
2516
</div>
2617
</popover>
2718
<div v-else>
@@ -39,8 +30,7 @@ export default {
3930
data() {
4031
return {
4132
name: document.title.replace(' ‹ Statamic', ''),
42-
currentUrl: this.$config.get('urlPath').substr(this.$config.get('cpRoot').length+1),
43-
showingPinTab: true
33+
currentUrl: this.$config.get('urlPath').substr(this.$config.get('cpRoot').length+1)
4434
}
4535
},
4636
@@ -72,10 +62,6 @@ export default {
7262
setTimeout(() => this.$refs.fave.select(), 20);
7363
},
7464
75-
toggleTab() {
76-
this.showingPinTab = ! this.showingPinTab;
77-
},
78-
7965
save() {
8066
this.saving = true;
8167
this.$preferences.append('favorites', this.favorite).then(response => {

0 commit comments

Comments
 (0)