Skip to content

Commit 4eb2934

Browse files
authored
feat: add detect os feature (#18)
1 parent 43df05e commit 4eb2934

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export interface Partition {
3939
parent_path?: string;
4040
fs_type?: string;
4141
size: number;
42+
os?: string;
4243
}
4344

4445
export interface SquashfsInfo {

src/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@
123123
"e4": "The unit does not have an EFI partition to continue the installation.",
124124
"e5": "This partitioned table type is not supported: {table}",
125125
"e6": "LVM is not supported",
126-
"r2": "Waiting on you to finish partitioning...\nIf you are stuck, please try and strike Alt-Tab to bring up the GParted window and close it when you are done."
126+
"r2": "Waiting on you to finish partitioning...\nIf you are stuck, please try and strike Alt-Tab to bring up the GParted window and close it when you are done.",
127+
"installed": "{os} installed"
127128
},
128129
"esp": {
129130
"title": "ESP Partition",

src/locales/zh-CN.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@
123123
"e4": "该设备没有 EFI 分区,无法继续安装。",
124124
"e5": "不支持该分区表类型:{table}",
125125
"e6": "不支持 LVM 设备",
126-
"r2": "正在等待您完成分区…\n如果您发现界面无法操作,请尝试使用 Alt-Tab 组合键唤出 GParted 窗口,完成分区操作后方可关闭 GParted。"
126+
"r2": "正在等待您完成分区…\n如果您发现界面无法操作,请尝试使用 Alt-Tab 组合键唤出 GParted 窗口,完成分区操作后方可关闭 GParted。",
127+
"installed": "已安装有 {os}"
127128
},
128129
"esp": {
129130
"title": "EFI 系统分区 (ESP)",

src/views/PartitionView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ export default defineComponent({
383383
>
384384
<template #item="option">
385385
<div style="width: 100%">
386-
<span class="column-80">{{ option.path }}</span>
386+
<span class="column-80">{{ option.os ? `${ option.path } [${$t("part.installed", { os: option.os })}]` : option.path }}</span>
387387
<span class="column-20">{{ humanSize(option.size) }}</span>
388388
<p class="secondary">
389389
<span>{{ option.fs_type || $t("part.k0") }}</span>

0 commit comments

Comments
 (0)