Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
324857ad3c | |||
10b01202e9 | |||
6a5132accd | |||
5ca74febe1 | |||
32b86e7285 | |||
532a493a62 |
10 changed files with 122 additions and 28 deletions
7
build-debug.sh
Executable file
7
build-debug.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# pnpm run clean-all
|
||||
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm run build:debug
|
||||
|
||||
pnpm run migrate
|
52
dev/macos/README.md
Normal file
52
dev/macos/README.md
Normal file
|
@ -0,0 +1,52 @@
|
|||
## macOS installation methods
|
||||
|
||||
- install redis and postgresql
|
||||
|
||||
```bash
|
||||
./install.sh
|
||||
```
|
||||
|
||||
- build pgroonga
|
||||
|
||||
```bash
|
||||
./build-pgroonga.sh
|
||||
```
|
||||
|
||||
- start redis and postgresql
|
||||
|
||||
```bash
|
||||
./start-postgres.sh
|
||||
|
||||
# and
|
||||
./start-redis.sh
|
||||
```
|
||||
|
||||
- setup detabase
|
||||
|
||||
* create db and user
|
||||
|
||||
```bash
|
||||
psql -d postgres -U $USER
|
||||
```
|
||||
|
||||
```sql
|
||||
-- Create a new PostgreSQL user named 'firefish' with encrypted password.
|
||||
-- This user will not have superuser, createdb, or createrole privileges.
|
||||
CREATE USER firefish WITH ENCRYPTED PASSWORD 'password' SUPERUSER NOCREATEDB NOCREATEROLE;
|
||||
|
||||
-- Create a new database named 'firefish_db' with UTF8 encoding and owned by the 'firefish' user.
|
||||
CREATE DATABASE firefish_db WITH ENCODING 'UTF8' OWNER firefish;
|
||||
|
||||
```
|
||||
|
||||
- enable pgroonga extension
|
||||
|
||||
```bash
|
||||
# enter this command then type password
|
||||
psql -U firefish -d firefish_db -W
|
||||
```
|
||||
|
||||
```sql
|
||||
-- This ensures the PGroonga extension is enabled for the database.
|
||||
CREATE EXTENSION pgroonga;
|
||||
```
|
8
dev/macos/build-pgroonga.sh
Executable file
8
dev/macos/build-pgroonga.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
sudo -v
|
||||
brew install groonga
|
||||
|
||||
git clone --recursive https://github.com/pgroonga/pgroonga.git --depth 1
|
||||
cd pgroonga
|
||||
make
|
||||
sudo make install
|
3
dev/macos/install.sh
Executable file
3
dev/macos/install.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
brew install redis
|
||||
brew install postgresql@16
|
9
dev/macos/start-postgres.sh
Executable file
9
dev/macos/start-postgres.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"
|
||||
|
||||
export LDFLAGS="-L/opt/homebrew/opt/postgresql@16/lib"
|
||||
export CPPFLAGS="-I/opt/homebrew/opt/postgresql@16/include"
|
||||
export PKG_CONFIG_PATH="/opt/homebrew/opt/postgresql@16/lib/pkgconfig"
|
||||
|
||||
LC_ALL="C" /opt/homebrew/opt/postgresql@16/bin/postgres -D /opt/homebrew/var/postgresql@16
|
2
dev/macos/start-redis.sh
Executable file
2
dev/macos/start-redis.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
redis-server
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "puyoskey",
|
||||
"version": "0.1.3-20240818.snapshot-16d0df49724a614ee912c022d2540c8b7040805f",
|
||||
"version": "0.1.4-20240818.snapshot-16d0df49724a614ee912c022d2540c8b7040805f",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.v-sli.me/HidemaruOwO/puyoskey.git"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
:style="bg"
|
||||
>
|
||||
<img class="icon" :src="getInstanceIcon(instance)" @error="getInstanceIconErrorEvent($event)" aria-hidden="true" />
|
||||
<span class="name">{{ instance.name }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ function checkForSplash() {
|
|||
"yi",
|
||||
].includes((lang ?? "en").split("-")[0])
|
||||
? "rtl"
|
||||
: "ltr",
|
||||
: "ltr"
|
||||
);
|
||||
const writingMode = localStorage.getItem("writingMode");
|
||||
switch (writingMode) {
|
||||
|
@ -221,10 +221,10 @@ function checkForSplash() {
|
|||
window.location.search === "?zen"
|
||||
? defineAsyncComponent(() => import("@/ui/zen.vue"))
|
||||
: !me
|
||||
? defineAsyncComponent(() => import("@/ui/visitor.vue"))
|
||||
: ui === "deck"
|
||||
? defineAsyncComponent(() => import("@/ui/deck.vue"))
|
||||
: defineAsyncComponent(() => import("@/ui/universal.vue")),
|
||||
? defineAsyncComponent(() => import("@/ui/visitor.vue"))
|
||||
: ui === "deck"
|
||||
? defineAsyncComponent(() => import("@/ui/deck.vue"))
|
||||
: defineAsyncComponent(() => import("@/ui/universal.vue"))
|
||||
);
|
||||
|
||||
if (_DEV_) {
|
||||
|
@ -282,10 +282,12 @@ function checkForSplash() {
|
|||
// ログインしてる場合だけ
|
||||
if (me) {
|
||||
popup(
|
||||
defineAsyncComponent(() => import("@/components/MkUpdated.vue")),
|
||||
defineAsyncComponent(
|
||||
() => import("@/components/MkUpdated.vue")
|
||||
),
|
||||
{},
|
||||
{},
|
||||
"closed",
|
||||
"closed"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -294,7 +296,9 @@ function checkForSplash() {
|
|||
if (
|
||||
isSignedIn(me) &&
|
||||
defaultStore.state.tutorial === -1 &&
|
||||
!["/announcements", "/announcements/"].includes(window.location.pathname)
|
||||
!["/announcements", "/announcements/"].includes(
|
||||
window.location.pathname
|
||||
)
|
||||
) {
|
||||
api("announcements", { withUnreads: true, limit: 10 })
|
||||
.then((announcements) => {
|
||||
|
@ -304,22 +308,25 @@ function checkForSplash() {
|
|||
if (unreadAnnouncements.length > 3) {
|
||||
popup(
|
||||
defineAsyncComponent(
|
||||
() => import("@/components/MkManyAnnouncements.vue"),
|
||||
() => import("@/components/MkManyAnnouncements.vue")
|
||||
),
|
||||
{},
|
||||
{},
|
||||
"closed",
|
||||
"closed"
|
||||
);
|
||||
} else {
|
||||
for (const item of unreadAnnouncements) {
|
||||
if (item.showPopup)
|
||||
popup(
|
||||
defineAsyncComponent(
|
||||
() => import("@/components/MkAnnouncement.vue"),
|
||||
() =>
|
||||
import(
|
||||
"@/components/MkAnnouncement.vue"
|
||||
)
|
||||
),
|
||||
{ announcement: item },
|
||||
{},
|
||||
"closed",
|
||||
"closed"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -334,14 +341,16 @@ function checkForSplash() {
|
|||
applyTheme(
|
||||
darkMode
|
||||
? ColdDeviceStorage.get("darkTheme")
|
||||
: ColdDeviceStorage.get("lightTheme"),
|
||||
: ColdDeviceStorage.get("lightTheme")
|
||||
);
|
||||
},
|
||||
{ immediate: localStorage.theme == null },
|
||||
{ immediate: localStorage.theme == null }
|
||||
);
|
||||
|
||||
const darkTheme = computed(ColdDeviceStorage.makeGetterSetter("darkTheme"));
|
||||
const lightTheme = computed(ColdDeviceStorage.makeGetterSetter("lightTheme"));
|
||||
const lightTheme = computed(
|
||||
ColdDeviceStorage.makeGetterSetter("lightTheme")
|
||||
);
|
||||
|
||||
watch(darkTheme, (theme) => {
|
||||
if (defaultStore.state.darkMode) {
|
||||
|
@ -381,10 +390,10 @@ function checkForSplash() {
|
|||
(v) => {
|
||||
document.documentElement.style.setProperty(
|
||||
"--modalBgFilter",
|
||||
v ? "blur(4px)" : "none",
|
||||
v ? "blur(4px)" : "none"
|
||||
);
|
||||
},
|
||||
{ immediate: true },
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
|
@ -396,7 +405,7 @@ function checkForSplash() {
|
|||
document.documentElement.style.setProperty("--blur", "none");
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
let reloadDialogShowing = false;
|
||||
|
@ -427,7 +436,7 @@ function checkForSplash() {
|
|||
});
|
||||
|
||||
for (const plugin of ColdDeviceStorage.get("plugins").filter(
|
||||
(p) => p.active,
|
||||
(p) => p.active
|
||||
)) {
|
||||
import("./plugin").then(({ install }) => {
|
||||
install(plugin);
|
||||
|
@ -460,19 +469,22 @@ function checkForSplash() {
|
|||
toast(
|
||||
i18n.t("welcomeBackWithName", {
|
||||
name: me.name || me.username,
|
||||
}),
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
localStorage.setItem("lastUsed", Date.now().toString());
|
||||
|
||||
const latestDonationInfoShownAt = localStorage.getItem(
|
||||
"latestDonationInfoShownAt",
|
||||
"latestDonationInfoShownAt"
|
||||
);
|
||||
const neverShowDonationInfo = localStorage.getItem(
|
||||
"neverShowDonationInfo"
|
||||
);
|
||||
const neverShowDonationInfo = localStorage.getItem("neverShowDonationInfo");
|
||||
if (
|
||||
neverShowDonationInfo !== "true" &&
|
||||
new Date(me.createdAt).getTime() < Date.now() - 1000 * 60 * 60 * 24 * 3 &&
|
||||
new Date(me.createdAt).getTime() <
|
||||
Date.now() - 1000 * 60 * 60 * 24 * 3 &&
|
||||
!location.pathname.startsWith("/miauth")
|
||||
) {
|
||||
if (
|
||||
|
@ -481,10 +493,12 @@ function checkForSplash() {
|
|||
Date.now() - 1000 * 60 * 60 * 24 * 30
|
||||
) {
|
||||
popup(
|
||||
defineAsyncComponent(() => import("@/components/MkDonation.vue")),
|
||||
defineAsyncComponent(
|
||||
() => import("@/components/MkDonation.vue")
|
||||
),
|
||||
{},
|
||||
{},
|
||||
"closed",
|
||||
"closed"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ export default defineConfig(({ command, mode }) => {
|
|||
_DATA_TRANSFER_DRIVE_FOLDER_: JSON.stringify("mk_drive_folder"),
|
||||
_DATA_TRANSFER_DECK_COLUMN_: JSON.stringify("mk_deck_column"),
|
||||
__VUE_OPTIONS_API__: true,
|
||||
__VUE_PROD_DEVTOOLS__: false,
|
||||
__VUE_PROD_DEVTOOLS__: true,
|
||||
},
|
||||
|
||||
build: {
|
||||
|
|
Reference in a new issue