pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/Drop-OSS/drop/commit/e4c8d42cc8776bf987b708db45635882ad296ab6

69241e157469407.css" /> Setup wizard & 0.3.0 release (#146) · Drop-OSS/drop@e4c8d42 · GitHub
Skip to content

Commit e4c8d42

Browse files
authored
Setup wizard & 0.3.0 release (#146)
* fix: small merge fixes * feat: initial setup wizard * fix: last few localization items * fix: lint * fix: bump version
1 parent ed99e02 commit e4c8d42

File tree

25 files changed

+684
-279
lines changed

25 files changed

+684
-279
lines changed

changelog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ _changelog generated by_ [go-conventional-commits](https://github.com/joselitofi
193193
## Release 0.2.0-beta
194194

195195
### Fixes
196+
196197
- fix recursive dirs util #02d6346
197198
- Fix username length requirement #0a5a649
198199
- remove dynamic imports #0f10626
@@ -223,8 +224,8 @@ _changelog generated by_ [go-conventional-commits](https://github.com/joselitofi
223224
- fix FATAL: "root"... message #dbb315a
224225
- only show versions that are directories #ef8f3ae
225226

226-
227227
### Features
228+
228229
- update prisma & delete games #089c3e0
229230
- manual handshake #12e3125
230231
- fetch game endpoint #1f4d075
@@ -271,9 +272,9 @@ _changelog generated by_ [go-conventional-commits](https://github.com/joselitofi
271272
- add support for overriding UMU id #fd4a7d1
272273
- add .sh for linux #fe9373a
273274

274-
275275
### Other Changes
276-
- quexeky <git@quexeky.dev>
276+
277+
- quexeky <git@quexeky.dev>
277278
- fixed manifest generation #03a37f7
278279
- manual ci/cd #03b0b0c
279280
- ability to fetch client certs for p2p #0a715fe
@@ -379,7 +380,6 @@ _changelog generated by_ [go-conventional-commits](https://github.com/joselitofi
379380
- better server side signin redirects #ef13b68
380381
- patch signin #f3672f8
381382

382-
383383
_changelog generated by_ [go-conventional-commits](https://github.com/joselitofilho/go-conventional-commits)
384384

385385
## Release 0.1.0-beta

components/LanguageSelector.vue

Lines changed: 1 addition & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,6 @@
11
<template>
22
<div>
3-
<Listbox v-model="wiredLocale" as="div">
4-
<ListboxLabel class="block text-sm/6 font-medium text-zinc-400">{{
5-
$t("selectLanguage")
6-
}}</ListboxLabel>
7-
<div class="relative mt-2">
8-
<ListboxButton
9-
class="grid w-full cursor-default grid-cols-1 rounded-md bg-zinc-900 py-1.5 pr-2 pl-3 text-left text-zinc-300 outline-1 -outline-offset-1 outline-zinc-700 focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600 sm:text-sm/6"
10-
>
11-
<span class="col-start-1 row-start-1 flex items-center gap-3 pr-6">
12-
<EmojiText
13-
:emoji="localeToEmoji(wiredLocale)"
14-
class="-mt-0.5 shrink-0 max-w-6"
15-
/>
16-
<span class="block truncate">{{
17-
currentLocaleInformation?.name ?? wiredLocale
18-
}}</span>
19-
</span>
20-
<ChevronUpDownIcon
21-
class="col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4"
22-
aria-hidden="true"
23-
/>
24-
</ListboxButton>
25-
26-
<transition
27-
leave-active-class="transition ease-in duration-100"
28-
leave-from-class="opacity-100"
29-
leave-to-class="opacity-0"
30-
>
31-
<ListboxOptions
32-
class="absolute z-10 mt-1 max-h-56 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-hidden sm:text-sm"
33-
>
34-
<ListboxOption
35-
v-for="listLocale in locales"
36-
:key="listLocale.code"
37-
v-slot="{ active, selected }"
38-
as="template"
39-
:value="listLocale.code"
40-
>
41-
<li
42-
:class="[
43-
active
44-
? 'bg-blue-600 text-white outline-hidden'
45-
: 'text-zinc-300',
46-
'relative cursor-default py-2 pr-9 pl-3 select-none',
47-
]"
48-
>
49-
<div class="flex items-center">
50-
<EmojiText
51-
:emoji="localeToEmoji(listLocale.code)"
52-
class="-mt-0.5 shrink-0 max-w-6"
53-
/>
54-
<span
55-
:class="[
56-
selected ? 'font-semibold' : 'font-normal',
57-
'ml-3 block truncate',
58-
]"
59-
>{{ listLocale.name }}</span
60-
>
61-
</div>
62-
63-
<span
64-
v-if="selected"
65-
:class="[
66-
active ? 'text-white' : 'text-blue-600',
67-
'absolute inset-y-0 right-0 flex items-center pr-4',
68-
]"
69-
>
70-
<CheckIcon class="size-5" aria-hidden="true" />
71-
</span>
72-
</li>
73-
</ListboxOption>
74-
</ListboxOptions>
75-
</transition>
76-
</div>
77-
</Listbox>
3+
<LanguageSelectorListbox />
784
<NuxtLink
795
class="mt-1 transition text-blue-500 hover:text-blue-600 text-sm"
806
to="https://translate.droposs.org/projects/drop/"
@@ -97,80 +23,3 @@
9723
</DevOnly>
9824
</div>
9925
</template>
100-
101-
<script setup lang="ts">
102-
import {
103-
Listbox,
104-
ListboxButton,
105-
ListboxLabel,
106-
ListboxOption,
107-
ListboxOptions,
108-
} from "@headlessui/vue";
109-
import { ChevronUpDownIcon } from "@heroicons/vue/16/solid";
110-
import {
111-
ArrowTopRightOnSquareIcon,
112-
CheckIcon,
113-
} from "@heroicons/vue/24/outline";
114-
import type { Locale } from "vue-i18n";
115-
116-
const { locales, locale: currLocale, setLocale } = useI18n();
117-
118-
function changeLocale(locale: Locale) {
119-
setLocale(locale);
120-
121-
// dynamically update the HTML attributes for language and direction
122-
// this is necessary for proper rendering of the page in the new language
123-
useHead({
124-
htmlAttrs: {
125-
lang: locale,
126-
dir: locales.value.find((l) => l.code === locale)?.dir || "ltr",
127-
},
128-
});
129-
}
130-
131-
function localeToEmoji(local: string): string {
132-
switch (local) {
133-
// Default locale
134-
case "en":
135-
case "en-us":
136-
return "🇺🇸";
137-
138-
case "en-gb":
139-
return "🇬🇧";
140-
case "en-ca":
141-
return "🇨🇦";
142-
case "en-au":
143-
return "🇦🇺";
144-
case "en-pirate":
145-
return "🏴‍☠️";
146-
case "fr":
147-
return "🇫🇷";
148-
case "de":
149-
return "🇩🇪";
150-
case "es":
151-
return "🇪🇸";
152-
case "it":
153-
return "🇮🇹";
154-
case "zh":
155-
return "🇨🇳";
156-
case "zh-tw":
157-
return "🇹🇼";
158-
159-
default: {
160-
return "";
161-
}
162-
}
163-
}
164-
165-
const wiredLocale = computed({
166-
get() {
167-
return currLocale.value;
168-
},
169-
set(v) {
170-
changeLocale(v);
171-
},
172-
});
173-
const currentLocaleInformation = computed(() =>
174-
locales.value.find((e) => e.code == wiredLocale.value),
175-
);
176-
</script>
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<template>
2+
<Listbox v-model="wiredLocale" as="div">
3+
<ListboxLabel
4+
v-if="showText"
5+
class="block text-sm/6 font-medium text-zinc-400"
6+
>{{ $t("selectLanguage") }}</ListboxLabel
7+
>
8+
<div class="relative mt-2">
9+
<ListboxButton
10+
class="grid w-full cursor-default grid-cols-1 rounded-md bg-zinc-900 py-1.5 pr-2 pl-3 text-left text-zinc-300 outline-1 -outline-offset-1 outline-zinc-700 focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600 sm:text-sm/6"
11+
>
12+
<span class="col-start-1 row-start-1 flex items-center gap-3 pr-6">
13+
<EmojiText
14+
:emoji="localeToEmoji(wiredLocale)"
15+
class="-mt-0.5 shrink-0 max-w-6"
16+
/>
17+
<span class="block truncate">{{
18+
currentLocaleInformation?.name ?? wiredLocale
19+
}}</span>
20+
</span>
21+
<ChevronUpDownIcon
22+
class="col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4"
23+
aria-hidden="true"
24+
/>
25+
</ListboxButton>
26+
27+
<transition
28+
leave-active-class="transition ease-in duration-100"
29+
leave-from-class="opacity-100"
30+
leave-to-class="opacity-0"
31+
>
32+
<ListboxOptions
33+
class="absolute z-10 mt-1 max-h-56 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-hidden sm:text-sm"
34+
>
35+
<ListboxOption
36+
v-for="listLocale in locales"
37+
:key="listLocale.code"
38+
v-slot="{ active, selected }"
39+
as="template"
40+
:value="listLocale.code"
41+
>
42+
<li
43+
:class="[
44+
active
45+
? 'bg-blue-600 text-white outline-hidden'
46+
: 'text-zinc-300',
47+
'relative cursor-default py-2 pr-9 pl-3 select-none',
48+
]"
49+
>
50+
<div class="flex items-center">
51+
<EmojiText
52+
:emoji="localeToEmoji(listLocale.code)"
53+
class="-mt-0.5 shrink-0 max-w-6"
54+
/>
55+
<span
56+
:class="[
57+
selected ? 'font-semibold' : 'font-normal',
58+
'ml-3 block truncate',
59+
]"
60+
>{{ listLocale.name }}</span
61+
>
62+
</div>
63+
64+
<span
65+
v-if="selected"
66+
:class="[
67+
active ? 'text-white' : 'text-blue-600',
68+
'absolute inset-y-0 right-0 flex items-center pr-4',
69+
]"
70+
>
71+
<CheckIcon class="size-5" aria-hidden="true" />
72+
</span>
73+
</li>
74+
</ListboxOption>
75+
</ListboxOptions>
76+
</transition>
77+
</div>
78+
</Listbox>
79+
</template>
80+
81+
<script setup lang="ts">
82+
import {
83+
Listbox,
84+
ListboxButton,
85+
ListboxLabel,
86+
ListboxOption,
87+
ListboxOptions,
88+
} from "@headlessui/vue";
89+
import { ChevronUpDownIcon } from "@heroicons/vue/16/solid";
90+
import { CheckIcon } from "@heroicons/vue/24/outline";
91+
import type { Locale } from "vue-i18n";
92+
93+
const { showText = true } = defineProps<{ showText?: boolean }>();
94+
95+
const { locales, locale: currLocale, setLocale } = useI18n();
96+
97+
function changeLocale(locale: Locale) {
98+
setLocale(locale);
99+
100+
// dynamically update the HTML attributes for language and direction
101+
// this is necessary for proper rendering of the page in the new language
102+
useHead({
103+
htmlAttrs: {
104+
lang: locale,
105+
dir: locales.value.find((l) => l.code === locale)?.dir || "ltr",
106+
},
107+
});
108+
}
109+
110+
function localeToEmoji(local: string): string {
111+
switch (local) {
112+
// Default locale
113+
case "en":
114+
case "en-us":
115+
return "🇺🇸";
116+
117+
case "en-gb":
118+
return "🇬🇧";
119+
case "en-ca":
120+
return "🇨🇦";
121+
case "en-au":
122+
return "🇦🇺";
123+
case "en-pirate":
124+
return "🏴‍☠️";
125+
case "fr":
126+
return "🇫🇷";
127+
case "de":
128+
return "🇩🇪";
129+
case "es":
130+
return "🇪🇸";
131+
case "it":
132+
return "🇮🇹";
133+
case "zh":
134+
return "🇨🇳";
135+
case "zh-tw":
136+
return "🇹🇼";
137+
138+
default: {
139+
return "";
140+
}
141+
}
142+
}
143+
144+
const wiredLocale = computed({
145+
get() {
146+
return currLocale.value;
147+
},
148+
set(v) {
149+
changeLocale(v);
150+
},
151+
});
152+
const currentLocaleInformation = computed(() =>
153+
locales.value.find((e) => e.code == wiredLocale.value),
154+
);
155+
</script>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy