Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: LFに強制 #1331

Merged
merged 4 commits into from
Jun 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ module.exports = {
},
ignorePatterns: ["dist_electron/**/*", "dist/**/*", "node_modules/**/*"],
rules: {
"linebreak-style":
process.env.NODE_ENV === "production" && process.platform !== "win32"
? ["error", "unix"]
: "off",
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"prettier/prettier": [
Expand Down Expand Up @@ -60,6 +64,8 @@ module.exports = {
"./src/background/*.ts",
"./src/electron/*.ts",
"./tests/**/*.ts",
"./build/*.js",
"./build/*.mts",
],
rules: {
"no-console": "off",
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
src/openapi/**/* linguist-generated=true
openapi.json linguist-generated=true
*.woff2 linguist-vendored=true

* text=auto eol=lf
216 changes: 108 additions & 108 deletions src/components/AcceptRetrieveTelemetryDialog.vue
Original file line number Diff line number Diff line change
@@ -1,108 +1,108 @@
<template>
<q-dialog
maximized
transition-show="jump-up"
transition-hide="jump-down"
class="accept-retrieve-telemetry-dialog transparent-backdrop"
v-model="modelValueComputed"
>
<q-layout container view="hHh Lpr lff" class="bg-background">
<q-header class="q-py-sm">
<q-toolbar>
<div class="column">
<q-toolbar-title class="text-display"
>使いやすさ向上のためのお願い</q-toolbar-title
>
</div>
<q-space />
<div class="row items-center no-wrap">
<q-btn
unelevated
label="拒否"
color="toolbar-button"
text-color="toolbar-button-display"
class="text-no-wrap q-mr-md text-bold"
@click="handler(false)"
/>
<q-btn
unelevated
label="許可"
color="toolbar-button"
text-color="toolbar-button-display"
class="text-no-wrap text-bold"
@click="handler(true)"
/>
</div>
</q-toolbar>
</q-header>
<q-page-container>
<q-page>
<p class="text-body1 q-mb-lg">
VOICEVOXはより使いやすいソフトウェアを目指して開発されています。<br /><br />
ボタンの配置換えなどの方針を決める際は、各UIの利用率などの情報が重要になります。<br />
もしよろしければ、ソフトウェアの利用状況のデータ収集にご協力お願いします。<br />
<br />
(入力されたテキストデータや音声データの情報は収集しておりませんのでご安心ください。)
</p>
<q-card flat bordered>
<q-card-section>
<div class="text-h5">プライバシーポリシー</div>
</q-card-section>
<q-card-section class="text-body1">
<div v-html="privacyPolicy"></div>
</q-card-section>
</q-card>
</q-page>
</q-page-container>
</q-layout>
</q-dialog>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from "vue";
import { useStore } from "@/store";
import { useMarkdownIt } from "@/plugins/markdownItPlugin";
const props =
defineProps<{
modelValue: boolean;
}>();
const emit =
defineEmits<{
(e: "update:modelValue", value: boolean): void;
}>();
const store = useStore();
const modelValueComputed = computed({
get: () => props.modelValue,
set: (val) => emit("update:modelValue", val),
});
const handler = (acceptRetrieveTelemetry: boolean) => {
store.dispatch("SET_ACCEPT_RETRIEVE_TELEMETRY", {
acceptRetrieveTelemetry: acceptRetrieveTelemetry ? "Accepted" : "Refused",
});
modelValueComputed.value = false;
};
const md = useMarkdownIt();
const privacyPolicy = ref("");
onMounted(async () => {
privacyPolicy.value = md.render(
await store.dispatch("GET_PRIVACY_POLICY_TEXT")
);
});
</script>
<style scoped lang="scss">
.q-page {
padding: 3rem;
}
</style>
<template>
<q-dialog
maximized
transition-show="jump-up"
transition-hide="jump-down"
class="accept-retrieve-telemetry-dialog transparent-backdrop"
v-model="modelValueComputed"
>
<q-layout container view="hHh Lpr lff" class="bg-background">
<q-header class="q-py-sm">
<q-toolbar>
<div class="column">
<q-toolbar-title class="text-display"
>使いやすさ向上のためのお願い</q-toolbar-title
>
</div>

<q-space />

<div class="row items-center no-wrap">
<q-btn
unelevated
label="拒否"
color="toolbar-button"
text-color="toolbar-button-display"
class="text-no-wrap q-mr-md text-bold"
@click="handler(false)"
/>

<q-btn
unelevated
label="許可"
color="toolbar-button"
text-color="toolbar-button-display"
class="text-no-wrap text-bold"
@click="handler(true)"
/>
</div>
</q-toolbar>
</q-header>

<q-page-container>
<q-page>
<p class="text-body1 q-mb-lg">
VOICEVOXはより使いやすいソフトウェアを目指して開発されています。<br /><br />
ボタンの配置換えなどの方針を決める際は、各UIの利用率などの情報が重要になります。<br />
もしよろしければ、ソフトウェアの利用状況のデータ収集にご協力お願いします。<br />
<br />
(入力されたテキストデータや音声データの情報は収集しておりませんのでご安心ください。)
</p>
<q-card flat bordered>
<q-card-section>
<div class="text-h5">プライバシーポリシー</div>
</q-card-section>

<q-card-section class="text-body1">
<div v-html="privacyPolicy"></div>
</q-card-section>
</q-card>
</q-page>
</q-page-container>
</q-layout>
</q-dialog>
</template>

<script setup lang="ts">
import { computed, ref, onMounted } from "vue";
import { useStore } from "@/store";
import { useMarkdownIt } from "@/plugins/markdownItPlugin";

const props =
defineProps<{
modelValue: boolean;
}>();
const emit =
defineEmits<{
(e: "update:modelValue", value: boolean): void;
}>();

const store = useStore();

const modelValueComputed = computed({
get: () => props.modelValue,
set: (val) => emit("update:modelValue", val),
});

const handler = (acceptRetrieveTelemetry: boolean) => {
store.dispatch("SET_ACCEPT_RETRIEVE_TELEMETRY", {
acceptRetrieveTelemetry: acceptRetrieveTelemetry ? "Accepted" : "Refused",
});

modelValueComputed.value = false;
};

const md = useMarkdownIt();
const privacyPolicy = ref("");
onMounted(async () => {
privacyPolicy.value = md.render(
await store.dispatch("GET_PRIVACY_POLICY_TEXT")
);
});
</script>

<style scoped lang="scss">
.q-page {
padding: 3rem;
}
</style>
Loading